While Loops in Coq

被引:1
|
作者
Nowak, David [1 ]
Rusu, Vlad [2 ]
机构
[1] Univ Lille, CNRS, Cent Lille, UMR 9189,CRIStAL, F-59000 Lille, France
[2] Univ Lille, Inria, Cent Lille, UMR 9189,CRIStAL, F-59000 Lille, France
关键词
D O I
10.4204/EPTCS.389.8
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
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 non -termination, 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.
引用
收藏
页码:96 / 109
页数:14
相关论文
共 50 条
  • [21] COQ Cock Correct! Verification of Type Checking and Erasure for COQ, in COQ
    Sozeau, Matthieu
    Boulier, Simon
    Forster, Yannick
    Tabareau, Nicolas
    Winterhalter, Theo
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (POPL):
  • [22] 'Coq'
    Fontela, O
    EUROPE-REVUE LITTERAIRE MENSUELLE, 2005, (919-20) : 280 - 280
  • [23] Coq
    Théry, L
    Letouzey, P
    Gonthier, G
    SEVENTEEN PROVERS OF THE WORLD, 2006, 3600 : 28 - 35
  • [24] Extracting functional programs from Coq, in Coq
    Annenkov, Danil
    Milo, Mikkel
    Nielsen, Jakob Botsch
    Spitters, Bas
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2022, 32 (05)
  • [25] Water, Levels, and Loops - Evidence of Teens' Emerging Understanding of Systems while Designing Games
    Parekh, Priyanka
    Gee, Elisabeth
    Tran, Kelly
    Aguilera, Earl
    Cortes, Luis E. Perez
    Kessner, Taylor
    Siyahhan, Sinem
    PROCEEDINGS OF 8TH ANNUAL CONFERENCE ON MAKER EDUCATION (FABLEARN 2019), 2019, : 73 - 80
  • [26] Parallelization of While Loops in Nested Loop Programs for Shared-Memory Multiprocessor Systems
    Geuns, Stefan J.
    Bekooij, Marco J. G.
    Bijlsma, Tjerk
    Corporaal, Henk
    2011 DESIGN, AUTOMATION & TEST IN EUROPE (DATE), 2011, : 697 - 702
  • [27] LE 'COQ'
    TARPINIAN, , A
    NOUVELLE REVUE FRANCAISE, 1993, (481): : 118 - 119
  • [28] Interfacing Coq
    Komendantsky, Vladimir
    Konovalov, Alexander
    Linton, Steve
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2012, 285 : 17 - 28
  • [29] 'COQ DOR'
    MERZ, R
    BALLETT INTERNATIONAL-TANZ AKTUELL, 1982, 5 (01): : 86 - 87
  • [30] HOCore in Coq
    Maksimovic, Petar
    Schmitt, Alan
    INTERACTIVE THEOREM PROVING, 2015, 9236 : 278 - 293