Local type inference

Citation
Bc. Pierce et Dn. Turner, Local type inference, ACM T PROGR, 22(1), 2000, pp. 1-44
Citations number
55
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
ISSN journal
01640925 → ACNP
Volume
22
Issue
1
Year of publication
2000
Pages
1 - 44
Database
ISI
SICI code
0164-0925(200001)22:1<1:LTI>2.0.ZU;2-C
Abstract
We study two partial type inference methods for a language combining subtyp ing and impredicative polymorphism. Both methods are local in the sense tha t missing annotations are recovered using only information from adjacent no des in the syntax tree, without long-distance constraints such as unificati on variables. One method infers type arguments in polymorphic applications using a local constraint solver. The other infers annotations on bound vari ables in function abstractions by propagating type constraints downward fro m enclosing application nodes. We motivate our design choices by a statisti cal analysis of the uses of type inference in a sizable body of existing ML code.