|
With the inheritance concept it can be avoided to re-specify something which has already been specified elsewhere. With inheritance, all values, some or all operators and all equations are inherited by a child sort from a parent sort. With the keyword ADDING, further literals, operators and equations can be added to the child sort. The inherited operators and literals can be renamed to avoid confusion Suppose we have a sort sorl which is defined as follows:
With this sort a new sort sor2 can be defined which uses the operators op1 and op2, but renames op2 into opA and adds a new operator opB and a literal liA:
It is not necessary (or allowed) to specify the literal operators that are inherited: they are all inherited by default. The frequent case that all operators should be inherited, can be specified by
|
Contact the webmaster with
questions or comments about this web site. |