Local type inference 论文

2000ACM Transactions on Programming Languages and Systems引用 282
Natural Language Processing TechniquesLogic, programming, and type systemsSoftware Engineering Research

详细信息

发表期刊/会议
ACM Transactions on Programming Languages and Systems
发表日期
2000-01-01
发表年份
2000

关键词

Natural Language Processing TechniquesLogic, programming, and type systemsSoftware Engineering Research

摘要

We study two partial type inference methods for a language combining subtyping and impredicative polymorphism. Both methods are local in the sense that missing annotations are recovered using only information from adjacent nodes in the syntax tree, without long-distance constraints such as unification variables. One method infers type arguments in polymorphic applications using a local constraint solver. The other infers annotations on bound variables in function abstractions by propagating type constraints downward from enclosing application nodes. We motivate our design choices by a statistical analysis of the uses of type inference in a sizable body of existing ML code.