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 条
  • [1] HEURISTICS FOR CONSTRUCTING WHILE LOOPS
    MILI, F
    MILI, A
    SCIENCE OF COMPUTER PROGRAMMING, 1992, 18 (01) : 67 - 106
  • [2] How to Design while Loops
    Morazan, Marco T.
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2020, (321): : 1 - 18
  • [3] Kleene Algebra with Tests and Coq Tools for while Programs
    Pous, Damien
    INTERACTIVE THEOREM PROVING, ITP 2013, 2013, 7998 : 180 - 196
  • [4] PARALLELIZATION OF WHILE LOOPS ON PIPELINED ARCHITECTURES
    TIRUMALAI, PP
    LEE, M
    SCHLANSKER, MS
    JOURNAL OF SUPERCOMPUTING, 1991, 5 (2-3): : 119 - 136
  • [5] An improved rule for while loops in deductive program verification
    Beckert, B
    Schlager, S
    Schmitt, PH
    FORMAL METHODS AND SOFTWARE ENGINEERING, PROCEEDINGS, 2005, 3785 : 315 - 329
  • [6] 'COQ COQ'
    GULLAR, F
    QUINZAINE LITTERAIRE, 1987, (484): : 16 - 16
  • [7] Using Invariant Relations in the Termination Analysis of While Loops
    Ghardallou, Wided
    2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2012, : 1519 - 1522
  • [8] Weakly measured while loops: peeking at quantum states
    Andres-Martinez, Pablo
    Heunen, Chris
    QUANTUM SCIENCE AND TECHNOLOGY, 2022, 7 (02)
  • [9] Relational Methods in the Analysis of While Loops: Observations of Versatility
    Louhichi, Asma
    Mraihi, Olfa
    Jilani, Lamia Labed
    Bsaies, Khaled
    Mili, Ali
    RELATIONS AND KLEENE ALGEBRA IN COMPUTER SCIENCE, PROCEEDINGS, 2009, 5827 : 242 - 259
  • [10] Termination detection in parallel loop nests with while loops
    Geigl, M
    Griebl, M
    Lengauer, C
    PARALLEL COMPUTING, 1999, 25 (12) : 1489 - 1510