Report Number: CS-TR-77-631
Institution: Stanford University, Department of Computer Science
Title: Inference rules for program annotation
Author: Dershowitz, Nachum
Author: Manna, Z ohar
Date: October 1977
Abstract: Methods are presented whereby an Algol-like program, given together with its specifications, can be documented automatically. The program is incrementally annotated with invariant relationships that hold between program variables at intermediate points in the program and explain the acutal workings of the program regardless of whether the program is correct. Thus this documentation can be used for proving the correctness of the program or may serve as an aid in the debugging of an incorrect program. The annotation techniques are formulated as Hoare-llike inference rules which derive invariants from the assignment statements, from the control structure of the program, or, heuristically, from suggested invariants. The application of these rules is demonstrated by two examples which have run on an experimental implementation.
http://i.stanford.edu/pub/cstr/reports/cs/tr/77/631/CS-TR-77-631.pdf