DECIDING CONDITIONAL TERMINATION

被引:11
|
作者
Bozga, Marius [1 ]
Iosif, Radu [1 ]
Konecny, Filip [2 ]
机构
[1] Univ Grenoble Alpes, CNRS, VERIMAG, F-38000 Grenoble, France
[2] EPFL IC IIF LARA, CH-1015 Lausanne, Switzerland
关键词
Integer Programs; Periodic Relations; Recurrent Sets; Termination Preconditions; LINEAR RANKING; INTEGER; PROGRAMS;
D O I
10.2168/LMCS-10(3:8)2014
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We address the problem of conditional termination, which is that of defining the set of initial configurations from which a given program always terminates. First we define the dual set, of initial configurations from which a non-terminating execution exists, as the greatest fixpoint of the function that maps a set of states into its pre-image with respect to the transition relation. This definition allows to compute the weakest non-termination precondition if at least one of the following holds: (i) the transition relation is deterministic, (ii) the descending Kleene sequence over-approximating the greatest fixpoint converges in finitely many steps, or (iii) the transition relation is well founded. We show that this is the case for two classes of relations, namely octagonal and finite monoid affine relations. Moreover, since the closed forms of these relations can be defined in Presburger arithmetic, we obtain the decidability of the termination problem for such loops. We show that the weakest non-termination precondition for octagonal relations can be computed in time polynomial in the size of the binary representation of the relation. Furthermore, for every well-founded octagonal relation, we prove the existence of an effectively computable well-founded witness relation for which a linear ranking function exists. For the class of linear affine relations we show that the weakest non-termination precondition can be defined in Presburger arithmetic if the relation has the finite monoid property. Otherwise, for a more general subclass, called polynomially bounded affine relations, we give a method of under-approximating the termination preconditions. Finally, we apply the method of computing weakest non-termination preconditions for conjunctive relations (octagonal or affine) to computing termination preconditions for programs with complex transition relations. We provide algorithms for computing transition invariants and termination preconditions, and define a class of programs, whose control structure has no nested loops, for which these algorithms provide precise results. Moreover, it is shown that, for programs with no nested control loops, and whose loops are labeled with octagonal constraints, the dual problem i. e. the existence of infinite runs, is NP-complete.
引用
收藏
页数:61
相关论文
共 50 条
  • [1] Deciding Conditional Termination
    Bozga, Marius
    Iosif, Radu
    Konecny, Filip
    TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, TACAS 2012, 2012, 7214 : 252 - 266
  • [2] A Compositional Method for Deciding Program Termination
    Dimovski, Aleksandar
    ICT INNOVATIONS 2010, 2011, 83 : 71 - 80
  • [3] Proving Termination Through Conditional Termination
    Borralleras, Cristina
    Brockschmidt, Marc
    Larraz, Daniel
    Oliveras, Albert
    Rodriguez-Carbonell, Enric
    Rubio, Albert
    TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, TACAS 2017, PT I, 2017, 10205 : 99 - 117
  • [4] Proving conditional termination
    Cook, Byron
    Gulwani, Sumit
    Lev-Ami, Tal
    Rybalchenko, Andrey
    Sagiv, Mooly
    COMPUTER AIDED VERIFICATION, 2008, 5123 : 328 - 340
  • [5] Deciding Fast Termination for Probabilistic VASS with Nondeterminism
    Brazdil, Tomas
    Chatterjee, Krishnendu
    Kucera, Antonin
    Novotny, Petr
    Velan, Dominik
    AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS (ATVA 2019), 2019, 11781 : 462 - 478
  • [6] A Compositional Method for Deciding Equivalence and Termination of Nondeterministic Programs
    Dimovski, Aleksandar
    INTEGRATED FORMAL METHODS, 2010, 6396 : 121 - 135
  • [7] CONDITIONAL REWRITE RULES - CONFLUENCE AND TERMINATION
    BERGSTRA, JA
    KLOP, JW
    JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1986, 32 (03) : 323 - 362
  • [8] Proving Conditional Termination for Smart Contracts
    Le, Ton Chanh
    Xu, Lei
    Chen, Lin
    Shi, Weidong
    PROCEEDINGS OF THE 2ND ACM WORKSHOP ON BLOCKCHAINS, CRYPTOCURRENCIES, AND CONTRACTS (BCC'18), 2018, : 57 - 59
  • [9] On termination and confluence of conditional rewrite systems
    Gramlich, B
    CONDITIONAL AND TYPED REWRITING SYSTEMS, 1995, 968 : 166 - 185
  • [10] Conflict-Driven Conditional Termination
    D'Silva, Vijay
    Urban, Caterina
    COMPUTER AIDED VERIFICATION, CAV 2015, PT II, 2015, 9207 : 271 - 286