Formalizing a Correctness Property of a Type-Directed Partial Evaluator
Formalizing a Correctness Property of a Type-Directed Partial Evaluator
复制标题
形式化类型导向部分求值器的正确性属性
DOI:
10.1145/2541568.2541572
复制
发表时间:
2014
期刊:
影响因子:
--
通讯作者:
Noriko Hirota and Kenichi Asai
中科院分区:
文献类型:
--
作者:
A.K.M. Mahfuzul Islam;Tohru Ishihara;and Hidetoshi Onodera;清水直;Noriko Hirota and Kenichi Asai
This paper presents our experience of formalizing Danvy's type-directed partial evaluator (TDPE) for the call-by-name lambda calculus in the proof assistant Coq. Following the previous approach by Coquand and Ilik, we characterize TDPE as a composition of completeness and soundness theorems of typing rules with respect to the semantics. To show the correctness property of TDPE (i.e., TDPE preserves semantics), we further define a logical relation between residualizing and standard semantics, following Filinski. The use of parametric higher-order abstract syntax (PHOAS) leads to a simple formalization without being disturbed by fresh names created during TDPE. Because of the higher-order nature of PHOAS, it also requires us to prove manually a core property that corresponds to the main lemma of logical relations, which appears to be difficult to prove in Coq.