Skip to main content

Invariants, Well-Founded Statements and Real-Time Program Algebra

  • Conference paper
FM 2014: Formal Methods (FM 2014)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8442))

Included in the following conference series:

Abstract

Program algebras based on Kleene algebra abstract the essential properties of programming languages in the form of algebraic laws. The proof of a refinement law may be expressed in terms of the algebraic properties of programs required for the law to hold, rather than directly in terms of the semantics of a language. This has the advantage that the law is then valid for any programming language that satisfies the axioms of the algebra.

In this paper we explore the notion of well-founded statements and their relationship to well-founded relations and iterations. The laws about well-founded statements and relations are combined with invariants to derive a simpler proof of a while-loop introduction law. The algebra is then applied to a real-time programming language. The main difference is that tests within conditions and loops take time to evaluate and during that time the values of program inputs may change. This requires new definitions for conditionals and while loops but the proofs of the introduction laws for these constructs can still make use of the more basic algebraic properties of iterations.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Lamport, L.: An old-fashioned recipe for real time. ACM Trans. on Prog. Lang. and Sys. 16(5), 1543–1571 (1994)

    Article  Google Scholar 

  2. Abrial, J.-R.: The B-Book: Assigning programs to meanings. Cambridge University Press (1996)

    Google Scholar 

  3. Asarin, E., Caspi, P., Maler, O.: Timed regular expressions. J. ACM 49(2), 172–206 (2002)

    Article  MathSciNet  Google Scholar 

  4. Back, R.-J.R., von Wright, J.: Refinement Calculus: A Systematic Introduction. Springer, New York (1998)

    Book  MATH  Google Scholar 

  5. Back, R.-J.R., von Wright, J.: Reasoning algebraically about loops. Acta Informatica 36, 295–334 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  6. Blikle, A.: Specified programming. In: Blum, E.K., Paul, M., Takasu, S. (eds.) Mathematical Studies of Information Processing. LNCS, vol. 75, pp. 228–251. Springer, Heidelberg (1979)

    Chapter  Google Scholar 

  7. Cohen, E.: Separation and reduction. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 45–59. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  8. Coleman, J.W.: Expression decomposition in a rely/guarantee context. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 146–160. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  9. Colvin, R.J., Hayes, I.J.: Structural operational semantics through context-dependent behaviour. Journal of Logic and Algebraic Programming 80(7), 392–426 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  10. Conway, J.H.: Regular Algebra and Finite Machines. Chapman Hall (1971)

    Google Scholar 

  11. Hayes, I.J. (ed.): Specification Case Studies, 2nd edn. Prentice Hall (1993)

    Google Scholar 

  12. Hayes, I.J.: Reasoning about real-time programs using idle-invariant assertions. In: Dong, J.S., He, J., Purvis, M. (eds.) Proceedings of 7th Asia-Pacific Software Engineering Conference (APSEC 2000), pp. 16–23. IEEE Computer Society (2000)

    Google Scholar 

  13. Hayes, I.J.: Reasoning about real-time repetitions: Terminating and nonterminating. Science of Computer Programming 43(2-3), 161–192 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  14. Hayes, I.J.: A predicative semantics for real-time refinement. In: McIver, A., Morgan, C.C. (eds.) Programming Methodology, pp. 109–133. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  15. Hayes, I.J.: Towards platform-independent real-time systems. In: Strooper, P.A. (ed.) ASWEC, pp. 192–200. IEEE Computer Society (2004)

    Google Scholar 

  16. Hayes, I.J.: Termination of real-time programs: Definitely, definitely not, or maybe. In: Dunne, S., Stoddart, W. (eds.) UTP 2006. LNCS, vol. 4010, pp. 141–154. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  17. Hayes, I.J.: Invariants and well-foundedness in program algebra. In: Cavalcanti, A., Deharbe, D., Gaudel, M.-C., Woodcock, J. (eds.) ICTAC 2010. LNCS, vol. 6255, pp. 1–14. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  18. Hayes, I.J., Burns, A., Dongol, B., Jones, C.B.: Comparing degrees of non-deterministic in expression evaluation. The Computer Journal 56(6), 741–755 (2013)

    Article  Google Scholar 

  19. Hayes, I.J., Dunne, S.E., Meinicke, L.: Unifying theories of programming that distinguish nontermination and abort. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 178–194. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  20. Hayes, I.J., Utting, M.: A sequential real-time refinement calculus. Acta Informatica 37(6), 385–448 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  21. Hayes, I.J., Colvin, R.J.: Integrated operational semantics: Small-step, big-step and multi-step. In: Derrick, J., Fitzgerald, J., Gnesi, S., Khurshid, S., Leuschel, M., Reeves, S., Riccobene, E. (eds.) ABZ 2012. LNCS, vol. 7316, pp. 21–35. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  22. Hayes, I.J., Jones, C.B., Colvin, R.J.: Reasoning about concurrent programs: Refining rely-guarantee thinking. Technical Report CS-TR-1395, School of Computing Science, Newcastle University, 66 pages (September 2013)

    Google Scholar 

  23. Hehner, E.C.R.: Termination is timing. In: van de Snepscheut, J.L.A. (ed.) MPC 1989. LNCS, vol. 375, pp. 36–47. Springer, Heidelberg (1989)

    Chapter  Google Scholar 

  24. Hehner, E.C.R.: Abstractions of time. In: Roscoe, A.W. (ed.) A Classical Mind, ch. 12, pp. 191–210. Prentice Hall (1994)

    Google Scholar 

  25. Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice Hall (1998)

    Google Scholar 

  26. Hooman, J.: Extending Hoare logic to real-time. Formal Aspects of Computing 6(6A), 801–825 (1994)

    Article  MATH  Google Scholar 

  27. Jones, C.B.: Systematic Software Development Using VDM, 2nd edn. Prentice-Hall (1990)

    Google Scholar 

  28. Kozen, D.: Kleene algebra with tests. ACM Trans. Prog. Lang. and Sys. 19, 427–443 (1999)

    Article  Google Scholar 

  29. Morgan, C.C.: The specification statement. ACM Trans. Prog. Lang. and Sys. 10(3), 403–419 (1988)

    Article  MATH  Google Scholar 

  30. Morgan, C.C.: Programming from Specifications, 2nd edn. Prentice Hall (1994)

    Google Scholar 

  31. Morgan, C.C., Robinson, K.A.: Specification statements and refinement. IBM Jnl. Res. Dev. 31(5), 546–555 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  32. Morris, J.M.: A theoretical basis for stepwise refinement and the programming calculus. Science of Computer Programming 9(3), 287–306 (1987)

    Article  MATH  MathSciNet  Google Scholar 

  33. Søndergaard, H., Sestoft, P.: Referential transparency, definiteness and unfoldability. Acta Informatica 27, 505–517 (1990)

    Article  MathSciNet  Google Scholar 

  34. Spivey, J.M.: The Z Notation: A Reference Manual, 2nd edn. Prentice Hall International (1992)

    Google Scholar 

  35. Utting, M., Fidge, C.J.: A real-time refinement calculus that changes only time. In: Jifeng, H. (ed.) Proc. 7th BCS/FACS Refinement Workshop, Electronic Workshops in Computing. Springer (July 1996)

    Google Scholar 

  36. von Wright, J.: From Kleene algebra to refinement algebra. In: Boiten, E.A., Möller, B. (eds.) MPC 2002. LNCS, vol. 2386, pp. 233–262. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  37. von Wright, J.: Towards a refinement algebra. Sci. of Comp. Prog. 51, 23–45 (2004)

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Hayes, I.J., Meinicke, L. (2014). Invariants, Well-Founded Statements and Real-Time Program Algebra. In: Jones, C., Pihlajasaari, P., Sun, J. (eds) FM 2014: Formal Methods. FM 2014. Lecture Notes in Computer Science, vol 8442. Springer, Cham. https://doi.org/10.1007/978-3-319-06410-9_23

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-06410-9_23

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-06409-3

  • Online ISBN: 978-3-319-06410-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics