arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1005.4379cs.LO
收藏

实现依赖类型逻辑程序设计的元程序设计方法

A Meta-Programming Approach to Realizing Dependently Typed Logic Programming

Zachary Snow, David Baelde, Gopalan Nadathur

摘要:

依赖类型的lambda演算(如逻辑框架(LF))可以编码类型中术语之间的关系,并且可以自然地捕获公式及其证明之间的对应关系。这样的演算也可以给出一个逻辑编程的解释:LLF系统就是基于这样一个LF的解释。我们在这里考虑是否一个传统的逻辑程序设计语言可以提供一个类似的系统编码类型和证明和公式依赖的好处。特别是,我们提出了一个简单的映射从LF规范的一组公式在高阶遗传Harrop(hohh)语言,涉及推导和证明搜索之间的两个框架。然后,我们表明,这种编码可以通过利用知识的原始LF规范的良好形式,以消除大量冗余的类型检查信息。所得到的逻辑程序具有与原始规范非常相似的结构,从而允许将LF规范视为hohh元程序。使用Teyjus实现的PrologaProlog,我们表明,我们的翻译提供了一个有效的手段执行LF规范,补充的能力,PrologaProlog系统提供的推理。

英文摘要:

Dependently typed lambda calculi such as the Logical Framework (LF) can encode relationships between terms in types and can naturally capture correspondences between formulas and their proofs. Such calculi can also be given a logic programming interpretation: the Twelf system is based on such an interpretation of LF. We consider here whether a conventional logic programming language can provide the benefits of a Twelf-like system for encoding type and proof-and-formula dependencies. In particular, we present a simple mapping from LF specifications to a set of formulas in the higher-order hereditary Harrop (hohh) language, that relates derivations and proof-search between the two frameworks. We then show that this encoding can be improved by exploiting knowledge of the well-formedness of the original LF specifications to elide much redundant type-checking information. The resulting logic program has a structure that closely resembles the original specification, thereby allowing LF specifications to be viewed as hohh meta-programs. Using the Teyjus implementation of lambdaProlog, we show that our translation provides an efficient means for executing LF specifications, complementing the ability that the Twelf system provides for reasoning about them.

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

↑