English

Inferring Loop Invariants using Postconditions

Software Engineering 2013-08-14 v2 Logic in Computer Science

Abstract

One of the obstacles in automatic program proving is to obtain suitable loop invariants. The invariant of a loop is a weakened form of its postcondition (the loop's goal, also known as its contract); the present work takes advantage of this observation by using the postcondition as the basis for invariant inference, using various heuristics such as "uncoupling" which prove useful in many important algorithms. Thanks to these heuristics, the technique is able to infer invariants for a large variety of loop examples. We present the theory behind the technique, its implementation (freely available for download and currently relying on Microsoft Research's Boogie tool), and the results obtained.

Keywords

Cite

@article{arxiv.0909.0884,
  title  = {Inferring Loop Invariants using Postconditions},
  author = {Carlo A. Furia and Bertrand Meyer},
  journal= {arXiv preprint arXiv:0909.0884},
  year   = {2013}
}

Comments

Slightly revised version

R2 v1 2026-06-21T13:42:43.759Z