Partial and Total Correctness

Partial correctness establishes a promised result whenever an operation terminates normally from allowed state. Total correctness also supplies termination under those conditions.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a counter loop
  2. Add the missing proof obligation

Trace a counter loop

An invariant about a maintained sum can imply a correct result at the exit condition. It says nothing alone about whether a branch keeps repeating. See loop exit reasoning.

Add the missing proof obligation

Prove each continuing step decreases a suitable measure or establish another valid exit argument. Remaining work as a measure gives a simple demonstration.[1]

References

  1. Benjamin C. Pierce et al., Software Foundations ↩