Generation of correctness conditions for imperative programs

  • Authors:
  • N. V. Shilov;I. S. Anureev;E. V. Bodin

  • Affiliations:
  • Ershov Institute of Information Systems, Siberian Branch, Russian Academy of Sciences, Novosibirsk, Russia 630090;Ershov Institute of Information Systems, Siberian Branch, Russian Academy of Sciences, Novosibirsk, Russia 630090;Ershov Institute of Information Systems, Siberian Branch, Russian Academy of Sciences, Novosibirsk, Russia 630090

  • Venue:
  • Programming and Computing Software
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Verification of imperative programs in the sense of Floyd-Hoare is an approach to proving correctness of programs annotated by preconditions, postconditions, and loop invariants. It is based on generation of correctness conditions. In the structured deterministic case, the problem of generation of correctness conditions seems trivial, since it is solved by a syntax-driven algorithm, the complexity of which linearly depends on the number of control constructs. Vice versa, in the unstructured nondeterministic case, it seems a priori clear that the complexity of generation of the correctness conditions exponentially depends on the number of statements in the program. In the paper, an efficient and complete algorithm for the generation of the correctness conditions is presented and justified. It can be used both in the structured deterministic and unstructured nondeterministic cases. The algorithm complexity linearly depends on the number of control constructs and/or program statements.