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.
This work was supported by Australian Research Council (ARC) Discovery Project DP130102901 and the UK EPSRC “Taming Concurrency” and “Strata” research grants.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
This operator was originally devised by us to allow guarantees to be expressed as a separate command, which is then combined with the rest of the specification using weak conjunction. Weak conjunction has since found wider use as a general composition operator.
- 2.
For brevity, it is assumed here that \(Pr(x)\) is always defined—undefinedness is considered in [CJ07] but it has little bearing on the concurrency aspects of the application.
- 3.
Generalising to an arbitrary number of threads presents no conceptual difficulties but also offers no further insight.
- 4.
As observed in Sect. 1.3, achieving rely and/or guarantee conditions is often linked with data reification, for instance, viewing \(min\{ot, et\}\) as a representation of the abstract variable t.
- 5.
- 6.
Published as a book [Mid93].
- 7.
SAGL [FFS07] has a similar scope.
- 8.
The negative flavour of this adjective was probably intentional.
References
Armstrong, A.: Formal analysis of concurrent programs. Ph.D. thesis, University of Sheffield (2016)
Bornat, R., Amjad, H.: Inter-process buffers in separation logic with rely-guarantee. Formal Aspects Comput. 22(6), 735–772 (2010)
Bornat, R., Amjad, H.: Explanation of two non-blocking shared-variable communication algorithms. Formal Aspects Comput. 25(6), 893–931 (2013)
Buechi, M.: Safe language mechanisms for modularization and concurrency. Ph.D. thesis, Turku (2000)
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
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)
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)
Coleman, J.W., Jones, C.B.: A structural proof of the soundness of rely/guarantee rules. J. Logic Comput. 17(4), 807–841 (2007)
Chandy, K.M., Misra, J.: Parallel Program Design: A Foundation. Addison-Wesley, Boston (1988)
Collette, P.: Design of compositional proof systems based on assumption-commitment specifications - application to UNITY. Ph.D. thesis, Louvain-la-Neuve, June 1994
Coleman, J.W.: Constructing a tractable reasoning framework upon a fine-grained structural operational semantics. Ph.D. thesis, Newcastle University, January 2008
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_26
Dias, D.M.: Mechanising an algebraic rely-guarantee refinement calculus. Ph.D. thesis, School of Computing, Newcastle University (2017)
Dingel, J.: Systematic parallel programming. Ph.D. thesis, Carnegie Mellon University (2000). CMU-CS-99-172
de Roever, W.-P.: Concurrency Verification: Introduction to Compositional and Noncompositional Methods. Cambridge University Press, Cambridge (2001)
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_24
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_13
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)
Hayes, I.J.: Generalised rely-guarantee concurrency: an algebraic foundation. Formal Aspects Comput. 28(6), 1057–1078 (2016)
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)
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
Henderson, N.: Formal modelling and analysis of an asynchronous communication mechanism. Ph.D. thesis, University of Newcastle upon Tyne (2004)
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
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 2018
Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM, 12(10), 576–580, 583 (1969)
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)
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 birthday
Jones, C.B., Hayes, I.J., Colvin, R.J.: Balancing expressiveness in formal approaches to concurrency. Formal Aspects Comput. 27(3), 475–497 (2015)
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_16
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
Jones, C.B.: Specification and design of (parallel) programs. In: Proceedings of IFIP 1983, pp. 321–332. North-Holland (1983)
Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM ToPLaS 5(4), 596–619 (1983)
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)
Jones, C.B., Pierce, K.G.: Elucidating concurrent algorithms via layers of abstraction and reification. Formal Aspects Comput. 23(3), 289–306 (2011)
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_1
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_1
Kozen, D.: Kleene algebra with tests. ACM Trans. Prog. Lang. Syst. 19(3), 427–443 (1997)
Liang, H.: Refinement verification of concurrent programs and its applications. Ph.D. thesis, USTC, China (2014)
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_29
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 1990
Middelburg, C.A.: Logic and Specification: Extending VDM-SL for Advanced Formal Specification. Chapman and Hall, Boca Raton (1993)
Morgan, C.: Programming from Specifications. Prentice-Hall, Upper Saddle River (1990)
Moszkowski, B.C.: Executing Temporal Logic Programs. Cambridge University Press, Cambridge (1986)
O’Hearn, P.W.: Resources, concurrency and local reasoning. Theor. Comput. Sci. 375(1–3), 271–307 (2007)
Owicki, S.: Axiomatic proof techniques for parallel programs. Ph.D. thesis, Department of Computer Science, Cornell University (1975)
Pierce, K.: Enhancing the useability of rely-guaranteee conditions for atomicity refinement. Ph.D. thesis, Newcastle University (2009)
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)
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)
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)
Schellhorn, G., Tofan, B., Ernst, G., Reif, W.: Interleaved programs and rely-guarantee reasoning with ITL. In: TIME, pp. 99–106 (2011)
Stølen, K.: Development of parallel programs on shared data-structures. Ph.D. thesis, Manchester University (1990). Available as UMCS-91-1-1
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_28
Vafeiadis, V.: Modular fine-grained concurrency verification. Ph.D. thesis, University of Cambridge (2007)
Wickerson, J.: Concurrent verification for sequential programs. Ph.D. thesis, Cambridge (2013)
Xu, Q.: A theory of state-based parallel programming. Ph.D. thesis, Oxford University (1992)
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.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Hayes, I.J., Jones, C.B. (2018). A Guide to Rely/Guarantee Thinking. In: Bowen, J., Liu, Z., Zhang, Z. (eds) Engineering Trustworthy Software Systems. SETSS 2017. Lecture Notes in Computer Science(), vol 11174. Springer, Cham. https://doi.org/10.1007/978-3-030-02928-9_1
Download citation
DOI: https://doi.org/10.1007/978-3-030-02928-9_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-02927-2
Online ISBN: 978-3-030-02928-9
eBook Packages: Computer ScienceComputer Science (R0)