Constructing correct and efficient concurrent programs

A method is presented for programming correct and efficient cooperation in a set of sequential modules, on the basis of an invariant assertion, by means of formal and static deductions. For each sequential module, the pre- and post-assertions are computed from the invariant. Whereas the pre-assertion gives the synchronizing condition required before execution in order to preserve the invariant, the post-assertion expresses the “contribution” of this execution. Other assertions, called firing conditions, are derived which connect that contribution to the needs of waiting processes as expressed in their synchronizing conditions. A sequential module and its synchronizing and firing conditions are then integrated in a high-level synchronizing construct close to conditional critical regions, but allowing explicit control over the synchronizing conditions to be reevaluated at the exit for process resumption. Three levels of static elimination of useless condition reevaluations are then presented. These eliminations essentially use the information contained in firing conditions; they are shown to preserve partial correctness. The combined use of the notation and of the techniques proposed is illustrated through three examples.

[1]  Edsger W. Dijkstra A simple axiomatic basis for programming language constructs , 1973 .

[2]  Donald E. Knuth,et al.  Structured Programming with go to Statements , 1974, CSUR.

[3]  David Lorge Parnas,et al.  Information Streams Sharing a Finite Buffer: Other Solutions , 1974, Inf. Process. Lett..

[4]  C. A. R. HOARE,et al.  An axiomatic basis for computer programming , 1969, CACM.

[5]  Edsger W. Dijkstra,et al.  A constructive approach to the problem of program correctness , 1968 .

[6]  Edsger W. Dijkstra,et al.  Guarded commands, non-determinacy and a calculus for the derivation of programs , 1975, Language Hierarchies and Interfaces.

[7]  C. A. R. Hoare,et al.  Monitors: an operating system structuring concept , 1974, CACM.

[8]  Roy H. Campbell,et al.  The specification of process synchronization by path expressions , 1974, Symposium on Operating Systems.

[9]  Per Brinch Hansen,et al.  Operating System Principles , 1973 .

[10]  Michel Sintzoff,et al.  Calculating properties of programs by valuations on specific models , 1972, Proving Assertions About Programs.

[11]  Karl N. Levitt The application of program-proving techniques to the verification of synchronization processes , 1972, AFIPS '72 (Fall, part I).

[12]  James C. King,et al.  A Program Verifier , 1971, IFIP Congress.

[13]  Donald Irvin Good,et al.  Toward a man-machine system for proving program correctness , 1970 .

[14]  Edsger W. Dijkstra Information Streams Sharing a Finite Buffer , 1972, Inf. Process. Lett..

[15]  Rod M. Burstall,et al.  Program Proving as Hand Simulation with a Little Induction , 1974, IFIP Congress.