Advertisement

A Guide to Rely/Guarantee Thinking

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

Abstract

Designing concurrent shared-variable programs is difficult. The Rely-Guarantee concept provides a compositional approach to the challenge. This paper reviews some recent developments in the approach, offers worked examples and relates the approach to other research.

Notes

Acknowledgements

This research was supported by Australian Research Council (ARC) Discovery Grant DP130102901 “Understanding concurrent programs using rely-guarantee thinking” and the UK EPSRC “Taming Concurrency” and “Strata” research grants. Thanks are due to Robert Colvin, Diego Machado Dias, Larissa Meinicke, Patrick Meiring, Andrius Velykis, Kirsten Winter and Nisansala Yatapanage for feedback on ideas presented in this paper. The authors are particularly grateful to the anonymous reviewers for detailed and constructive comments.

References

  1. [Arm16]
    Armstrong, A.: Formal analysis of concurrent programs. Ph.D. thesis, University of Sheffield (2016)Google Scholar
  2. [BA10]
    Bornat, R., Amjad, H.: Inter-process buffers in separation logic with rely-guarantee. Formal Aspects Comput. 22(6), 735–772 (2010)CrossRefGoogle Scholar
  3. [BA13]
    Bornat, R., Amjad, H.: Explanation of two non-blocking shared-variable communication algorithms. Formal Aspects Comput. 25(6), 893–931 (2013)MathSciNetCrossRefGoogle Scholar
  4. [Bue00]
    Buechi, M.: Safe language mechanisms for modularization and concurrency. Ph.D. thesis, Turku (2000)Google Scholar
  5. [BvW98]
    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
  6. [CHM16]
    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
  7. [CJ00]
    Collette, P., Jones, C.B.: Enhancing the tractability of rely/guarantee specifications in the development of interfering operations (Chap. 10). In: Plotkin, G., Stirling, C., Tofte, M. (eds.) Proof, Language and Interaction, pp. 277–307. MIT Press (2000)Google Scholar
  8. [CJ07]
    Coleman, J.W., Jones, C.B.: A structural proof of the soundness of rely/guarantee rules. J. Logic Comput. 17(4), 807–841 (2007)MathSciNetCrossRefGoogle Scholar
  9. [CM88]
    Chandy, K.M., Misra, J.: Parallel Program Design: A Foundation. Addison-Wesley, Boston (1988)zbMATHGoogle Scholar
  10. [Col94]
    Collette, P.: Design of compositional proof systems based on assumption-commitment specifications - application to UNITY. Ph.D. thesis, Louvain-la-Neuve, June 1994Google Scholar
  11. [Col08]
    Coleman, J.W.: Constructing a tractable reasoning framework upon a fine-grained structural operational semantics. Ph.D. thesis, Newcastle University, January 2008Google Scholar
  12. [DFPV09]
    Dodds, M., Feng, X., Parkinson, M., Vafeiadis, V.: Deny-guarantee reasoning. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 363–377. Springer, Heidelberg (2009).  https://doi.org/10.1007/978-3-642-00590-9_26CrossRefGoogle Scholar
  13. [Dia17]
    Dias, D.M.: Mechanising an algebraic rely-guarantee refinement calculus. Ph.D. thesis, School of Computing, Newcastle University (2017)Google Scholar
  14. [Din00]
    Dingel, J.: Systematic parallel programming. Ph.D. thesis, Carnegie Mellon University (2000). CMU-CS-99-172Google Scholar
  15. [dR01]
    de Roever, W.-P.: Concurrency Verification: Introduction to Compositional and Noncompositional Methods. Cambridge University Press, Cambridge (2001)zbMATHGoogle Scholar
  16. [DYDG+10]
    Dinsdale-Young, T., Dodds, M., Gardner, P., Parkinson, M.J., Vafeiadis, V.: Concurrent abstract predicates. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 504–528. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-14107-2_24CrossRefGoogle Scholar
  17. [FFS07]
    Feng, X., Ferreira, R., Shao, Z.: On the relationship between concurrent separation logic and assume-guarantee reasoning. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 173–188. Springer, Heidelberg (2007).  https://doi.org/10.1007/978-3-540-71316-6_13CrossRefzbMATHGoogle Scholar
  18. [Flo67]
    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
  19. [Hay16]
    Hayes, I.J.: Generalised rely-guarantee concurrency: an algebraic foundation. Formal Aspects Comput. 28(6), 1057–1078 (2016)MathSciNetCrossRefGoogle Scholar
  20. [HBDJ13]
    Hayes, I.J., Burns, A., Dongol, B., Jones, C.B.: Comparing degrees of non-determinism in expression evaluation. Comput. J. 56(6), 741–755 (2013)CrossRefGoogle Scholar
  21. [HCM+16]
    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
  22. [Hen04]
    Henderson, N.: Formal modelling and analysis of an asynchronous communication mechanism. Ph.D. thesis, University of Newcastle upon Tyne (2004)Google Scholar
  23. [HJC14]
    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
  24. [HMWC18]
    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 (2018). Formal Aspects of Computing. Online 6 August 2018Google Scholar
  25. [Hoa69]
    Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM, 12(10), 576–580, 583 (1969)CrossRefGoogle Scholar
  26. [HvSM+16]
    Hoare, T., van Staden, S., Möller, B., Struth, G., Zhu, H.: Developments in concurrent Kleene algebra. J. Log. Algebraic Methods Program. 85(4), 617–636 (2016)MathSciNetCrossRefGoogle Scholar
  27. [JH16]
    Jones, C.B., Hayes, I.J.: Possible values: exploring a concept for concurrency. J. Log. Algebraic Methods Program. 85(5, Part 2), 972–984 (2016). Articles dedicated to Prof. J. N. Oliveira on the occasion of his 60th birthdayMathSciNetCrossRefGoogle Scholar
  28. [JHC15]
    Jones, C.B., Hayes, I.J., Colvin, R.J.: Balancing expressiveness in formal approaches to concurrency. Formal Aspects Comput. 27(3), 475–497 (2015)MathSciNetCrossRefGoogle Scholar
  29. [JHJ07]
    Jones, C.B., Hayes, I.J., Jackson, M.A.: Deriving specifications for systems that are connected to the physical world. In: Jones, C.B., Liu, Z., Woodcock, J. (eds.) Formal Methods and Hybrid Real-Time Systems. LNCS, vol. 4700, pp. 364–390. Springer, Heidelberg (2007).  https://doi.org/10.1007/978-3-540-75221-9_16CrossRefGoogle Scholar
  30. [Jon81]
    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
  31. [Jon83a]
    Jones, C.B.: Specification and design of (parallel) programs. In: Proceedings of IFIP 1983, pp. 321–332. North-Holland (1983)Google Scholar
  32. [Jon83b]
    Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM ToPLaS 5(4), 596–619 (1983)CrossRefGoogle Scholar
  33. [Jon10]
    Jones, C.B.: From problem frames to HJJ (and its known unknowns) (Chap. 16). In: Nuseibeh, B., Zave, P. (eds.) Software Requirements and Design: The Work of Michael Jackson, pp. 357–372. Good Friends Publishing Company (2010)Google Scholar
  34. [JP11]
    Jones, C.B., Pierce, K.G.: Elucidating concurrent algorithms via layers of abstraction and reification. Formal Aspects Comput. 23(3), 289–306 (2011)MathSciNetCrossRefGoogle Scholar
  35. [JVY17]
    Jones, C.B., Velykis, A., Yatapanage, N.: General lessons from a rely/guarantee development. In: Larsen, K.G., Sokolsky, O., Wang, J. (eds.) SETTA 2017. LNCS, vol. 10606, pp. 3–22. Springer, Cham (2017).  https://doi.org/10.1007/978-3-319-69483-2_1CrossRefGoogle Scholar
  36. [JY15]
    Jones, C.B., Yatapanage, N.: Reasoning about separation using abstraction and reification. In: Calinescu, R., Rumpe, B. (eds.) SEFM 2015. LNCS, vol. 9276, pp. 3–19. Springer, Cham (2015).  https://doi.org/10.1007/978-3-319-22969-0_1CrossRefzbMATHGoogle Scholar
  37. [Koz97]
    Kozen, D.: Kleene algebra with tests. ACM Trans. Prog. Lang. Syst. 19(3), 427–443 (1997)CrossRefGoogle Scholar
  38. [Lia14]
    Liang, H.: Refinement verification of concurrent programs and its applications. Ph.D. thesis, USTC, China (2014)Google Scholar
  39. [LV16]
    Lahav, O., Vafeiadis, V.: Explaining relaxed memory models with program transformations. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016. LNCS, vol. 9995, pp. 479–495. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-48989-6_29CrossRefGoogle Scholar
  40. [Mid90]
    Middelburg, C.A.: Syntax and semantics of VVSL: a language for structured VDM specifications. Ph.D. thesis, PTT Research, Leidschendam, Department of Applied Computer Science, September 1990Google Scholar
  41. [Mid93]
    Middelburg, C.A.: Logic and Specification: Extending VDM-SL for Advanced Formal Specification. Chapman and Hall, Boca Raton (1993)Google Scholar
  42. [Mor90]
    Morgan, C.: Programming from Specifications. Prentice-Hall, Upper Saddle River (1990)zbMATHGoogle Scholar
  43. [Mos86]
    Moszkowski, B.C.: Executing Temporal Logic Programs. Cambridge University Press, Cambridge (1986)zbMATHGoogle Scholar
  44. [O’H07]
    O’Hearn, P.W.: Resources, concurrency and local reasoning. Theor. Comput. Sci. 375(1–3), 271–307 (2007)MathSciNetCrossRefGoogle Scholar
  45. [Owi75]
    Owicki, S.: Axiomatic proof techniques for parallel programs. Ph.D. thesis, Department of Computer Science, Cornell University (1975)Google Scholar
  46. [Pie09]
    Pierce, K.: Enhancing the useability of rely-guaranteee conditions for atomicity refinement. Ph.D. thesis, Newcastle University (2009)Google Scholar
  47. [Pre01]
    Prensa Nieto, L.: Verification of parallel programs with the Owicki-Gries and rely-guarantee methods in Isabelle/HOL. Ph.D. thesis, Institut für Informatic der Technischen Universitaet München (2001)Google Scholar
  48. [Rey02]
    Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: IEEE Symposium on Logic in Computer Science (LICS), pp. 55–74. IEEE Computer Society (2002)Google Scholar
  49. [STE+14]
    Schellhorn, G., Tofan, B., Ernst, G., Pfähler, J., Reif, W.: RGITL: a temporal logic framework for compositional reasoning about interleaved programs. Ann. Math. Artif. Intell. 71(1–3), 131–174 (2014)MathSciNetCrossRefGoogle Scholar
  50. [STER11]
    Schellhorn, G., Tofan, B., Ernst, G., Reif, W.: Interleaved programs and rely-guarantee reasoning with ITL. In: TIME, pp. 99–106 (2011)Google Scholar
  51. [Stø90]
    Stølen, K.: Development of parallel programs on shared data-structures. Ph.D. thesis, Manchester University (1990). Available as UMCS-91-1-1Google Scholar
  52. [SZH+17]
    Sanán, D., Zhao, Y., Hou, Z., Zhang, F., Tiu, A., Liu, Y.: CSimpl: a rely-guarantee-based framework for verifying concurrent programs. In: Legay, A., Margaria, T. (eds.) TACAS 2017. LNCS, vol. 10205, pp. 481–498. Springer, Heidelberg (2017).  https://doi.org/10.1007/978-3-662-54577-5_28CrossRefGoogle Scholar
  53. [Vaf07]
    Vafeiadis, V.: Modular fine-grained concurrency verification. Ph.D. thesis, University of Cambridge (2007)Google Scholar
  54. [Wic13]
    Wickerson, J.: Concurrent verification for sequential programs. Ph.D. thesis, Cambridge (2013)Google Scholar
  55. [Xu92]
    Xu, Q.: A theory of state-based parallel programming. Ph.D. thesis, Oxford University (1992)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.School of Information Technology and Electrical EngineeringThe University of QueenslandBrisbaneAustralia
  2. 2.School of Computing ScienceNewcastle UniversityNewcastle upon TyneUK

Personalised recommendations