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.
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 5.Kim B. Bruce, Angela Schuett, and Robert van Gent. Poly- TOIL: A type-safe polymorphic object-oriented language. In ECOOP '95, 1995. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 8.Giuseppe Castagna. Covariance and contravariance: conflict without a cause. A CM Transactions on Programmzng Languages and Systems, 17(3), 1995. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarCross Ref
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 16.R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348-375, 1978.Google ScholarCross Ref
- 17.R. Milner, M. Torte, and R. Harper. The Definition o/Standard ML. MIT Press, 1990. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 21.J. Palsberg and M. Schwartzbach. Object-Oriented Type Systems. Wiley, 1994. Google ScholarDigital Library
- 22.Jens Palsberg and Michael I. Schwartzbach. Safety analysis versus type inference for partial types. Information Processing Letters, pages 175-180, 1992. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 Scholar
- 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 ScholarCross Ref
- 27.M. Tofte. Type inference for polymorphic references. Information and Computation, 89:1-34, 1990. Google ScholarDigital Library
- 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 Scholar
Index Terms
Sound polymorphic type inference for objects
Recommendations
Sound polymorphic type inference for objects
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 ...
Polymorphic type inference
POPL '83: Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languagesThe benefits of strong typing to disciplined programming, to compile-time error detection and to program verification are well known. Strong typing is especially natural for functional (applicative) languages, in which function application is the central ...
Type checking and inference for polymorphic and existential types
CATS '09: Proceedings of the Fifteenth Australasian Symposium on Computing: The Australasian Theory - Volume 94This paper proves undecidability of type checking and type inference problems in some variants of typed lambda calculi with polymorphic and existential types. First, type inference in the domain-free polymorphic lambda calculus is proved to be ...
Comments