Deciding type isomorphisms in a type-assignment framework
Open Access
- 7 November 2008
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 3 (4) , 485-525
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 the type as specifications paradigm 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 12 references indexed in Scilit:
- Retrieving library functions by unifying types modulo linear isomorphismRAIRO - Theoretical Informatics and Applications, 1993
- A confluent reduction for the λ-calculus with surjective pairing and terminal objectLecture Notes in Computer Science, 1991
- Equality of terms containing associative-commutative functions and commutative binding operators is isomorphism complete1990
- Retrieving library identifiers via equational matching of types1990
- Polymorphic type inference and containmentInformation and Computation, 1988
- Provable isomorphisms and domain equations in models of typed languages1985
- The category of finite sets and Cartesian closed categoriesJournal of Mathematical Sciences, 1983
- A theory of type polymorphism in programmingJournal of Computer and System Sciences, 1978
- 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