Skip to main content
Log in

General correctness: A unification of partial and total correctness

  • Published:
Acta Informatica Aims and scope Submit manuscript

Summary

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 via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  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

    Google Scholar 

  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

    Google Scholar 

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

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

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

    Google Scholar 

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

    Google Scholar 

  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)

    Google Scholar 

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

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

    Google Scholar 

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

    Google Scholar 

  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

    Google Scholar 

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

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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

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). https://doi.org/10.1007/BF00290146

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00290146

Keywords

Navigation