Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

General correctness: A unification of partial and total correctness


General correctness, which subsumes partial and total correctness, is defined for both weakest preconditions and strongest postconditions. Healthiness properties for general-correctness predicate transformers are more uniform and complete than those for partial- and total-correctness systems. In fact, the healthiness properties for partial and total correctness are simple restrictions of those for general correctness. General correctness allows simple formulations of the connections between weakest and strongest postconditions and between the notions of weakest precondition under the “demonic” and “angelic” interpretations of nondeterminism. A problem that plagues sp-sp(P, C) is undefined if execution of C begun in some state of P may not terminate — disappears with the generalization.

This paper is a study of some simple theory underlying predicate transformer semantics, and as yet has little bearing on current programming practices. The theory uses a relational model of programs.

This is a preview of subscription content, log in to check access.


  1. 1.

    Back, R.J.: Semantics of unbounded nondeterminism. Proc. ICALP 80, Lecture Notes in Computer Science 85, pp. 51–63. Berlin-Heidelberg-New York: Springer 1980

  2. 2.

    de Bakker, J.W.: Recursive programs as predicate transformers. In: Formal Description of Programming Concepts (E.J. Neuhold, ed.), pp. 165–181. Amsterdam: North Holland 1978

  3. 3.

    Barringer, H., Cheng, J.H., Jones, C.B.: A logic covering undefinedness in program proofs. Tech. Rep., University of Manchester 1984

  4. 4.

    Dijkstra, E.W.: A Discipline of Programming. Englewood Cliffs: Prentice-Hall 1976

  5. 5.

    Floyd, R.W.: Nondeterministic algorithms. J. ACM 4, 636–644 (1967)

  6. 6.

    Gries, D.: The Science of Programming. Berlin-Heidelberg-New York: Springer 1981

  7. 7.

    Guerreiro, P.: Another characterization of weakest preconditions. Lecture Notes in Computer Science 137, pp. 164–177. Berlin-Heidelberg-New York: Springer 1982

  8. 8.

    Harel, D.: On the total correctness of nondeterministic programs. IBM Research Report RC 7691, 1979

  9. 9.

    Hehner, R.: Predicative programming. Part I. CACM 27, 134–143 (1984)

  10. 10.

    Hoare, C.A.R.: Some properties of predicate transformers. J. ACM 23, 461–480 (1978)

  11. 11.

    Hoare, C.A.R., Lauer, P.E.: Consistent and complementary formal theories of the semantics of programming languages. Acta Inf. 3, 135–153 (1974)

  12. 12.

    Jacobs, D.: General Correctness: a Unification of Partial and Total Correctness. Ph.D. Thesis, Computer Science Dept., Cornell University 1984

  13. 13.

    Majster-Cederbaum, M.E.: A simple relation between relational and predicate transformer semantics for nondeterministic programs. Inf. Process. Lett. 4, 190–192 (1980)

  14. 14.

    Plotkin, G.D.: A powerdomain construction. SIAM J. Comput 5, 452–487 (1976)

  15. 15.

    de Roever, W.P.: Dijkstra's predicate transformer, nondeterminism, recursion, and termination. Lecture Notes in Computer Science 45, pp. 472–481. Berlin-Heidelberg-New York: Springer 1976

  16. 16.

    Smyth, M.: Powerdomains. J. Comput. Syst Sci. 16 (1978)

  17. 17.

    Wand, M.: A characterization of weakest preconditions. J. Comput Syst Sci. 15, 209–212 (1977)

Download references

Author information

Additional information

This work was supported by the National Science Foundation under grant MCS-81-03605 and by the second author's Guggenheim Fellowship. This paper is based on the first author's Ph.D. thesis at Cornell.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Jacobs, D., Gries, D. General correctness: A unification of partial and total correctness. Acta Informatica 22, 67–83 (1985).

Download citation


  • Communication Network
  • Information Theory
  • Computational Mathematic
  • Computer System
  • System Organization