Almost-Sure Termination by Guarded Refinement

被引:1
|
作者
Gregersen, Simon Oddershede [1 ]
Aguirre, Alejandro [2 ]
Haselwarter, Philipp G. [2 ]
Tassarotti, Joseph [1 ]
Birkedal, Lars [2 ]
机构
[1] NYU, New York, NY 10003 USA
[2] Aarhus Univ, Aarhus, Denmark
基金
美国国家科学基金会;
关键词
almost-sure termination; probabilistic coupling; Markov chains; SEPARATION LOGIC; CONCURRENT; COMPLEXITY;
D O I
10.1145/3674632
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Almost-sure termination is an important correctness property for probabilistic programs, and a number of program logics have been developed for establishing it. However, these logics have mostly been developed for first-order programs written in languages with specific syntactic patterns for looping. In this paper, we consider almost-sure termination for higher-order probabilistic programs with general references. This combination of features allows for recursion and looping to be encoded through a variety of patterns. Therefore, rather than developing proof rules for reasoning about particular recursion patterns, we instead propose an approach based on proving refinement between a higher-order program and a simpler probabilistic model, in such a way that the refinement preserves termination behavior. By proving a refinement, almost-sure termination behavior of the program can then be established by analyzing the simpler model. We present this approach in the form of Caliper, a higher-order separation logic for proving terminationpreserving refinements. Caliper uses probabilistic couplings to carry out relational reasoning between a program and a model. To handle the range of recursion patterns found in higher-order programs, Caliper uses guarded recursion, in particular the principle of L & ouml;b induction. A technical novelty is that Caliper does not require the use of transfinite step indexing or other technical restrictions found in prior work on guarded recursion for termination-preservation refinement. We demonstrate the flexibility of this approach by proving almost-sure termination of several examples, including first-order loop constructs, a random list generator, treaps, and a sampler for Galton-Watson trees that uses higher-order store. All the results have been mechanized in the Coq proof assistant.
引用
收藏
页码:203 / 233
页数:31
相关论文
共 50 条
  • [41] Generalization of the almost-sure central limit theorem for vectorial martingales
    Chaabane, F
    Maaouia, F
    Touati, A
    COMPTES RENDUS DE L ACADEMIE DES SCIENCES SERIE I-MATHEMATIQUE, 1998, 326 (02): : 229 - 232
  • [42] Almost-sure growth rate of generalized random Fibonacci sequences
    Janvresse, Elise
    Rittaud, Benoit
    de la Rue, Thierry
    ANNALES DE L INSTITUT HENRI POINCARE-PROBABILITES ET STATISTIQUES, 2010, 46 (01): : 135 - 158
  • [43] Robust Almost-Sure Reachability in Multi-Environment MDPs
    van der Vegt, Marck
    Jansen, Nils
    Junges, Sebastian
    TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, PT I, TACAS 2023, 2023, 13993 : 508 - 526
  • [44] SMALL-TIME ALMOST-SURE BEHAVIOUR OF EXTREMAL PROCESSES
    Maller, Ross A.
    Schmidli, Peter C.
    ADVANCES IN APPLIED PROBABILITY, 2017, 49 (02) : 411 - 429
  • [45] ON THE CAMERON-MARTIN THEOREM AND ALMOST-SURE GLOBAL EXISTENCE
    Oh, Tadahiro
    Quastel, Jeremy
    PROCEEDINGS OF THE EDINBURGH MATHEMATICAL SOCIETY, 2016, 59 (02) : 483 - 501
  • [46] Functional limit theorems for Levy processes and their almost-sure versions
    Permiakova, E.
    LITHUANIAN MATHEMATICAL JOURNAL, 2007, 47 (01) : 67 - 77
  • [47] ALMOST-SURE PATH PROPERTIES OF (2,D,BETA)-SUPERPROCESSES
    DAWSON, DA
    VINOGRADOV, V
    STOCHASTIC PROCESSES AND THEIR APPLICATIONS, 1994, 51 (02) : 221 - 258
  • [48] AN ALMOST-SURE RENEWAL THEOREM FOR BRANCHING RANDOM WALKS ON THE LINE
    Meiners, Matthias
    JOURNAL OF APPLIED PROBABILITY, 2010, 47 (03) : 811 - 825
  • [49] Almost-sure asymptotics for the number of heaps inside a random sequence
    Basdevant, A. -L.
    Singh, A.
    ELECTRONIC COMMUNICATIONS IN PROBABILITY, 2018, 23
  • [50] On almost-sure versions of classical limit theorems for dynamical systems
    Chazottes, J.-R.
    Gouezel, S.
    PROBABILITY THEORY AND RELATED FIELDS, 2007, 138 (1-2) : 195 - 234