A Polymorphic Environment Calculus and its Type-Inference Algorithm
A Polymorphic Environment Calculus and its Type-Inference Algorithm
复制标题
多态环境演算及其类型推断算法
DOI:
10.1023/a:1010010314528
复制
发表时间:
2000
期刊:
影响因子:
--
通讯作者:
S. Nishizaki
中科院分区:
文献类型:
--
作者:
S. Nishizaki
The polymorphic environment calculus is a polymorphic lambda calculus which enables us to treat environments as first-class citizens. In the calculus, environments are formalized as explicit substitutions, and the substitutions are included in the set of terms of the calculus. First, we introduce an untyped environment calculus, and we present a semantics of the calculus as a translation into the lambda calculus. Second, we propose a polymorphic type system for the environment calculus based on Damas-Milner's ML-polymorphic type system. In ML, polymorphism is allowed only in let-expressions; in the polymorphic environment calculus, polymorphism is provided with environment compositions. We prove a subject-reduction theorem for the type system. Third, a type-inference algorithm is given to the polymorphic environment calculus, and we establish its soundness, termination, and principal-typing theorem.