Acta Informatica

, Volume 24, Issue 1, pp 1–31 | Cite as

Sometime = always + recursion ≡ always on the equivalence of the intermittent and invariant assertions methods for proving inevitability properties of programs

  • Patrick Cousot
  • Radhia Cousot


We propose and compare two induction principles called “always” and “sometime” for proving inevitability properties of programs. They are respective formalizations and generalizations of Floyd invariant assertions and Burstall intermittent assertions methods for proving total correctness of sequential programs whose methodological advantages or disadvantages have been discussed in a number of previous papers. Both principles are formalized in the abstract setting of arbitrary nondeterministic transition systems and illustrated by appropriate examples. The “sometime” method is interpreted as a recursive application of the “always” method. Hence “always” can be considered as a special case of “sometime”. These proof methods are strongly equivalent in the sense that a proof by one induction principle can be rewritten into a proof by the other one. The first two theorems of the paper show that an invariant for the “always” method can be translated into an invariant for the “sometime” method even if every recursive application of the later is required to be of finite length. The third and main theorem of the paper shows how to translate an invariant for the “sometime” method into an invariant for the “always” method. It is emphasized that this translation technique follows the idea of transforming recursive programs into iterative ones. Of course, a general translation technique does not imply that the original “sometime” invariant and the resulting “always” invariant are equally understandable. This is illustrated by an example.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Back, R.J.: Semantics of unbounded nondeterminism, in Proc. 7th ICALP, LNCS 85, pp. 51–63. Berlin, Heidelberg, New York: Springer 1980Google Scholar
  2. 2.
    Burstall, R.M.: Program proving as hand simulation with a little induction. Information Processing 74, pp. 308–312. Amsterdam: North-Holland 1974Google Scholar
  3. 3.
    Cousot, P., Cousot, R.: Induction principles for proving invariance properties of programs. In: Tools and notions for program construction. (D. Neel, ed.), pp. 75–119. Cambridge: University Press 1982Google Scholar
  4. 4.
    Cousot, P., Cousot, R.: “A la Floyd” induction principles for proving inevitability properties of programs. In: Algebraic methods in semantics. (M. Nivat, J.C. Reynolds, eds.), pp. 277–312. Cambridge: University Press 1985Google Scholar
  5. 5.
    Cousot, P., Cousot, R.: “A la Burstall” induction principles for proving inevitability properties of programs, Research Report LRIM-83-08, Univ. of Metz, France, 1983Google Scholar
  6. 6.
    Dijkstra, E.W.: A sequel to EWD 592, EWD 600, Burroughs Corp., Nuemen, The Netherlands 1977Google Scholar
  7. 7.
    Floyd, R.: Assigning meaning to programs. In: Proc. Symp. Appl. Math., 19. (Schwartz J.T. (ed.)), Am. Math. Soc., pp. 19–32, Providence, 1967Google Scholar
  8. 8.
    Gries, D.: Is SOMETIME ever better than ALWAYS? ACM TOPLAS, 1, 258–265 (1979)Google Scholar
  9. 9.
    Keller, R.M.: Formal verification of parallel programs, 19, 371–384 (1976)Google Scholar
  10. 10.
    Lamport, L.: Proving the correctness of multiprocess programs, IEEE Trans. Soft. Eng., 3, 125–143 (1977)Google Scholar
  11. 11.
    Manna, Z., Pnueli, A.: How to cook a temporal proof system for your pet language, ACM POPL, 10, 141–154 (1983)Google Scholar
  12. 12.
    Manna, Z., Waldinger, R.: Is SOMETIME sometimes better than ALWAYS? Intermittent assertions in proving program correctness, 21, 159–172 (1978)Google Scholar
  13. 13.
    Monk, J.D.: Introduction to set theory, New York: McGraw-Hill 1969Google Scholar
  14. 14.
    Owicki, S., Lamport, L.: Proving liveness properties of concurrent programs. ACM TOPLAS 4, 455–495 (1982)Google Scholar

Copyright information

© Springer-Verlag 1987

Authors and Affiliations

  • Patrick Cousot
    • 1
  • Radhia Cousot
    • 2
  1. 1.Centre de Mathématiques AppliquéesEcole PolytechniquePalaiseau CedexFrance
  2. 2.Centre d'Orsay, LRIUniversité de Paris-SudOrsay CedexFrance

Personalised recommendations