当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
A Type Checker for a Logical Framework with Union and Intersection Types
arXiv - CS - Programming Languages Pub Date : 2020-02-25 , DOI: arxiv-2002.10803
Luigi Liquori and Claude Stolze

We present the syntax, semantics, and typing rules of Bull, a prototype theorem prover based on the Delta-Framework, i.e. a fully-typed lambda-calculus decorated with union and intersection types, as described in previous papers by the authors. Bull also implements a subtyping algorithm for the Type Theory Xi of Barbanera-Dezani-de'Liguoro. Bull has a command-line interface where the user can declare axioms, terms, and perform computations and some basic terminal-style features like error pretty-printing, subexpressions highlighting, and file loading. Moreover, it can typecheck a proof or normalize it. These terms can be incomplete, therefore the typechecking algorithm uses unification to try to construct the missing subterms. Bull uses the syntax of Berardi's Pure Type Systems to improve the compactness and the modularity of the kernel. Abstract and concrete syntax are mostly aligned and similar to the concrete syntax of Coq. Bull uses a higher-order unification algorithm for terms, while typechecking and partial type inference are done by a bidirectional refinement algorithm, similar to the one found in Matita and Beluga. The refinement can be split into two parts: the essence refinement and the typing refinement. Binders are implemented using commonly-used de Bruijn indices. We have defined a concrete language syntax that will allow the user to write Delta-terms. We have defined the reduction rules and an evaluator. We have implemented from scratch a refiner which does partial typechecking and type reconstruction. We have experimented Bull with classical examples of the intersection and union literature, such as the ones formalized by Pfenning with his Refinement Types in LF. We hope that this research vein could be useful to experiment, in a proof theoretical setting, forms of polymorphism alternatives to Girard's parametric one.

中文翻译:

具有联合和交集类型的逻辑框架的类型检查器

我们展示了 Bull 的语法、语义和类型规则,这是一个基于 Delta-Framework 的原型定理证明器,即一个用联合和交集类型装饰的全类型 lambda 演算,如作者在之前的论文中所述。Bull 还为 Barbanera-Dezani-de'Liguoro 的类型理论 Xi 实现了一种子类型化算法。Bull 有一个命令行界面,用户可以在其中声明公理、术语和执行计算以及一些基本的终端样式功能,如错误漂亮打印、子表达式突出显示和文件加载。此外,它可以对证明进行类型检查或对其进行规范化。这些术语可能是不完整的,因此类型检查算法使用统一来尝试构造缺失的子术语。Bull 使用 Berardi 的 Pure Type Systems 的语法来改进内核的紧凑性和模块化。抽象语法和具体语法大多与 Coq 的具体语法对齐并相似。Bull 对术语使用高阶统一算法,而类型检查和部分类型推断是通过双向细化算法完成的,类似于 Matita 和 Beluga 中发现的算法。细化可以分为两个部分:本质细化和类型细化。绑定器是使用常用的 de Bruijn 索引实现的。我们已经定义了一个具体的语言语法,允许用户编写 Delta 项。我们已经定义了归约规则和评估器。我们从头开始实现了一个执行部分类型检查和类型重建的优化器。我们已经用交集和并集文献的经典例子对 Bull 进行了实验,例如 Pfenning 用他在 LF 中的 Refinement Types 形式化的例子。
更新日期:2020-02-26
down
wechat
bug