ACM Home Page
Please provide us with feedback. Feedback
Algorithmic aspects of type inference with subtypes
Full text PdfPdf (1.29 MB)
Source Annual Symposium on Principles of Programming Languages archive
Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Albuquerque, New Mexico, United States
Pages: 293 - 304  
Year of Publication: 1992
ISBN:0-89791-453-8
Authors
Sponsors
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 3,   Downloads (12 Months): 15,   Citation Count: 11
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/143165.143227
What is a DOI?

ABSTRACT

We study the complexity of type inference for programming languages with subtypes. There are three language variations that effect the problem: (i) basic functions may have polymorphic or more limited types, (ii) the subtype hierarchy may be fixed or vary as a result of subtype declarations within a program, and (iii) the subtype hierarchy may be an arbitrary partial order or may have a more restricted form, such as a tree or lattice. The naive algorithm for infering a most general polymorphic type, undervariable subtype hypotheses, requires deterministic exponential time. If we fix the subtype ordering, this upper bound grows to nondeterministic exponential time. We show that it is NP-hard to decide whether a lambda term has a type with respect to a fixed subtype hierarchy (involving only atomic type names). This lower bound applies to monomorphic or polymorphic languages. We give PSPACE upper bounds for deciding polymorphic typability if the subtype hierarchy has a lattice structure or the subtype hierarchy varies arbitrarily. We also give a polynomial time algorithm for the limited case where there are of no function constants and the type hierarchy is either variable or any fixed lattice.


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.

 
FM90
 
Hin89
 
Jat89
L. Jategaonkar. ML with extended pattern matching and subtypes. Master's thesis, MIT, 1989.
JM88
 
KMM91
P.C. Kanell~kis, H.G. Mairson, and J.C. Mitchell. Unification and ML type reconstruction. In Computational Logic, essays in honor of Alan Robinson, page to appear. MIT Press, 1991.
 
Mey88
Mit84
 
Mit91
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 poser. Manuscript, October 1991.
 
PW78
M.S. Paterson and M.N. Wegman. Linear unification. JCSS, 16:158-167, 1978.
 
Str86
 
Tiu91
J. Tiuryn. Solving term inequalities is PSPACE- hard. Manuscript, October 1991.
 
Wan87
M. Wand. A simple algorithm and proof for type inference. Fundamcnta Informaticae, 10:115-122, 1987.
 
Wan91
M. Wand. Personal communication, 1991.
WO89

CITED BY  11

Collaborative Colleagues:
Patrick Lincoln: colleagues
John C. Mitchell: colleagues