A logical algorithm for ML type inference

被引:0
|
作者
McAllester, D [1 ]
机构
[1] Toyota Technol Inst, Chicago, IL USA
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper gives a bottom-up logic programming formulation of the Hindley-Milner polymorphic type inference algorithm. We show that for programs of bounded order and arity the given algorithm runs in O(nalpha(n) + dn) time where n is the length of the program, d is the "scheme depth" of the program, and alpha is the inverse of Ackermann's function. It is argued that for practical programs d will not exceed 5 even for programs with hundreds of module layers. This formulation of the Hindley-Milner algorithm is intended as a case study in "logical algorithms", i.e., algorithms presented and analyzed as bottom-up inference rules.
引用
收藏
页码:436 / 451
页数:16
相关论文
共 50 条