Inclusions and Subtypes I: First-Order Case

The failure to make explicit two different notions of subtype, a subtype as inclusion notion originally proposed by Goguen and a subtype as implicit conversion notion originally proposed by Reynolds, leads to unsatisfactory situations in present approaches to subtyping. Here, it is argued that choosing either notion at the expense of the other would be mistaken and limiting, and a framework is proposed in which two subtype relations T < T (inclusion) and T <: T' (implicit conversion) are distinguished and integrated. Part I generalizes the first-order equational logic with subtypes as inclusions and overloaded function symbols from its usual set-theoretic semantics to a categorical semantics in the style of Lawvere. This provides a much more general notion of model and supports interpretations of a logic with subtypes in any category having a suitable canonical notion of subobject. Soundness and completeness of the logic in the categorical setting are proved, and the classifying category of a theory, which is the initial model in this context, is constructed in detail. The adjunction between theory presentations and model categories is also proved, shedding light on subtleties of operation overloading not present in the unsorted and many-sorted cases. AH this sets the stage for the higher-order categorical semantics of subtypes developed in Part II.

[1]  Roy L. Crole,et al.  Categories for Types , 1994, Cambridge mathematical textbooks.

[2]  John C. Reynolds,et al.  Three Approaches to Type Structure , 1985, TAPSOFT, Vol.1.

[3]  Luca Cardelli,et al.  A Semantics of Multiple Inheritance , 1984, Information and Computation.

[4]  José Meseguer,et al.  Initiality, induction, and computability , 1986 .

[5]  Luca Cardelli,et al.  A Semantic Basis for Quest , 1991, J. Funct. Program..

[6]  Gert Smolka TEL (Version 0.9) Report and User Manual , 1988 .

[7]  Robin Milner,et al.  Definition of standard ML , 1990 .

[8]  Axel Poigné,et al.  Parametrization for Order-Sorted Algebraic Specification , 1990, J. Comput. Syst. Sci..

[9]  John C. Reynolds,et al.  Using category theory to design implicit conversions and generic operators , 1980, Semantics-Directed Compiler Generation.

[10]  José Meseguer,et al.  Unifying Functional, Object-Oriented and Relational Programming with Logical Semantics , 1987, Research Directions in Object-Oriented Programming.

[11]  S. Lane Categories for the Working Mathematician , 1971 .

[12]  José Meseguer,et al.  A logical theory of concurrent objects and its realization in the Maude language , 1993 .

[13]  Jean-Pierre Jouannaud,et al.  Operational Semantics for Order-Sorted Algebra , 1985, ICALP.

[14]  F. W. Lawvere,et al.  FUNCTORIAL SEMANTICS OF ALGEBRAIC THEORIES. , 1963, Proceedings of the National Academy of Sciences of the United States of America.

[15]  David A. Wolfram,et al.  On Types and FOOPS , 1990, DS-4.

[16]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

[17]  J. Meseguer,et al.  Order-Sorted Algebra Solves the Constructor-Selector, Multiple Representation, and Coercion Problems , 1993, Inf. Comput..

[18]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[19]  Jeffrey D. Ullman Elements of ML programming , 1994 .

[20]  H. Ehrig,et al.  Equational Specifications and Algebras , 1985 .

[21]  Giorgio Ghelli,et al.  Coherence of Subsumption, Minimum Typing and Type-Checking in F<= , 1992, Math. Struct. Comput. Sci..

[22]  José Meseguer,et al.  Order-Sorted Algebra I: Equational Deduction for Multiple Inheritance, Overloading, Exceptions and Partial Operations , 1992, Theor. Comput. Sci..

[23]  Zhenyu Qian,et al.  Higher-Order Order-Sorted Algebras , 1990, ALP.

[24]  José Meseguer,et al.  EQLOG: Equality, Types, and Generic Modules For Logic Programming , 1986, Logic Programming: Functions, Relations, and Equations.

[25]  Joseph A. Goguen,et al.  Order Sorted Algebra , 1996 .

[26]  José Meseguer,et al.  Inclusions and Subtypes II: Higher-Order Case , 1996, J. Log. Comput..

[27]  Jean Benabou,et al.  Structures algébriques dans les catégories , 1968 .

[28]  José Meseguer,et al.  Operational Semantics of OBJ-3 (Extended Abstract) , 1988, ICALP.

[29]  Martin Gogolla,et al.  Partially Ordered Sorts in Algebraic Specifications , 1984, CAAP.