Advertisement

Engineering a Theory of Concurrent Programming

  • Ian J. HayesEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11232)

Abstract

Our original goal was to develop a refinement calculus for shared-memory concurrent programs to support Jones-style rely/guarantee developments. Our semantics was based on Aczel traces, which explicitly include environment steps as well as program steps, and were originally proposed as a basis for showing the rely/guarantee rules are sound. Where we have ended up is with a hierarchy of algebraic theories that provide a foundation for concurrent program refinement, which allows us to prove Jones-style rely/guarantee laws, as well as new laws. Our algebraic theory is based on a lattice of commands that includes a sub-lattice of test commands (similar to Kozen’s Kleene Algebra with Tests) and a sub-algebra of atomic step commands (similar to Milner’s SCCS) but with a structure that supports Aczel’s program and environment steps as atomic step commands. The latter allows us to directly encode rely and guarantee commands to represent rely/guarantee specifications, and to encode fair execution of a command.

Notes

Acknowledgements

This research was supported Australian Research Council Discovery Grant DP130102901. Thanks are due to Joakim von Wright for introducing us to program algebra and Robert Colvin, Cliff Jones, Larissa Meinicke, Patrick Meiring, Kim Solin, Andrius Velykis, and Kirsten Winter, for their input on ideas presented here.

References

  1. 1.
    Aarts, C., et al.: Fixed-point calculus. Inf. Process. Lett. 53, 131–136 (1995). Mathematics of Program Construction GroupGoogle Scholar
  2. 2.
    Abrial, J.R.: The specification language Z: basic library. Internal report, Programming Research Group, Oxford University (1982)Google Scholar
  3. 3.
    Abrial, J.R., Schuman, S.A., Meyer, B.: Specification language and on the construction of programs: an advanced course. In: McKeag, R.M., Macnaghten, A.M. (eds.) On the Construction of Programs: An Advanced Course, pp. 343–410. Cambridge University Press, Cambridge (1980)Google Scholar
  4. 4.
    Back, R.-J.R., von Wright, J.: Refinement Calculus: A Systematic Introduction. Springer, New York (1998).  https://doi.org/10.1007/978-1-4612-1674-2CrossRefzbMATHGoogle Scholar
  5. 5.
    Bauer, F.L., Broy, M., Gnatz, R., Hesse, W., Krieg-Brückner, B.: A wide spectrum language for program development. In: 3rd International Symposium Programming, Paris, pp. 1–15 (1978)Google Scholar
  6. 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).  https://doi.org/10.1007/3-540-09541-1_29CrossRefGoogle Scholar
  7. 7.
    Cohen, E.: Separation and reduction. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 45–59. Springer, Heidelberg (2000).  https://doi.org/10.1007/10722010_4CrossRefGoogle Scholar
  8. 8.
    Colvin, R.J., Hayes, I.J., Meinicke, L.A.: Designing a semantic model for a wide-spectrum language with concurrency. Formal Aspects Comput. 29, 853–875 (2016)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Dijkstra, E.W.: Guarded commands, nondeterminacy, and a formal derivation of programs. CACM 18, 453–458 (1975)MathSciNetCrossRefGoogle Scholar
  10. 10.
    Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Upper Saddle River (1976)Google Scholar
  11. 11.
    Floyd, R.W.: Assigning meanings to programs. In: Proceedings of Symposia in Applied Mathematics: Mathematical Aspects of Computer Science, vol. 19, pp. 19–32 (1967)Google Scholar
  12. 12.
    Hayes, I.J.: Generalised rely-guarantee concurrency: an algebraic foundation. Formal Aspects Comput. 28(6), 1057–1078 (2016)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Hayes, I.J., Colvin, R.J., Meinicke, L.A., Winter, K., Velykis, A.: An algebra of synchronous atomic steps. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016. LNCS, vol. 9995, pp. 352–369. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-48989-6_22CrossRefGoogle Scholar
  14. 14.
    Hayes, I.J., Jones, C.B., Colvin, R.J.: Laws and semantics for rely-guarantee refinement. Technical report CS-TR-1425, Newcastle University, July 2014Google Scholar
  15. 15.
    Hayes, I. (ed.): Specification Case Studies. Second edn. Prentice Hall International, Upper Saddle River (1993)Google Scholar
  16. 16.
    Hayes, I.J., Meinicke, L.A., Winter, K., Colvin, R.J.: A synchronous program algebra: a basis for reasoning about shared-memory and event-based concurrency. Formal Aspects Comput. (2018).  https://doi.org/10.1007/s00165-018-0464-4
  17. 17.
    Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969). 583CrossRefGoogle Scholar
  18. 18.
    Hoare, C.A.R., et al.: Laws of programming. Commun. ACM, 30(8), 672–686 (1987). Corrigenda: CACM 30(9):770Google Scholar
  19. 19.
    Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice Hall, Upper Saddle River (1998)Google Scholar
  20. 20.
    Jones, C.B.: Development Methods for Computer Programs including a Notion of Interference. Ph.D. thesis, Oxford University, June 1981. Available as: Oxford University Computing Laboratory (now Computer Science) Technical Monograph PRG-25Google Scholar
  21. 21.
    Jones, C.B.: Specification and design of (parallel) programs. In: Proceedings of IFIP 1983, pp. 321–332. North-Holland (1983)Google Scholar
  22. 22.
    Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM ToPLaS 5(4), 596–619 (1983)CrossRefGoogle Scholar
  23. 23.
    Jones, C.B.: Systematic Software Development Using VDM, Second edn. Prentice Hall International, Upper Saddle River (1990)Google Scholar
  24. 24.
    Kozen, D.: Kleene algebra with tests. ACM Trans. Program. Lang. Syst. 19(3), 427–443 (1997)CrossRefGoogle Scholar
  25. 25.
    Milner, R.: Calculi for synchrony and asynchrony. Theoret. Comput. Sci. 25(3), 267–310 (1983)MathSciNetCrossRefGoogle Scholar
  26. 26.
    Morgan, C.C.: The specification statement. ACM Trans. Program. Lang. Syst. 10(3), 403–419 (1988)CrossRefGoogle Scholar
  27. 27.
    Morgan, C.C.: Programming from Specifications, Second edn. Prentice Hall, Upper Saddle River (1994)Google Scholar
  28. 28.
    Morgan, C.C., Vickers, T.N.: Types and invariants in the refinement calculus. Sci. Comput. Program. 14, 281–304 (1990)MathSciNetCrossRefGoogle Scholar
  29. 29.
    Morris, J.M.: A theoretical basis for stepwise refinement and the programming calculus. Sci. Comput. Program. 9(3), 287–306 (1987)MathSciNetCrossRefGoogle Scholar
  30. 30.
    Schwarz, J.: Generic commands–a tool for partial correctness formalisms. Comput. J. 20(2), 151–155 (1977)MathSciNetCrossRefGoogle Scholar
  31. 31.
    von Wright, J.: Towards a refinement algebra. Sci. Comput. Program. 51, 23–45 (2004)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.The University of QueenslandBrisbaneAustralia

Personalised recommendations