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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abadi, M., Lamport, L.: An old-fashioned recipe for real time. ACM Trans. on Prog. Lang. and Sys. 16(5), 1543–1571 (1994)
Abrial, J.-R.: The B-Book: Assigning programs to meanings. Cambridge University Press (1996)
Asarin, E., Caspi, P., Maler, O.: Timed regular expressions. J. ACM 49(2), 172–206 (2002)
Back, R.-J.R., von Wright, J.: Refinement Calculus: A Systematic Introduction. Springer, New York (1998)
Back, R.-J.R., von Wright, J.: Reasoning algebraically about loops. Acta Informatica 36, 295–334 (1999)
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)
Cohen, E.: Separation and reduction. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 45–59. Springer, Heidelberg (2000)
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)
Colvin, R.J., Hayes, I.J.: Structural operational semantics through context-dependent behaviour. Journal of Logic and Algebraic Programming 80(7), 392–426 (2011)
Conway, J.H.: Regular Algebra and Finite Machines. Chapman Hall (1971)
Hayes, I.J. (ed.): Specification Case Studies, 2nd edn. Prentice Hall (1993)
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)
Hayes, I.J.: Reasoning about real-time repetitions: Terminating and nonterminating. Science of Computer Programming 43(2-3), 161–192 (2002)
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)
Hayes, I.J.: Towards platform-independent real-time systems. In: Strooper, P.A. (ed.) ASWEC, pp. 192–200. IEEE Computer Society (2004)
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)
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)
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)
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)
Hayes, I.J., Utting, M.: A sequential real-time refinement calculus. Acta Informatica 37(6), 385–448 (2001)
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)
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)
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)
Hehner, E.C.R.: Abstractions of time. In: Roscoe, A.W. (ed.) A Classical Mind, ch. 12, pp. 191–210. Prentice Hall (1994)
Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice Hall (1998)
Hooman, J.: Extending Hoare logic to real-time. Formal Aspects of Computing 6(6A), 801–825 (1994)
Jones, C.B.: Systematic Software Development Using VDM, 2nd edn. Prentice-Hall (1990)
Kozen, D.: Kleene algebra with tests. ACM Trans. Prog. Lang. and Sys. 19, 427–443 (1999)
Morgan, C.C.: The specification statement. ACM Trans. Prog. Lang. and Sys. 10(3), 403–419 (1988)
Morgan, C.C.: Programming from Specifications, 2nd edn. Prentice Hall (1994)
Morgan, C.C., Robinson, K.A.: Specification statements and refinement. IBM Jnl. Res. Dev. 31(5), 546–555 (1987)
Morris, J.M.: A theoretical basis for stepwise refinement and the programming calculus. Science of Computer Programming 9(3), 287–306 (1987)
Søndergaard, H., Sestoft, P.: Referential transparency, definiteness and unfoldability. Acta Informatica 27, 505–517 (1990)
Spivey, J.M.: The Z Notation: A Reference Manual, 2nd edn. Prentice Hall International (1992)
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)
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)
von Wright, J.: Towards a refinement algebra. Sci. of Comp. Prog. 51, 23–45 (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)