Abstract
A constrained type consists of both a standard type and a constraint set. Such types enable efficient type inference for object-oriented languages with polymorphism and subtyping, as demonstrated by Eifrig, Smith, and Trifonov. Until now, it has been unclear how expressive constrained types are. In this article we study constrained types without universal quantification. We prove that they accept the same programs as the type system of Amadio and Cardelli with subtyping and recursive types. This result gives a precise connection between constrained types and the standard notion of types.
Supplemental Material
Available for Download
- Aiken, A. and Wimmers, E. 1993. Type inclusion constraints and type inference. In Proceedings of the ACM Conference on Functional Programming Languages and Computer Architecture. ACM, New York, 31-41. Google Scholar
- Amadio, R. M. and Cardelli, L. 1993. Subtyping recursive types. ACM Trans. Program. Lang. Syst. 15, 4, 575-631. Also in Proceedings of POPL'91. Google Scholar
- Curtis, P. 1990. Constrained quantification in polymorphic type analysis. Tech. Rep. CSL-90-1, XEROX Palo Alto Research Center, Palo Alto, Calif.Google Scholar
- Eifrig, J., Smith, S., and Trifonov, V. 1995a. Sound polymorphic type inference for objects. In Proceedings of OOPSLA'95, ACM SIGPLAN 10th Annual Conference on Object-Oriented Programming Systems, Languages and Applications. ACM, New York, 169-184. Google Scholar
- Eifrig, J., Smith, S., and Trifonov, V. 1995b. Type inference for recursively constrained types and it application to OOP. In Proceedings of Mathematical Foundations of Programming Semantics. Electronic Notes in Theoretical Computer Science, vol. 1. Elsevier Science B.V., New York.Google Scholar
- Kaes, S. 1992. Type inference in the presence of overloading, subtyping and recursive types. In the 1992 ACM Conference on Lisp and Functional Programming. LISP Pointers 5, 1, 193-204. Google Scholar
- Kozen, D., Palsberg, J., and Schwartzbach, M. I. 1995. Efficient recursive subtyping. Math. Struct. Comput. Sci. 5, 1, 113-125. Preliminary version in Proceedings of POPL'93, Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Charleston, S. Carol., Jan.). ACM, New York, 419-428. Google Scholar
- Mitchell, J. C. 1991. Type inference with simple subtypes. J. Funct. Program. 1, 245-285.Google Scholar
- Palsberg, J. and O'Keefe, P. M. 1995. A type system equivalent to flow analysis. ACM Trans. Program. Lang. Syst. 17, 4 (July), 576-599. Preliminary version in Proceedings of POPL'95, Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages (San Francisco, Calif., Jan.). ACM, New York, 367-378. Google Scholar
Index Terms
- Constrained types and their expressiveness
Recommendations
Constrained kinds
OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applicationsModern object-oriented languages such as X10 require a rich framework for types capable of expressing both value-dependency and genericity, and supporting pluggable, domain-specific extensions. In earlier work, we presented a framework for constrained ...
Generalized algebraic data types and object-oriented programming
OOPSLA '05: Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsGeneralized algebraic data types (GADTs) have received much attention recently in the functional programming community. They generalize the (type) parameterized algebraic datatypes (PADTs) of ML and Haskell by permitting value constructors to return ...
Generalized algebraic data types and object-oriented programming
Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming systems languages and applicationsGeneralized algebraic data types (GADTs) have received much attention recently in the functional programming community. They generalize the (type) parameterized algebraic datatypes (PADTs) of ML and Haskell by permitting value constructors to return ...
Comments