Abstract
Finite subtype inference occupies a middle ground between Hindley-Milner type inference (as in ML) and subtype inference with recursively constrained types. It refers to subtype inference where only finite types are allowed as solutions. This approach avoids some open problems with general subtype inference, and has practical motivation where recursively constrained types are not appropriate. This paper presents algorithms for finite subtype inference, including checking for entailment of inferred types against explicitly declared polymorphic types. This resolves for finite types a problem that is still open for recursively constrained types. Some motivation for this work, particularly for finite types and explicit polymorphism, is in providing subtype inference for first-class container objects with polymorphic methods.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Martin Abadi and Luca Cardelli. A Theory of Objects. Springer-Verlag, July 1996.
A. Aiken and E. Wimmers. Solving systems of set constraints. In Proceedings of IEEE Symposium on Logic in Computer Science, pages 329–340, June 1992.
A. Aiken and E. Wimmers. Type inclusion constraints and type inference. In Proceedings of ACM Symposium on Functional Programming and Computer Architecture, pages 31–41, Copenhagen, Denmark, June 1993.
Francois Bourdoncle and Stephan Merz. Type checking higher-order polymorphic multimethods. In Proceedings of ACM Symposium on Principles of Programming Languages, 1997.
Dominic Duggan. Object type constructors. In preparation. A preliminary version appeared in the Workshop on Foundations of Object-Oriented Languages, New Brunswick, New Jersey, July 1996.
Dominic Duggan. Unification with extended patterns. Theoretical Computer Science, 1997. To appear.
Jonathan Eifrig, Scott Smith, and V. Trifonov. Type inference for recursively constrained types and its application to oop. In Proceedings of the Conference on Mathematical Foundations of Programming Semantics, Lecture Notes in Computer Science. Springer-Verlag, 1995. To appear.
Cormac Flanagan and Matthias Felleisen. Componential set-based analysis. In Proceedings of ACMSIG-PLAN Conference on Programming Language Design and Implementation, 1997.
You-Chin Fuh and Prateek Mishra. Type inference with subtypes. Theoretical Computer Science, 73:155–175, 1990.
Mark Jones. First-class polymorphism with type inference. In Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, January 1997.
Xavier Leroy and Michel Mauny. Dynamics in ML. Journal of Functional Programming, 3(4):431–463, 1993.
Patrick Lincoln and John C. Mitchell. Algorithmic aspects of type inference with subtypes. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 293–304. ACM Press, 1992.
Dale Miller. Unification under a mixed prefix. Journal of Symbolic Computation, 14:321–358, 1992.
Robin Milner. A theory of type polymorphism in programming. Journal of Computer and Systems Sciences, 17:343–378, 1978.
John C. Mitchell. Type inference with simple subtypes. Journal of Functional Programming, 1(3):245–286, July 1991.
Martin Odersky and Konstantin Läufer. Putting type annotations to work. In Proceedings of ACM Symposium on Principles of Programming Languages, 1996.
Jens Palsberg. Efficient inference of object types. In Proceedings of IEEE Symposium on Logic in Computer Science, pages 186–195, Paris, France, July 1994. IEEE.
Benjamin Pierce and David Turner. Local type inference. In Proceedings of ACM Symposium on Principles of Programming Languages, San Diego, California, January 1998. ACM Press.
Francois Pottier. Simplifying subtyping constraints. In Proceedings of ACM International Conference on Functional Programming, Philadelpha, Pennsylvania, May 1996. ACM Press.
Didier Rémy. Programming objects with ML-ART: An extension to ml with abstract and record types. In Masami Hagiya and John C. Mitchell, editors, International Symposium on Theoretical Aspects of Computer Software, pages 321–346, Sendai, Japan, April 1994. Springer-Verlag.
Marvin Solomon. Type definitions with parameters. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 31–38. ACM Press, 1978.
Valery Trifonov and Scott Smith. Subtyping constrained types. In Static Analysis Symposium, number 1145 in LNCS, pages 349–365, 1996.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Duggan, D. (1998). Finite Subtype Inference with Explicit Polymorphism. In: Levi, G. (eds) Static Analysis. SAS 1998. Lecture Notes in Computer Science, vol 1503. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49727-7_18
Download citation
DOI: https://doi.org/10.1007/3-540-49727-7_18
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65014-0
Online ISBN: 978-3-540-49727-1
eBook Packages: Springer Book Archive