Cyclic proofs of program termination in separation logic

被引:8
作者
Brotherston, James [1 ]
Bornat, Richard [2 ]
Calcagno, Cristiano [1 ]
机构
[1] Univ London Imperial Coll Sci Technol & Med, London, England
[2] Middlesex Univ, London N17 8HR, England
关键词
verification; theory; reliability; separation logic; termination; cyclic proof; program verification; inductive definitions; Hoare logic;
D O I
10.1145/1328897.1328453
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We propose a novel approach to proving the termination of heap-manipulating programs, which combines separation logic with cyclic proof within a Hoare-style proof system. Judgements in this system express (guaranteed) termination of the program when started from a given line in the program and in a state satisfying a given precondition, which is expressed as a formula of separation logic. The proof rules of our system are of two types: logical rules that operate on preconditions; and symbolic execution rules that capture the effect of executing program commands. Our logical preconditions employ inductively defined predicates to describe heap properties, and proofs in our system are cyclic proofs: cyclic derivations in which some inductive predicate is unfolded infinitely often along every infinite path, thus allowing us to discard all infinite paths in the proof by an infinite descent argument. Moreover, the use of this soundness condition enables us to avoid the explicit construction and use of ranking functions for termination. We also give a completeness result for our system, which is relative in that it relies upon completeness of a proof system for logical implications in separation logic. We give examples illustrating our approach, including one example for which the corresponding ranking function is non-obvious: termination of the classical algorithm for in-place reversal of a (possibly cyclic) linked list.
引用
收藏
页码:101 / 112
页数:12
相关论文
共 25 条
  • [1] ACZEL P, 1977, HDB MATH LOGIC, P739
  • [2] BENAMRAM AM, 2007, HOFB SER 2007
  • [3] Berdine J, 2005, LECT NOTES COMPUT SC, V3780, P52
  • [4] BERDINE J, 2007, 34 POPL
  • [5] Berdine J, 2006, LECT NOTES COMPUT SC, V4144, P386, DOI 10.1007/11817963_35
  • [6] Berdine J, 2006, LECT NOTES COMPUT SC, V4111, P115
  • [7] BORNAT R, 2004, SPAC WORKSH
  • [8] Brotherston J, 2005, LECT NOTES ARTIF INT, V3702, P78
  • [9] BROTHERSTON J, 2007, LICS, V22, P51
  • [10] Brotherston J., 2006, THESIS U EDINBURGH