skip to main content
10.1145/217838.217858acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article
Free Access

Sound polymorphic type inference for objects

Authors Info & Claims
Published:17 October 1995Publication History

ABSTRACT

A polymorphic, constraint-based type inference algorithm for an object-oriented language is defined. A generalized form of type, polymorphic recursively constrained types, are inferred. These types are expressive enough for typing objects, since they generalize recursive types and F-bounded polymorphism. The well-known tradeoff between inheritance and subtyping is mitigated by the type inference mechanism. Soundness and completeness of type inference are established.

References

  1. 1.M. Abadi and L. Cardelli. A semantics of object types. In Proceedings of the Ninth Annual IEEE Symposium on Logic in Computer Science, pages 332-341, 1994.Google ScholarGoogle ScholarCross RefCross Ref
  2. 2.A. Aiken and E. L. Wimmers. Type inclusion constraints and type inference. In Proceedings of the International Conference on Functional Programming Languages and Computer Architecture, pages 31-41, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.K. B. Bruce, J. Crabtree. T. P. Murtagh, R. van Gent, A. Dimock, and R. Muller. Safe and decidable type checking in an object-oriented language. In OOPSLA '93 Conference Proceedings, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.Kim Bruce, Luca Cardelli, Giuseppe Castagna, The Hopkins Objects Group, Gary T. Leavens, and Benjamin Pierce. On binary methods. Technical Report TR95-08, Department of Computer Science, Iowa State University, Ames, Iowa 50011-1040 USA. ftp://ftp.cs.iastate.edu/ pub/techreports/TR95-08/TR.ps. Z. 1995.Google ScholarGoogle Scholar
  5. 5.Kim B. Bruce, Angela Schuett, and Robert van Gent. Poly- TOIL: A type-safe polymorphic object-oriented language. In ECOOP '95, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.P. Canning, W. Cook, W. Hill. J. Mitchell, and W. Olthoff. F- bounded polymorphism for object-oriented programming. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture, pages 273-280, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.L. Cardelli. A semantics of multiple inheritance. In Semantics of Data Types, volume 173 of Lecture notes in Computer Science, pages 51-67. Springer-Verlag, 1984. Google ScholarGoogle ScholarCross RefCross Ref
  8. 8.Giuseppe Castagna. Covariance and contravariance: conflict without a cause. A CM Transactions on Programmzng Languages and Systems, 17(3), 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.William R. Cook, Walter L. Hill, and Peter S. Canning. Inheritance is not subtyping. In Conference Record of the Seventeenth Annual A CM Symposium on Principles of Programming Languages. ACM Press, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.Pavel Curtis. Constrained quantification in polymorphic type analysis. Technical Report CSL-90-1, XEROX Palo Alto Research Center, CSLPubs .pare~xerox. corn, 1990.Google ScholarGoogle Scholar
  11. 11.J. Eifrig, S. Smith, and V. Trifonov. Type inference for recursively constrained types and its application to OOP. In Proceedings of the 1995 Mathematical Foundations of Programming Semantics Conference, volume 1 of Electronic Notes in Theoretical Computer Science. Elsevier, 1995.Google ScholarGoogle ScholarCross RefCross Ref
  12. 12.J. Eifrig, S. Smith, V. Trifonov, and A. Zwarico. Application of OOP type theory: State, decidability, integration. In OOPSLA '9~, pages 16-30, 1994. Google ScholarGoogle Scholar
  13. 13.Daniel H. H. Ingalls. A simple technique for handling multiple polymorphism. In OOPSLA '86 Conference Proceedings, Portland, Oregon, September 1986, volume 21(11), pages 347-349, November 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.S. Kaes. Type inference in the presence of overloading, subtyping and recursive types. In A CM Conference on Lisp and Functional Programming, pages 193-204, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.Samuel N. Kamin and Uday S. Reddy. Two semantic models of object-oriented languages. In Carl A. Gunter and John C. Mitchell, editors, Theoretical Aspects of Object-Oriented Programming, chapter 13, pages 464-495. MIT Press, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348-375, 1978.Google ScholarGoogle ScholarCross RefCross Ref
  17. 17.R. Milner, M. Torte, and R. Harper. The Definition o/Standard ML. MIT Press, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.J. Mitchell. Coercion and type inference (summary). In Conference Record of the Eleventh Annual A CM Symposium on Principles of Programming Languages, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.W. B. Mugridge, J. G. Hosking, and J. Hamer. Multi-methods in a statically-typed programming language. In Pierre America, editor, ECOOP '91 Conference Proceedings, Geneva, Switzerland, volume 512 of Lecture notes in Computer Science. Springer-Verlag, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.N. Oxhc~j, J. Palsberg, and M. I. Schwartzbach. Type inference with subtypes. In ECOOP'92 European Conference on Object-Oriented Programming, volume 615 of Lecture notes in Computer Science, pages 329-349. Springer-Verlag, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.J. Palsberg and M. Schwartzbach. Object-Oriented Type Systems. Wiley, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.Jens Palsberg and Michael I. Schwartzbach. Safety analysis versus type inference for partial types. Information Processing Letters, pages 175-180, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.J. Plevyak and A. Chien. Precise concrete type inference for object-oriented languages. In Proceedings of the Ninth Annual A CM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 324-340, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.J. C. Reynolds. Three approaches to type structure. In TAP- SOFT proceedings, volume 185 of Lecture notes in Computer Science, pages 97-138, 1985. Google ScholarGoogle Scholar
  25. 25.T. Sekiguchi and A. Yonezawa. A complete type inference system for subtyped recursive types. In Proc. Theoretical Aspects of Computer Software, volume 789 of Lecture Notes zn Computer Science, pages 667-686. Springer-Verlag, 1994. Google ScholarGoogle Scholar
  26. 26.Jean-Pierre Talpin and Pierre Jouvelot. The type and effect discipline. In Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science, pages 162-173. IEEE, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  27. 27.M. Tofte. Type inference for polymorphic references. Information and Computation, 89:1-34, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.Mitchell Wand. Complete type inference for simple objects. In Proceedings of the Second Annual IEEE Symposium on Logic in Computer Science, pages 37-44. IEEE, 1987.Google ScholarGoogle Scholar

Index Terms

  1. Sound polymorphic type inference for objects

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        OOPSLA '95: Proceedings of the tenth annual conference on Object-oriented programming systems, languages, and applications
        October 1995
        496 pages
        ISBN:0897917030
        DOI:10.1145/217838

        Copyright © 1995 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 17 October 1995

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate268of1,244submissions,22%

        Upcoming Conference

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader