Unification and ML Type Reconstruction

Computer Languages, Systems & Structures(1991)

引用 72|浏览76
暂无评分
摘要
We study the complexity of type reconstruction for a core fragment of ML with lambda abstraction, function application, and the polymorphic let declaration. We derive exponential upper and lower bounds on recognizing the typable core ML expressions. Our primary technical tool is unification of succinctly represented type expressions. After observing that core ML expressions, of size $n$, can be typed in $ DTIME( 2^n) $, we exhibit two different families of programs whose principal types grow exponentially. We show how to exploit the expressiveness of the let-polymorphism in these constructions to derive lower bounds on deciding typability: one leads naturally to NP-hardness and the other to $ DTIME( 2 ^ {n ^ k} )$-hardness of each integer $k~\geq~1$. Our generic simulation of any exponential-time Turing machine by ML type reconstruction may be viewed as a nonstandard way of computing with types. Our worst-case lower bounds stand in contrast to practical experience, which suggests that commonly used algorithms for type reconstruction do not slow compilation substantially.
更多
查看译文
关键词
core fragment,ml type reconstruction,different family,core ml expression,principal type,typable core ml expression,lower bound,worst-case lower bound,type reconstruction,type expression,upper and lower bounds,polymorphism
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要