Abstract
Constructor subtyping is a form of subtyping in which an inductive type σ is viewed as a subtype of another inductive type τ if τ has more constructors than σ. As suggested in [5,12], its (potential) uses include proof assistants and functional programming languages.
In this paper, we introduce and study the properties of a simply typed λ-calculus with record types and datatypes, and which supports record subtyping and constructor subtyping. In the first part of the paper, we show that the calculus is confluent and strongly normalizing. In the second part of the paper, we show that the calculus admits a well-behaved theory of canonical inhabitants, provided one adopts expansive extensionality rules, including η-expansion, surjective pairing, and a suitable expansion rule for datatypes. Finally, in the third part of the paper, we extend our calculus with unbounded recursion and show that confluence is preserved.
Chapter PDF
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
M. Abadi and L. Cardelli. A theory of objects. Springer-Verlag, 1996.
H. Barendregt. The Lambda Calculus: Its Syntax and Semantics, volume 103 of Studies in Logic and the Foundations of Mathematics. North-Holland, revised edition, 1984.
H. Barendregt.The impact of the lambda calculus in logic and computer science. Bulletin of Symbolic Logic, 3(2):181–215, June 1997.
B. Barras et. al. The Coq Proof Assistant User’s Guide. Version 6.2, May 1998.
G. Barthe. Order-sorted inductive types. Information and Computation, 199x. To appear.
G. Barthe and M.J. Frade. Constructor subtyping. Technical Report UMDITR9807, Department of Computer Science, University of Minho, 1998.
G. Betarte. Dependent Record Types and Algebraic Structures in Type Theory. PhD thesis, Department of Computer Science, Chalmers Tekniska Högskola, 1998.
L. Cardelli. Type systems. ACM Computing Surveys, 28(1):263–264, March 1996.
L. Cardelli and P. Wegner. On understanding types, data abstraction and polymorphism. ACM Computing Surveys, 17(4):471–522, December 1985.
G. Castagna, G. Ghelli, and G. Longo. A calculus for overloaded functions with subtyping. Information and Computation, 117(1):115–135, February 1995.
A. Compagnoni and H. Goguen. Typed operational semantics for higher order subtyping. Technical Report ECS-LFCS-97-361, University of Edinburgh, July 1997.
T. Coquand. Pattern matching with dependent types. In B. Nordstr öm, editor, Informal proceedings of Logical Frameworks’92, pages 66–79, 1992.
R. Di Cosmo. A brief history of rewriting with extensionality. Presented at the International Summer School on Type Theory and Term Rewriting, Glasgow, September 1996.
R. Di Cosmo and D. Kesner. Simulating expansions without expansions. Mathematical Structures in Computer Science, 4(3):315–362, September 1994.
E. Emerson. Temporal and modal logic. In J. van Leeuwen, editor, Handbook of theoretical computer science, volume B, pages 995–1072. Elsevier Publishing, 1990.
N. Ghani. Adjoint rewriting. PhD thesis, Laboratory for the Foundations of Computer Science, University of Edinburgh, 1995.
E. Gim énez. Structural recursive definitions in Type Theory. In K.G. Larsen, S. Skyum, and G. Winskel, editors, Proceedings of ICALP'98, volume 1443 of Lecture Notes in Computer Science, pages 397–408. Springer-Verlag, 1998.
J. Goguen and R. Diaconescu. An Oxford survey of order sorted algebra. Mathematical Structures in Computer Science, 4(3):363–392, September 1994.
H. Hosoya, B. Pierce, and D.N. Turner. Subject reduction fails in Java. Message to the TYPES mailing list, 1998.
C.B. Jay and N. Ghani. The virtues of eta-expansion. Journal of Functional Programming, 5(2):135–154, April 1995.
M.P. Jones. Dictionary-free overloading by partial evaluation. In Proceedings of PEP’94, pages 107–117, 1994. University of Melbourne, Australia, Department of Computer Science, Technical Report 94/9.
G. Kahn. Natural semantics. In Proceedings of the Symposium on Theoretical Aspects of Computer Science, volume 247 of Lecture Notes in Computer Science, pages 22–39. Springer-Verlag, 1987.
J.-J. Lévy. An algebraic interpretation of the λβΚ-calculus and a labelled λ-calculus. Theoretical Computer Science, 2:97–114, 1976.
Z. Luo. Coercive subtyping. Journal of Logic and Computation, 199x. To appear.
S. Marlow and P. Wadler. A practical subtyping system for Erlang. In Proceedings of ICFP’97, pages 136–149. ACM Press, 1997.
R. Milner, M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML (Revised). The MIT Press, 1997.
J. C. Mitchell, M. Hoang, and B. T. Howard. Labelling techniques and typed fixedpoint operators. In A.D. Gordon and A.M. Pitts, editors, Higher Order Operational Techniques in Semantics, pages 137–174. Cambridge University Press, 1998.
J. Peterson and K. Hammond (editors). Haskell 1.4.: A Non-strict, Purely Functional Language, April 1997.
F. Pfenning. Refinement types for logical frameworks. In H. Geuvers, editor, Informal Proceedings of TYPES’93, pages 285–299, 1993.
B.C. Pierce and D.N. Turner. Local type inference. In Proceedings of POPL’98, pages 252–265. ACM Press, 1998.
F. Pottier. Synthèse de types en présence de sous-typage: de la théorie la pratique. PhD thesis, Universit é Paris VII, 1998.
N. Shankar, S. Owre, and J.M. Rushby. The PVS Proof Checker: A Reference Manual. Computer Science Laboratory, SRI International, February 1993. Supplemented with the PVS2 Quick Reference Manual, 1997
H. Xi and F. Pfenning. Dependent types in practical programming. In Proceedings of POPL’99. ACM Press, 1999. To appear.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Barthe, G., Frade, M.J. (1999). Constructor Subtyping. In: Swierstra, S.D. (eds) Programming Languages and Systems. ESOP 1999. Lecture Notes in Computer Science, vol 1576. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49099-X_8
Download citation
DOI: https://doi.org/10.1007/3-540-49099-X_8
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65699-9
Online ISBN: 978-3-540-49099-9
eBook Packages: Springer Book Archive