Skip to main content Accessibility help
×
Home
Hostname: page-component-55597f9d44-vkn6t Total loading time: 0.958 Render date: 2022-08-13T20:10:03.356Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "useRatesEcommerce": false, "useNewApi": true } hasContentIssue true

Deciding type isomorphisms in a type-assignment framework

Published online by Cambridge University Press:  07 November 2008

Roberto Di Cosmo
Affiliation:
LIENS (CNRS) - DMI, Ecole Normale Supérieure, 45 Rue d'Ulm, 75005 Paris, France and Dipartimento di Informatica, Corso Italia 40, 56100 Pisa, Italy (e-mail: dicosmo@dmi.ens.fr)
Rights & Permissions[Opens in a new window]

Abstract

HTML view is not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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.

Type
Articles
Copyright
Copyright © Cambridge University Press 1993

References

Abadi, M., Cardelli, L. and Curien, P.L. (1993) Formal parametric polymorphism. In Ann. ACM Symp. on Principles of Programming Languages (POPL). ACM Press.Google Scholar
Barendregt, H. (1984) The Lambda Calculus; Its syntax and Semantics (revised edition). North Holland.Google Scholar
Basin, D. (1990) Equality of Terms Containing Associative-Commutative Functions and Commutative Binding Operators is Isomorphism Complete in 10th Int. Conf. on Automated Deduction. Lecture Notes in Computer Science, 449, 07.CrossRefGoogle Scholar
Bruce, K., Di Cosmo, R. and Longo, G. (1990) Provable isomorphisms of types. Technical Report 90–14, LIENS - Ecole Normale Supérieure, 1990. To appear in Proc. of Symposium on Symbolic Computation, ETH, Zurich, March 1990, Mathematical Structures in Computer Science, 2(2).Google Scholar
Bruce, K., Di Cosmo, R. and Longo, G. (1990) Provable isomorphisms of types. Mathematical Structures in Computer Science, 2(2), 1992. Proc. of Symposium on Symbolic Computation, ETH, Zurich, 03.Google Scholar
Bruce, K. and Longo, G. (1985) Provable isomorphisms and domain equations in models of typed languages. ACM Symposium on Theory of Computing (STOC 85), 05.Google Scholar
Curien, P.L. and Di Cosmo, R. (1991) A confluent reduction system for the λ-calculus with surjective pairing and terminal object. In Leach, , Monien, , and Artalejo, , editors, Intern. Conf. on Automata, Languages and Programming (ICALP), pages 291302. Springer-Verlag.CrossRefGoogle Scholar
Cousineau, G and Huet, G. (1988) The caml primer. Technical report, LIENS - Ecole Normale Supérieure.Google Scholar
Damas, L. (1985) Types Disciplines in Programming Languages. PhD thesis, Computer Science Dept., University of Edimburgh, 04.Google Scholar
Di Cosmo, R. (1991) Invertibility of terms and valid isomorphisms. a proof theoretic study on second order λ-calculus with surjective pairing and terminal object. Technical Report 91–10, LIENS - Ecole Normale Supérieure, 1991. Submitted to Information and Computation.Google Scholar
Di Cosmo, R. (1992) Type isomorphisms in a type assignment framework. In Ann. ACM Symp. on Principles of Programming Languages (POPL), pages 200210. ACM.Google Scholar
Di Cosmo, R. and Longo, G. (1989) Constuctively equivalent propositions and isomorphisms of objects (or terms as natural transformations). Workshop on Logic for Computer Science - MSRI, Berkeley, 11.Google Scholar
Dezani-Ciancaglini, M. (1976) Characterization of normal forms possessing an inverse in the λβη calculus. Theoretical Computer Science, 2:323337.CrossRefGoogle Scholar
Damas, L. and Milner, R. (1982) Principal type schemes for functional programs. In Ann. ACM Symp. on Principles of Programming Languages (POPL), pages 207212. ACM.Google Scholar
Hindley, R. (1969) The principal type-scheme of a an object in combinatory logic. Transactions of the American Mathematical Society, 146.Google Scholar
Hindley, R. and Seldin, J.P. (1980) Introduction to Combinators and λ-calculus. London Mathematical Society.Google Scholar
Jay, C.B. (1991) Strong normalisation for simply-typed lambda-calculus as in lambek-scott. LFCS, University of Edimburgh, 02.Google Scholar
Kirchner, C. (1985) Methodes et utiles de conception systematique d'algoritmes d'unification dans les theories equationnelles. PhD thesis, Université de Nancy.Google Scholar
Krivine, J.L. (1990) Lambda calculus. Types et Modéles. Masson.Google Scholar
Leroy, X. (1990) The ZINC experiment: an economical implementation of the ML language. Technical report 117, INRIA.Google Scholar
Longo, G., Milsted, K. and Soloviev, S.V. (1992) The genericity theorem and the notion of parametericity in the polimorphic λ-calculus. E-mail: and ., 08.Google Scholar
Martin, C.F. (1972) Axiomatic bases for equational theories of natural numbers. Notices of the Am. Math. Soc., 19(7):778.Google Scholar
Matthews, B. (1992) Reusing functional code using type classes for library search. Dept. Comput. Sci, University of Glasgow, Scotland. E-mail: .Google Scholar
Mauny, M. (1991) Functional programming using Caml Light. INRIA, 1991. Included in the Caml Light distribution.Google Scholar
Milner, R. (1978) A theory of type polymorphism in programming. Journal of Computer and System Science, 17(3):348375.CrossRefGoogle Scholar
Mitchell, J.C. (1988) Polymorphic type inference and containment. Information and Computation, 76:211249.CrossRefGoogle Scholar
Morgan, R. (1991) Component Library Retrieval using property models. PhD thesis, University of Durham - England, .Google Scholar
Meertens, L. and Siebes, A. (1990) Universal type isomorphisms in cartesian closed categories. Centrum voor Wiskunde en Informatica, Amsterdam, the Netherlands. E-mail: .Google Scholar
Milner, R. and Tofte, M. (1991) Commentary on Standard ML. The MIT Press.Google Scholar
Milner, R., Tofte, M. and Harper, R. (1990) The Definition of Standard ML. The MIT Press.Google Scholar
Nipkow, T. (1990) A critical pair lemma for higher-order rewrite systems and its application to λ*. First Annual Workshop on Logical Frameworks.Google Scholar
Narendran, P., Pfenning, F. and Statman, R. (1992) On the unification problem for cartesian closed categories. E-mail: dran@cs.albany.edu.Google Scholar
Reynolds, J.C. (1983) Types, abstraction and parametric polymorphism. In R.E.A., Mason, editor, Information Processing '83. North Holland.Google Scholar
Rittri, M. (1990) Retrieving library identifiers by equational matching of types in 10th Int. Conf. on Automated Deduction. Lecture Notes in Computer Science, 449, 07.CrossRefGoogle Scholar
Rittri, M. (1990) Searching program libraries by type and proving compiler correctness by bisimulation. PhD thesis, University of Göteborg, Göteborg, Sweden.Google Scholar
Rittri, M. (1991) Using types as search keys in function libraries. Journal of Functional Programming, 1(1):7189.CrossRefGoogle Scholar
Rittri, M. (1992) Retrieving library functions by unifying types modulo linear isomorphisms. Technical Report 66, Chalmers University of Technology and University of Göteborg 1992. Programming Methodology Group.Google Scholar
Runciman, C. and Toyn, I. (1991) Retrieving re-usable software components by polymorphic type. Journal of Functional Programming, 1(2):191211.Google Scholar
Rollins, E.J. and Wing, J. M. (1991) Specifications as search keys for software libraries. In K., Furukawa, editor, Eighth International Conference on Logic Programming, pages 173187. MIT Press.Google Scholar
Soloviev, S.V. (1983) The category of finite sets and cartesian closed categories. Journal of Soviet Mathematics, 22(3):13871400.CrossRefGoogle Scholar
Weis, P., Aponte, M.V., Laville, A., Mauny, M. and Suárez, A. (1990) The CAML reference manual. Technical Report 121, INRIA, Roquencourt B.P.105 - 78153 Le Chesnay Cedex - France, 09.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.
You have Access
11
Cited by

Save article to Kindle

To save this article to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Deciding type isomorphisms in a type-assignment framework
Available formats
×

Save article to Dropbox

To save this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

Deciding type isomorphisms in a type-assignment framework
Available formats
×

Save article to Google Drive

To save this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

Deciding type isomorphisms in a type-assignment framework
Available formats
×
×

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *