arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0003062cs.LOcs.PL
收藏

逻辑框架下的高阶抽象推理

Reasoning with Higher-Order Abstract Syntax in a Logical Framework

Raymond C. McDowell, Dale A. Miller

摘要:

基于具有更高类型量化的直觉或线性逻辑的逻辑框架已成功地用于对程序设计语言和推理系统领域中的许多重要判断给出高级、模块化和形式化的规范。给定这样的规范,考虑证明框架中指定系统的属性是很自然的:例如,给定函数式程序设计语言的求值规范,证明该语言是确定性的或求值保留类型。开发这种推理框架的一个挑战是高阶抽象语法(HOAS),一种优雅的和声明性的对象级抽象和替换处理,很难在涉及归纳的证明中处理。在本文中,我们提出了一个元逻辑,可用于推理使用HOAS编码的判断,这个元逻辑是一个简单的直觉主义逻辑,承认高阶量化简单类型的非线性项(HOAS的关键成分),以及归纳和定义的概念的扩展。我们通过考虑直觉和线性逻辑的编码,探讨了HOAS编码的形式元理论分析的困难,并正式推导出这些逻辑的重要子集的割的容许性。然后,我们提出了一种方法,以避免高阶抽象语法的好处和分析所产生的编码的能力之间的明显的权衡。我们通过涉及简单函数式和命令式程序设计语言PCF和PCF:=的示例来说明这种方法。我们正式推导出这样的属性,作为唯一性的类型,主题减少,确定性的评价,和等价的过渡语义和自然语义表示的评价。

英文摘要:

Logical frameworks based on intuitionistic or linear logics with higher-type quantification have been successfully used to give high-level, modular, and formal specifications of many important judgments in the area of programming languages and inference systems. Given such specifications, it is natural to consider proving properties about the specified systems in the framework: for example, given the specification of evaluation for a functional programming language, prove that the language is deterministic or that evaluation preserves types. One challenge in developing a framework for such reasoning is that higher-order abstract syntax (HOAS), an elegant and declarative treatment of object-level abstraction and substitution, is difficult to treat in proofs involving induction. In this paper, we present a meta-logic that can be used to reason about judgments coded using HOAS; this meta-logic is an extension of a simple intuitionistic logic that admits higher-order quantification over simply typed lambda-terms (key ingredients for HOAS) as well as induction and a notion of definition. We explore the difficulties of formal meta-theoretic analysis of HOAS encodings by considering encodings of intuitionistic and linear logics, and formally derive the admissibility of cut for important subsets of these logics. We then propose an approach to avoid the apparent tradeoff between the benefits of higher-order abstract syntax and the ability to analyze the resulting encodings. We illustrate this approach through examples involving the simple functional and imperative programming languages PCF and PCF:=. We formally derive such properties as unicity of typing, subject reduction, determinacy of evaluation, and the equivalence of transition semantics and natural semantics presentations of evaluation.

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

↑