Liyi li and Elsa GunterOrder-Sorted Algebra (B)
Many-Sorted Algebra (A)
Example
The O relation ( ) can be viewed as a direct graph where each relation is an edge.
The graph may have different connected components.
For any tow sorts in a connected component in a order-sorted algebra, there is a unique top supersort of them.
The operator f and f' are Argument compatible iif:
AC(f,f') := f and f' are arugment comptaible
An Order-Sorted algebra is sensible iif:
An Order-Sorted algebra is strictly sensible iif:
Translating Operators
Translating Equations and Terms
Translating Semantic Rules
The Order-Sorted algebra must be strictly sensibleTranslating Operators
1.
find a maximal argument-bounding operator f' for every operator f. Eliminate f if f' is different from f.
2.
for each pair (s,s') in O, create a unary relation:
non-core constructors
Translating Equations
Set of core equality equations. For every two nodes in , if there are more than one paths from the first node to the second, a equation is added to connect them.
Translating Equations (Example)
There is a new equation
Translating terms (Example)
There is a new equation