Proceedings of the 2007 Workshop on Workshop on ML 2007
DOI: 10.1145/1292535.1292538
|View full text |Cite
|
Sign up to set email alerts
|

Efficient type inference using ranked type variables

Abstract: The Damas-Milner type inference algorithm (commonly known as algorithm W) is at the core of all ML type checkers. Although the algorithm is known to have poor worst-case behavior [8], in practice well-engineered type checkers will run in approximately linear time. To achieve this efficiency, implementations need to improve on algorithm W's method of scanning the complete type environment to determine whether a type variable can be generalized at a let binding. Following a suggestion of Damas, most ML type chec… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1

Citation Types

0
4
0

Year Published

2008
2008
2014
2014

Publication Types

Select...
3
3

Relationship

0
6

Authors

Journals

citations
Cited by 8 publications
(4 citation statements)
references
References 14 publications
0
4
0
Order By: Relevance
“…(If the initial program is block-structured, just lambda-lift it [39].) This combination of transformations can also be used for deriving or relating programs [24,26,60] and is used today, e.g., for web programming [32] and for type inference [43].…”
Section: Discussionmentioning
confidence: 99%
“…(If the initial program is block-structured, just lambda-lift it [39].) This combination of transformations can also be used for deriving or relating programs [24,26,60] and is used today, e.g., for web programming [32] and for type inference [43].…”
Section: Discussionmentioning
confidence: 99%
“…Let us just emphasize that it is is modular: (a) at the lowest layer lies Tarjan's efficient union-find algorithm [23]; (b) above it, one finds Huet's first-order unification algorithm [9]; (c) then comes the treatment of generalization and instantiation, which exploits Rémy's integer ranks [20,12,11] to efficiently determine which type variables must be generalized; (d) the last layer interprets the syntax of constraints. The solver meets McAllester asymptotic time bound [12]: under the assumption that all of the type schemes that are ever constructed have bounded size, its time complexity is O(nk), where n is the size of the constraint and k is the left-nesting depth of CLet nodes.…”
Section: Low-level Interfacementioning
confidence: 99%
“…We lack space to describe the implementation of the low-level solver, and it is, anyway, beside the point of the paper. Let us just emphasize that it is is modular: (a) at the lowest layer lies Tarjan's efficient union-find algorithm [23]; (b) above it, one finds Huet's first-order unification algorithm [9]; (c) then comes the treatment of generalization and instantiation, which exploits Rémy's integer ranks [20,12,11] to efficiently determine which type variables must be generalized; (d) the last layer interprets the syntax of constraints. The solver meets McAllester asymptotic time bound [12]: under the assumption that all of the type schemes that are ever constructed have bounded size, its time complexity is O(nk), where n is the size of the constraint and k is the left-nesting depth of CLet nodes.…”
Section: Low-level Interfacementioning
confidence: 99%