Skip to main content

Engineering a Theory of Concurrent Programming

  • Conference paper
  • First Online:
  • 1054 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNPSE,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.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.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

Learn about institutional subscriptions

Notes

  1. 1.

    Note that some authors, e.g. Kozen [24], make use of the dual lattice with a reversed ordering \(d \le c\) that mean d refines c, and hence their nondeterministic choice operator is the lattice join (rather than meet).

  2. 2.

    Authors using the dual lattice make use of the dual of greatest fixed point, i.e. least fixed point.

References

  1. Aarts, C., et al.: Fixed-point calculus. Inf. Process. Lett. 53, 131–136 (1995). Mathematics of Program Construction Group

    Google Scholar 

  2. Abrial, J.R.: The specification language Z: basic library. Internal report, Programming Research Group, Oxford University (1982)

    Google Scholar 

  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. 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-2

    Book  MATH  Google Scholar 

  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. 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_29

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

    Chapter  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  9. Dijkstra, E.W.: Guarded commands, nondeterminacy, and a formal derivation of programs. CACM 18, 453–458 (1975)

    Article  MathSciNet  Google Scholar 

  10. Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Upper Saddle River (1976)

    Google Scholar 

  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. Hayes, I.J.: Generalised rely-guarantee concurrency: an algebraic foundation. Formal Aspects Comput. 28(6), 1057–1078 (2016)

    Article  MathSciNet  Google Scholar 

  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_22

    Chapter  Google Scholar 

  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 2014

    Google Scholar 

  15. Hayes, I. (ed.): Specification Case Studies. Second edn. Prentice Hall International, Upper Saddle River (1993)

    Google Scholar 

  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. Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969). 583

    Article  Google Scholar 

  18. Hoare, C.A.R., et al.: Laws of programming. Commun. ACM, 30(8), 672–686 (1987). Corrigenda: CACM 30(9):770

    Google Scholar 

  19. Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice Hall, Upper Saddle River (1998)

    Google Scholar 

  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-25

    Google Scholar 

  21. Jones, C.B.: Specification and design of (parallel) programs. In: Proceedings of IFIP 1983, pp. 321–332. North-Holland (1983)

    Google Scholar 

  22. Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM ToPLaS 5(4), 596–619 (1983)

    Article  Google Scholar 

  23. Jones, C.B.: Systematic Software Development Using VDM, Second edn. Prentice Hall International, Upper Saddle River (1990)

    Google Scholar 

  24. Kozen, D.: Kleene algebra with tests. ACM Trans. Program. Lang. Syst. 19(3), 427–443 (1997)

    Article  Google Scholar 

  25. Milner, R.: Calculi for synchrony and asynchrony. Theoret. Comput. Sci. 25(3), 267–310 (1983)

    Article  MathSciNet  Google Scholar 

  26. Morgan, C.C.: The specification statement. ACM Trans. Program. Lang. Syst. 10(3), 403–419 (1988)

    Article  Google Scholar 

  27. Morgan, C.C.: Programming from Specifications, Second edn. Prentice Hall, Upper Saddle River (1994)

    Google Scholar 

  28. Morgan, C.C., Vickers, T.N.: Types and invariants in the refinement calculus. Sci. Comput. Program. 14, 281–304 (1990)

    Article  MathSciNet  Google Scholar 

  29. Morris, J.M.: A theoretical basis for stepwise refinement and the programming calculus. Sci. Comput. Program. 9(3), 287–306 (1987)

    Article  MathSciNet  Google Scholar 

  30. Schwarz, J.: Generic commands–a tool for partial correctness formalisms. Comput. J. 20(2), 151–155 (1977)

    Article  MathSciNet  Google Scholar 

  31. von Wright, J.: Towards a refinement algebra. Sci. Comput. Program. 51, 23–45 (2004)

    Article  MathSciNet  Google Scholar 

Download references

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ian J. Hayes .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Hayes, I.J. (2018). Engineering a Theory of Concurrent Programming. In: Sun, J., Sun, M. (eds) Formal Methods and Software Engineering. ICFEM 2018. Lecture Notes in Computer Science(), vol 11232. Springer, Cham. https://doi.org/10.1007/978-3-030-02450-5_1

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-02450-5_1

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-02449-9

  • Online ISBN: 978-3-030-02450-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics