While Loops in Coq - Symbolic analysis and Component-based design for Modular Real-Time Embedded Systems
Communication Dans Un Congrès Année : 2023

While Loops in Coq

Résumé

While loops are present in virtually all imperative programming languages. They are important both for practical reasons (performing a number of iterations not known in advance) and theoretical reasons (achieving Turing completeness). In this paper we propose an approach for incorporating while loops in an imperative language shallowly embedded in the Coq proof assistant. The main difficulty is that proving the termination of while loops is nontrivial, or impossible in the case of nontermination, whereas Coq only accepts programs endowed with termination proofs. Our solution is based on a new, general method for defining possibly non-terminating recursive functions in Coq. We illustrate the approach by proving termination and partial correctness of a program on linked lists.
Fichier principal
Vignette du fichier
paper.pdf (148.23 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04254872 , version 1 (23-10-2023)

Licence

Identifiants

Citer

David Nowak, Vlad Rusu. While Loops in Coq. 7th Symposium on Working Formal Methods (FROM 2023), Sep 2023, Bucarest, Romania. pp.96 - 109, ⟨10.4204/eptcs.389.8⟩. ⟨hal-04254872⟩
123 Consultations
36 Téléchargements

Altmetric

Partager

More