Skip to main content

Finite Subtype Inference with Explicit Polymorphism

  • Conference paper
  • First Online:
Static Analysis (SAS 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1503))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Martin Abadi and Luca Cardelli. A Theory of Objects. Springer-Verlag, July 1996.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. Francois Bourdoncle and Stephan Merz. Type checking higher-order polymorphic multimethods. In Proceedings of ACM Symposium on Principles of Programming Languages, 1997.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. Dominic Duggan. Unification with extended patterns. Theoretical Computer Science, 1997. To appear.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. Cormac Flanagan and Matthias Felleisen. Componential set-based analysis. In Proceedings of ACMSIG-PLAN Conference on Programming Language Design and Implementation, 1997.

    Google Scholar 

  9. You-Chin Fuh and Prateek Mishra. Type inference with subtypes. Theoretical Computer Science, 73:155–175, 1990.

    Article  MATH  MathSciNet  Google Scholar 

  10. Mark Jones. First-class polymorphism with type inference. In Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, January 1997.

    Google Scholar 

  11. Xavier Leroy and Michel Mauny. Dynamics in ML. Journal of Functional Programming, 3(4):431–463, 1993.

    Article  Google Scholar 

  12. 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.

    Google Scholar 

  13. Dale Miller. Unification under a mixed prefix. Journal of Symbolic Computation, 14:321–358, 1992.

    Article  MATH  MathSciNet  Google Scholar 

  14. Robin Milner. A theory of type polymorphism in programming. Journal of Computer and Systems Sciences, 17:343–378, 1978.

    Article  MathSciNet  Google Scholar 

  15. John C. Mitchell. Type inference with simple subtypes. Journal of Functional Programming, 1(3):245–286, July 1991.

    Google Scholar 

  16. Martin Odersky and Konstantin Läufer. Putting type annotations to work. In Proceedings of ACM Symposium on Principles of Programming Languages, 1996.

    Google Scholar 

  17. 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.

    Google Scholar 

  18. 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.

    Google Scholar 

  19. Francois Pottier. Simplifying subtyping constraints. In Proceedings of ACM International Conference on Functional Programming, Philadelpha, Pennsylvania, May 1996. ACM Press.

    Google Scholar 

  20. 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.

    Google Scholar 

  21. Marvin Solomon. Type definitions with parameters. In Proceedings of ACM Symposium on Principles of Programming Languages, pages 31–38. ACM Press, 1978.

    Google Scholar 

  22. Valery Trifonov and Scott Smith. Subtyping constrained types. In Static Analysis Symposium, number 1145 in LNCS, pages 349–365, 1996.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics