ACM Home Page
Please provide us with feedback. Feedback
Lower bounds on type inference with subtypes
Full text PdfPdf (1.06 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
San Francisco, California, United States
Pages: 176 - 185  
Year of Publication: 1995
ISBN:0-89791-692-1
Authors
My Hoang  Computer Science Department, Stanford University, Stanford, CA
John C. Mitchell  Computer Science Department, Stanford University, Stanford, CA
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 4,   Downloads (12 Months): 22,   Citation Count: 10
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/199448.199481
What is a DOI?

ABSTRACT

We investigate type inference for programming languages with subtypes. As described in previous work, there are several type inference problems for any given expression language, depending on the form of the subtype partial order and the ability to define new subtypes in programs. Our first main result is that for any specific subtype partial order, the problem of determining whether a lambda term is typable is algorithmically (polynomial-time) equivalent to a form of satisfiability problem over the same partial order. This gives the first exact characterization of the problem that is independent of the syntax of expressions. In addition, since this form of satisfiability problem is PSPACE-hard over certain partial orders, this equivalence strengthens the previous lower bound of NP-hard to PSPACE-hard. Our second main result is a lower bound on the length of most general types when the subtype hierarchy may change as a result of additional type declarations within the program. More specifically, given any input expression, a type inference algorithm tries to find a most general (or principal) typing. The property of a most general typing is that it has all other possible typings as instances. However, there are several sound notions of instance in the presence of subtyping. Our lower bound is that no sound definition of instance would allow the set of additional subtyping hypotheses about a term to grow less than linearly in the size of the term.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
ASU86
 
Ben94
M. Benke. Efficient type reconstruction in the presence of inheritance. Manuscript, 1994.
 
FM89
 
FM90
 
GMW79
M.J. Gordon, R. Milner, and C.P. Wadsworth. Edinburgh LCF. Springer LNCS 78, Berlin, 1979.
H+92
HF92
LM92
 
Mil85
R. Milner. The Standard ML core language. Polymorphism, 2(2), 1985. 28 pages. An earlier version appeared in Proc. 1984 ACM Symp. on Lisp and Functional Programming.
Mit84
 
Mit91a
J.C. Mitchell. A simple reduction of unification to typability. Message to types@theory.lcs.mit.edu, June 28 1991.
 
Mit91b
J.C. Mitchell. Type inference with simple subtypes. J. Functional Programming, 1(3):245-286, 1991.
 
PT91
V. Pratt and J. Tiuryn. Satisfiability of inequations in a poset. Manuscript, October 1991.
 
Tiu91
J. Tiuryn. Solving term inequalities is PSPACE- hard. Manuscript, October 1991.
 
Tiu92
J. Tiuryn. Subtype inequalities. In Proc. IEEE Symp. on Logic in Computer Science, pages 308- 315, 1992.
 
Tur85
 
Tys88
J. Tyszkiewicz. Complexity of type inference in finitely typed lambda calculus. Master's thesis, University of Warsaw, 1988.
 
Wan87
M. Wand. A simple algorithm and proof for type inference. Fundamenta Informaticae, 10:115-122, 1987.
WO89

CITED BY  10

Collaborative Colleagues:
My Hoang: colleagues
John C. Mitchell: colleagues