arrow
Return

Loop Invariants: Analysis, Classification, and Examples

delete2014-01-01
delete38
delete
OA
AI
C
Carlo A. Furia *
B
Bertrand Meyer
S
Sergey Velder
DOI:10.1145/2506375delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
Software verification has emerged as a key concern for ensuring the continued progress of information technology. Full verification generally requires, as a crucial step, equipping each loop with a loop invariant. Beyond their role in verification, loop invariants help program understanding by providing fundamental insights into the nature of algorithms. In practice, finding sound and useful invariants remains a challenge. Fortunately, many invariants seem intuitively to exhibit a common flavor. Understanding these fundamental invariant patterns could therefore provide help for understanding and verifying a large variety of programs. We performed a systematic identification, validation, and classification of loop invariants over a range of fundamental algorithms from diverse areas of computer science. This article analyzes the patterns, as uncovered in this study, governing how invariants are derived from postconditions; it proposes a taxonomy of invariants according to these patterns; and it presents its application to the algorithms reviewed. The discussion also shows the need for high-level specifications based on domain theory. It describes how the invariants and the corresponding algorithms have been mechanically verified using an automated program prover; the proof source files are available. The contributions also include suggestions for invariant inference and for model-based specification.
Keywords:
Algorithms
Verification
Loop invariants
deductive verification
preconditions and postconditions
formal verification
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

ACM Computing Surveys cover
ACM Computing Surveys
IF:
28
Papers:
2.4K
Citations:
3.5W

Organization

E
ETH Zurich
Scholars:
3.0W
Papers: 2.4W
Citations: 8.4W
S
swiss federal institutes of technology domain
Scholars:
9.0W
Papers: 8.0W
Citations: 163