arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 1808.04006cs.PL
收藏

构造演算的类型闭包转换

Typed Closure Conversion for the Calculus of Constructions

William J. Bowman, Amal Ahmed

摘要:

依赖类型语言(如Coq)用于指定和验证源程序的完整功能正确性。类型保持编译可用于通过编译到生成的目标语言程序中来保持这些规范和正确性证明。不幸的是,依赖类型的类型保持编译是困难的。本质上,问题在于依赖类型系统是围绕高级组合抽象来设计的,以决定类型检查,但编译会干扰类型系统规则来推理运行时术语。我们开发了一个类型保持闭包转换的翻译从构造演算(CC)与强依赖对($Σ$类型)-一个子集的核心语言Coq-到一个类型安全的,依赖类型的编译器中间语言命名为CC-CC。在这项工作中的核心挑战是如何翻译的源类型系统的规则推理功能到目标类型系统的规则推理闭包。为了证明这些规则的合理性,我们通过在CC中给出一个模型来证明CC-CC的可靠性。除了类型保持,我们证明了分离编译的正确性。

英文摘要:

Dependently typed languages such as Coq are used to specify and verify the full functional correctness of source programs. Type-preserving compilation can be used to preserve these specifications and proofs of correctness through compilation into the generated target-language programs. Unfortunately, type-preserving compilation of dependent types is hard. In essence, the problem is that dependent type systems are designed around high-level compositional abstractions to decide type checking, but compilation interferes with the type-system rules for reasoning about run-time terms. We develop a type-preserving closure-conversion translation from the Calculus of Constructions (CC) with strong dependent pairs ($Σ$ types)---a subset of the core language of Coq---to a type-safe, dependently typed compiler intermediate language named CC-CC. The central challenge in this work is how to translate the source type-system rules for reasoning about functions into target type-system rules for reasoning about closures. To justify these rules, we prove soundness of CC-CC by giving a model in CC. In addition to type preservation, we prove correctness of separate compilation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑