%0 Journal Article
%T Implementing Type Theory in Higher Order Constraint Logic Programming
%+ Department of Computer Science and Engineering [Bologna] (DISI)
%+ Mathematical, Reasoning and Software (MARELLE)
%+ Sûreté du logiciel et Preuves Mathématiques Formalisées (STAMP)
%A Guidi, Ferruccio
%A Sacerdoti Coen, Claudio
%A Tassi, Enrico
%< avec comité de lecture
%@ 0960-1295
%J Mathematical Structures in Computer Science
%I Cambridge University Press (CUP)
%V 29
%N 8
%P 1125-1150
%8 2019-03-01
%D 2019
%Z Computer Science [cs]/Logic in Computer Science [cs.LO]
%Z Computer Science [cs]/Mathematical Software [cs.MS]Journal articles
%X 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 terms with holes or, equivalently, partial proof terms. In the first part of the paper we confirm that λProlog, the language developed by Miller and Nadathur since the 80s, is extremely suitable for implementing the kernel, even when efficient techniques like reduction machines are employed. In the second part of the paper we turn our attention to the elaborator and we observe that the eager generative semantics inherited by Prolog makes it impossible to reason by induction over terms containing metavariables. We also conclude that the minimal extension to λProlog that allows to do so is the possibility to delay inductive predicates over flexible terms, turning them into (set of) constraints to be propagated according to user provided constraint propagation rules. Therefore we propose extensions to λProlog to declare and manipulate higher order constraints, and we implement the proposed extensions in the ELPI system. Our test case is the implementation of an elaborator for a type theory as a CLP extension to a kernel written in plain λProlog.
%G English
%2 https://inria.hal.science/hal-01410567v3/document
%2 https://inria.hal.science/hal-01410567v3/file/dalefest.pdf
%L hal-01410567
%U https://inria.hal.science/hal-01410567
%~ INRIA
%~ INRIA-SOPHIA
%~ INRIASO
%~ INRIA_TEST
%~ TESTALAIN1
%~ INRIA2
%~ UNIV-COTEDAZUR