TY - JOUR
T1 - Order-sorted algebra I
T2 - equational deduction for multiple inheritance, overloading, exceptions and partial operations
AU - Goguen, Joseph A.
AU - Meseguer, José
N1 - Funding Information:
Cnrrespondence to: J.A. Goguen. Programming sity, 11 Kcble Road. Oxford, OX I 3QD. UK. *Supported in part by Ofice of Naval Research Contracts NO0014-82-C-0333. NOOOl4-85-C 0417. and NOOO14-86-C-0450, National Science Foundation Grant MCS82013XO. and a gift from the System Devcl-opment Foundation.
PY - 1992/11/9
Y1 - 1992/11/9
N2 - This paper generalizes many-sorted algebra (MSA) to order-sorted algebra (OSA) by allowing a partial ordering relation on the set of sorts. This supports abstract data types with multiple inheritance (in roughly the sense of object-oriented programming), several forms of polymorphism and overloading, partial operations (as total on equationally defined subsorts), exception handling, and an operational semantics based on term rewriting. We give the basic algebraic constructions for OSA, including quotient, image, product and term algebra, and we prove their basic properties, including quotient, homomorphism, and initiality theorems. The paper's major mathematical results include a notion of OSA deduction, a completeness theorem for it, and an OSA Birkhoff variety theorem. We also develop conditional OSA, including initiality, completeness, and McKinsey-Malcev quasivariety theorems, and we reduce OSA to (conditional) MSA, which allows lifting many known MSA results to OSA. Retracts, which intuitively are left inverses to subsort inclusions, provide relatively inexpensive run-time error handling. We show that it is safe to add retracts to any OSA signature, in the sense that it gives rise to a conservative extension. A final section compares and contrasts many different approaches to OSA. This paper also includes several examples demonstrating the flexibility and applicability of OSA, including some standard benchmarks like stack and list, as well as a much more substantial example, the number hierarchy from the naturals up to the quaternions.
AB - This paper generalizes many-sorted algebra (MSA) to order-sorted algebra (OSA) by allowing a partial ordering relation on the set of sorts. This supports abstract data types with multiple inheritance (in roughly the sense of object-oriented programming), several forms of polymorphism and overloading, partial operations (as total on equationally defined subsorts), exception handling, and an operational semantics based on term rewriting. We give the basic algebraic constructions for OSA, including quotient, image, product and term algebra, and we prove their basic properties, including quotient, homomorphism, and initiality theorems. The paper's major mathematical results include a notion of OSA deduction, a completeness theorem for it, and an OSA Birkhoff variety theorem. We also develop conditional OSA, including initiality, completeness, and McKinsey-Malcev quasivariety theorems, and we reduce OSA to (conditional) MSA, which allows lifting many known MSA results to OSA. Retracts, which intuitively are left inverses to subsort inclusions, provide relatively inexpensive run-time error handling. We show that it is safe to add retracts to any OSA signature, in the sense that it gives rise to a conservative extension. A final section compares and contrasts many different approaches to OSA. This paper also includes several examples demonstrating the flexibility and applicability of OSA, including some standard benchmarks like stack and list, as well as a much more substantial example, the number hierarchy from the naturals up to the quaternions.
UR - http://www.scopus.com/inward/record.url?scp=0027116146&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=0027116146&partnerID=8YFLogxK
U2 - 10.1016/0304-3975(92)90302-V
DO - 10.1016/0304-3975(92)90302-V
M3 - Article
AN - SCOPUS:0027116146
SN - 0304-3975
VL - 105
SP - 217
EP - 273
JO - Theoretical Computer Science
JF - Theoretical Computer Science
IS - 2
ER -