Deciding type isomorphisms in a type-assignment framework
- 1 October 1993
- journal article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 3 (4) , 485-525
- https://doi.org/10.1017/s0956796800000861
Abstract
This paper provides a formal treatment of isomorphic types for languages equipped with an ML style polymorphic type inference mechanism. The results obtained make less justified the commonplace feeling that (the core of) ML is a subset of second order λ-calculus: we can provide an isomorphism of types that holds in the core ML language, but not in second order λ-calculus. This new isomorphism allows to provide a complete (and decidable) axiomatization of all the types isomorphic in ML style languages, a relevant issue for thetype as specificationsparadigm in library searches. This work is a very extended version of Di Cosmo (1992): we provide both a thorough theoretical treatment of the topic and describe a practical implementation of a library search system so that the paper can be used as a reference both by those interested in the formal theory of ML style languages, and by those simply concerned with implementation issues. The new isomorphism can also be used to extend the usual ML type-inference algorithm, as suggested by Di Cosmo (1992). Building on that proposal, we introduce a better type-inference algorithm that behaves well in the presence of non-functional primitives like references and exceptions. The algorithm described here has been implemented easily as a variation to the Caml-Light 0.4 system.Keywords
This publication has 13 references indexed in Scilit:
- A theory of type polymorphism in programmingPublished by Elsevier ,2003
- Retrieving library functions by unifying types modulo linear isomorphismRAIRO - Theoretical Informatics and Applications, 1993
- Retrieving reusable software components by polymorphic typeJournal of Functional Programming, 1991
- A confluent reduction for the λ-calculus with surjective pairing and terminal objectPublished by Springer Nature ,1991
- Equality of terms containing associative-commutative functions and commutative binding operators is isomorphism completePublished by Springer Nature ,1990
- Retrieving library identifiers via equational matching of typesPublished by Springer Nature ,1990
- Polymorphic type inference and containmentInformation and Computation, 1988
- The category of finite sets and Cartesian closed categoriesJournal of Mathematical Sciences, 1983
- Characterization of normal forms possessing inverse in the λ-β-η-calculusTheoretical Computer Science, 1976
- The Principal Type-Scheme of an Object in Combinatory LogicTransactions of the American Mathematical Society, 1969