• Aucun résultat trouvé

Dedukti : a Universal Proof Checker

N/A
N/A
Protected

Academic year: 2021

Partager "Dedukti : a Universal Proof Checker"

Copied!
3
0
0

Texte intégral

(1)

HAL Id: hal-00833992

https://hal-mines-paristech.archives-ouvertes.fr/hal-00833992

Submitted on 14 Jun 2013

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Dedukti : a Universal Proof Checker

Ronan Saillard

To cite this version:

Ronan Saillard. Dedukti : a Universal Proof Checker. Foundation of Mathematics for Computer-Aided

Formalization Workshop, Jan 2013, Padova, Italy. �hal-00833992�

(2)

Dedukti: a Universal Proof Checker

Ronan Saillard MINES ParisTech ronan.saillard@cri.ensmp.fr

Context The success of formal methods both as tools of practical importance and as objects of intellectual curiosity, has spawned a bewildering variety of software systems to support them. While the field has developed to maturity in academia and has registered some important successes in the industry, the full benefit of formal methods in an industrial setting remains largely untapped.

We submit that a lack of standards and easy interoperability in the field is one explanation to this state of affairs.

The λΠ-calculus modulo To address this issue we propose theλΠ-calculus modulo as a universal proof language. This calculus, introduced by Cousineau and Dowek [5], is a dependent typed λ-calculus where the definitional equality has been generalized to an arbitrary congruence generated by rewrite rules. Our opinion is that this formalism is well suited for encoding foreign logics and make them cooperate. Indeed, by allowing the addition of user-defined rewrite rules, logics benefit from shallower encodings and do not lose their computational content.

To support this language we have developed a new type checker calledDedukti[3].

A type-checker generator In order to provide an efficient and yet simple type checker for the λΠ-calculus modulo we chose to implement it as a type checker generator: a parser/front-end generates a specialized type checker in a target language which is then run. This scheme has two key advantages:

First it conveniently allows us to sidestep the problem of implementing alpha- equivalence and substitution by making use of Higher Order Abstract Syntax (HOAS).

Second, it permits us to make use of normalization by evaluation (NbE) which is one particularly efficient way to implement normalization scheme that alternates phases of weak reduction (i.e. evaluation) and reification phases (or readback phases [6]). The idea is to use the application of the target language to code the β-reduction or any other rewrite rules.

A Just-in-Time compiler as our backend As we intend to be a universal proof checker we need to be versatile. In particular some logics allow proofs to embed computational content and some do not. This is a real challenge because the efficiency of the normalization strategy highly depends on the computational content of the proof term. Indeed in the first case λ-terms should be compiled and in the latterλ-terms should be interpreted. The matter of choosing the right

(3)

strategy is very difficult but it is already adressed by theJust-in-Timecompiler community, so we chose to rely on the state-of-the-artLuaJIT [8] compiler, as our backend.

A Bidirectional and Context-Free type checking We use a domain-free representation of terms as introduced in [1], meaning that abstractions may not be annotated by the type of the variable that they bind. This information is not necessary if one adopts a bidirectional typing discipline, a technique going back to [4] which splits the usual type judgments into two forms: checking judgments and synthesis judgments. Hence, input terms are smaller at no cost to the complexity or size of the type checker.

When using HOAS, abstractions are encoded as functions of the implemen- tation language. They are therefore opaque structures that cannot be directly analyzed. Functions are black boxes whose only interface is that they can be applied. In HOAS, it is therefore necessary to draw the parameter/variable distinction common in presentations of first-order logic — variables are always bound and parameters are variables that are free. This distinction is made explicit by the use of context-free type checking [2].

Features and Translators Dedukti features also dot-pattern `a la Agda [7]

which permits to avoid type checking subterms well-typed by construction, opaque definitions and a basic notion of modules. We provide a translator to theλΠ-calculus modulo for the Calculus of Inductive Construction as imple- mented by theCoq proof assistant, and a translator for the Higher Order Logic as implemented byHOL/Isabelle. We plan to develop translations for the logic ofPVS and the set theory ofAtelier B.

References

[1] Gilles Barthe and Morten Heine Sørensen. Domain-free pure type systems. InJ.

Funct. Program., pages 9–20. Springer, 1993.

[2] Mathieu Boespflug. Conception d’un noyau de v´erification de preuves pour leλΠ- calcul modulo. PhD thesis, Ecole polytechnique, January 2011.

[3] Mathieu Boespflug, Quentin Carbonneaux, Olivier Hermant, and Ronan Saillard.

Dedukti : https://www.rocq.inria.fr/deducteam/dedukti/index.html.

[4] Thierry Coquand. An algorithm for type-checking dependent types. Sci. Comput.

Program., 26(1-3):167–177, 1996.

[5] Denis Cousineau and Gilles Dowek. Embedding pure type systems in the lambda- pi-calculus modulo. In Simona Ronchi Della Rocca, editor,TLCA, volume 4583 of LNCS, pages 102–117. Springer, 2007.

[6] B. Gr´egoire and X. Leroy. A compiled implementation of strong reduction. In Mitchell Wand and Simon L. Peyton Jones, editors,ICFP, pages 235–246. ACM, 2002.

[7] Ulf Norell. Dependently typed programming in agda. In Pieter W. M. Koop- man, Rinus Plasmeijer, and S. Doaitse Swierstra, editors, Advanced Functional Programming, volume 5832 ofLNCS, pages 230–266. Springer, 2008.

[8] The LuaJIT Project. http://www.http://luajit.org/.

Références

Documents relatifs

In earlier work [9], we encoded our benchmarks in Parametric Promela, using a shared variable to record the number of processes that have sent a message, and using for each process

In this paper, we propose to use the check-min-erboard copula (as in- troduced in [17] in dimension 2 and developed in [20] in higher dimension) to merge the information given by

The trace checking procedure of ThEodorE reduces the problem of checking if a requirement holds on an execution trace to a satisfiability problem, which can be solved

Dependency Pairs Termination in Dependent Type Theory Modulo Rewriting. Pattern matching with

CaFE (CaRet Frama-C’s extension) [8] est un model-checker de programmes C développé sous la forme d’un greffon de la plate-forme Frama-C.. Son objectif est de vérifier

A (coloured) Petri net involves objects defined by a colour domain that pro- vides data values, variables, operators, a syntax for expressions, possibly typing rules, etc..

Model compilation is one of the numerous techniques to speedup explicit model- checking, it relies on generating source code (then compiled into machine code) to produce

Given a term rewriting system, the tree automata completion is a technique for over- approximating the set of terms reachable by rewriting in order to prove the unreachability