Coqlex: Generating Formally Verified Lexers
Résumé
A compiler consists of a sequence of phases going from lexical analysis to code generation. Ideally, the formal verication of a compiler should include the formal veri cation of each component of the tool-chain. e Compcert project, a formally veri ed C compiler, comes with associated tools and proofs that allow to formally verify most of those components. However, some components, in particular the lexer, remain unveri ed. In order to contribute to the end-to-end veri cation of compilers, we implemented a veri ed lexer generator whose usage is similar to OCamllex. Our so ware, called Coqlex, reads a lexer speci cation and generates a lexer equipped with Coq proofs of its correctness. It provides a formally veri ed implementation of most features that standard lexer generators (that are not formally veried) usually have. We also give a performance evaluation, comparing Coqlex to OCamllex and Verbatim++.
Domaines
Informatique [cs]Origine | Fichiers produits par l'(les) auteur(s) |
---|