Table of Contents
Fetching ...

A Sequent Calculus For Trace Formula Implication

Niklas Heidler, Reiner Hähnle

TL;DR

The paper tackles the problem of proving implication (trace inclusion) between trace formulas that capture the behavior of imperative programs with recursive procedures. It develops a sound sequent calculus for trace formula consequence, enabling reasoning about traces via judgments of the form $S{:}Φ$ and using fixed-point induction, contracts, and μ-synchronization to handle unbounded recursion. While complete completeness remains out of reach, the authors provide a robust core calculus plus extensions that prove many non-trivial properties and pave the way for mechanization. This approach strengthens modular verification by linking program semantics to trace formulas and offers practical means to verify recursive programs through trace-based specifications.

Abstract

Specification languages are essential in deductive program verification, but they are usually based on first-order logic, hence less expressive than the programs they specify. Recently, trace specification logics with fixed points that are at least as expressive as their target programs were proposed. This makes it possible to specify not merely pre- and postconditions, but the whole trace of even recursive programs. Previous work established a sound and complete calculus to determine whether a program satisfies a given trace formula. However, the applicability of the calculus and prospects for mechanized verification rely on the ability to prove consequence between trace formulas. We present a sound sequent calculus for proving implication (i.e. trace inclusion) between trace formulas. To handle fixed point operations with an unknown recursive bound, fixed point induction rules are used. We also employ contracts and μ-formula synchronization. While this does not yet result in a complete calculus for trace formula implication, it is possible to prove many non-trivial properties.

A Sequent Calculus For Trace Formula Implication

TL;DR

The paper tackles the problem of proving implication (trace inclusion) between trace formulas that capture the behavior of imperative programs with recursive procedures. It develops a sound sequent calculus for trace formula consequence, enabling reasoning about traces via judgments of the form and using fixed-point induction, contracts, and μ-synchronization to handle unbounded recursion. While complete completeness remains out of reach, the authors provide a robust core calculus plus extensions that prove many non-trivial properties and pave the way for mechanization. This approach strengthens modular verification by linking program semantics to trace formulas and offers practical means to verify recursive programs through trace-based specifications.

Abstract

Specification languages are essential in deductive program verification, but they are usually based on first-order logic, hence less expressive than the programs they specify. Recently, trace specification logics with fixed points that are at least as expressive as their target programs were proposed. This makes it possible to specify not merely pre- and postconditions, but the whole trace of even recursive programs. Previous work established a sound and complete calculus to determine whether a program satisfies a given trace formula. However, the applicability of the calculus and prospects for mechanized verification rely on the ability to prove consequence between trace formulas. We present a sound sequent calculus for proving implication (i.e. trace inclusion) between trace formulas. To handle fixed point operations with an unknown recursive bound, fixed point induction rules are used. We also employ contracts and μ-formula synchronization. While this does not yet result in a complete calculus for trace formula implication, it is possible to prove many non-trivial properties.
Paper Structure (35 sections, 14 theorems, 97 equations, 18 figures)

This paper contains 35 sections, 14 theorems, 97 equations, 18 figures.

Key Result

theorem 1

For each Rec Program$(S, T)$ there exists a closed strongest trace formula$\Phi$ with $traces(S) = \llbracket\Phi\rrbracket$.

Figures (18)

  • Figure 1: Semantics of trace formulas
  • Figure 2: Calculus rules for predicates and relations
  • Figure 3: Demonstration of predicate and relation rules
  • Figure 4: Calculus rules for unfoldings and lengthenings
  • Figure 5: Calculus rules for arbitrary traces
  • ...and 13 more figures

Theorems & Definitions (40)

  • definition 1: Rec Program
  • definition 2: Trace Formula Syntax
  • definition 3: Trace Formula Semantics
  • theorem 1: Strongest Trace Formula GurovHaehnle24
  • definition 4: Satisfiability
  • definition 5: Sequents
  • definition 6: Validity of Sequents
  • definition 7: Program State
  • theorem 2: Fixed Point Induction
  • proof
  • ...and 30 more