Implementing type theory in higher order constraint logic programming

Author:

GUIDI FERRUCCIO,SACERDOTI COEN CLAUDIO,TASSI ENRICO

Abstract

In this paper, we are interested in high-level programming languages to implement the core components of an interactive theorem prover for a dependently typed language: the kernel – responsible for type-checking closed terms – and the elaborator – that manipulates open terms, that is terms containing unresolved unification variables.In this paper, we confirm that λProlog, the language developed by Miller and Nadathur since the 80s, is extremely suitable for implementing the kernel. Indeed, we easily obtain a type checker for the Calculus of Inductive Constructions (CIC). Even more, we do so in an incremental way by escalating a checker for a pure type system to the full CIC.We then turn our attention to the elaborator with the objective to obtain a simple implementation thanks to the features of the programming language. In particular, we want to use λProlog’s unification variables to model the object language ones. In this way, scope checking, carrying of assignments and occur checking are handled by the programming language.We observe that the eager generative semantics inherited from Prolog clashes with this plan. We propose an extension to λProlog that allows to control the generative semantics, suspend goals over flexible terms turning them into constraints, and finally manipulate these constraints at the meta-meta level via constraint handling rules.We implement the proposed language extension in the Embedded Lambda Prolog Interpreter system and we discuss how it can be used to extend the kernel into an elaborator for CIC.

Publisher

Cambridge University Press (CUP)

Subject

Computer Science Applications,Mathematics (miscellaneous)

Reference43 articles.

1. Dependently Typed Programming in Agda

2. Boespflug M. , Carbonneaux Q. and Hermant O. (2012). The lambda-pi-calculus modulo as a universal proof language. In: Proceedings of the 2nd International Workshop on Proof Exchange for Theorem Proving, CEUR Workshop Proceedings, vol. 878, 28–43.

3. Dunchev C. , Guidi F. , Sacerdoti Coen C. and Tassi E. (2015). ELPI: Fast, embeddable, λProlog interpreter. In: Proceedings of Logic for Programming, Artificial Intelligence and Reasoning.

4. Hints in Unification

5. Luo Z. (1996). Coercive subtyping in type theory. In: Proceedings of the 10th International Workshop on Computer Science Logic, Annual Conference of the European Association for Computer Science Logic, Utrecht, the Netherlands, September 21–27, Selected Papers, 276–296.

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Higher-Order unification for free!: Reusing the meta-language unification for the object language;Proceedings of the 26th International Symposium on Principles and Practice of Declarative Programming;2024-09-09

2. A Survey of the Proof-Theoretic Foundations of Logic Programming;Theory and Practice of Logic Programming;2021-11-18

3. Functions-as-constructors higher-order unification: extended pattern unification;Annals of Mathematics and Artificial Intelligence;2021-09-30

4. slepice: Towards a Verified Implementation of Type Theory in Type Theory;Logic-Based Program Synthesis and Transformation;2021

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3