General Lessons from a Rely/Guarantee Development

  • Cliff B. Jones
  • Andrius Velykis
  • Nisansala Yatapanage
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10606)


Decomposing the design (or documentation) of large systems is a practical necessity; this prompts the need for a notion of compositional development methods; finding such methods for concurrent software is technically challenging because of the interference that characterises concurrency. This paper outlines the development of a difficult example in order to draw out lessons about such development methods. Although the “rely/guarantee” approach is employed in the example, the intuitions are more general.



We have benefited from productive discussions with researchers including José Nuno Oliviera and attendees at the January 2017 Northern Concurrency Working Group held at Teesside University. In particular, Simon Doherty pointed out that GC is a nasty challenge for any compositional approach because the mutator/collector were clearly thought out together; this is true but looking at an example at the fringe of R/G expressivity has informed the notion of compositional development.

Our colleagues in Newcastle, Leo Freitas and Diego Machado Dias are currently formalising proofs of the lemmas and POs using Isabelle.

The authors gratefully acknowledge funding for their research from EPSRC grant Taming Concurrency.


  1. [BA84]
    Ben-Ari, M.: Algorithms for on-the-fly garbage collection. ACM Trans. Program. Lang. Syst. 6(3), 333–344 (1984)CrossRefzbMATHGoogle Scholar
  2. [BA10]
    Bornat, R., Amjad, H.: Inter-process buffers in separation logic with rely-guarantee. Formal Aspects Comput. 22(6), 735–772 (2010)CrossRefzbMATHGoogle Scholar
  3. [BA13]
    Bornat, R., Amjad, H.: Explanation of two non-blocking shared-variable communication algorithms. Formal Aspects Comput. 25(6), 893–931 (2013)MathSciNetCrossRefzbMATHGoogle Scholar
  4. [BvW98]
    Back, R.-J.R., von Wright, J.: Refinement Calculus: A Systematic Introduction. Springer, New York (1998)CrossRefzbMATHGoogle Scholar
  5. [CJ00]
    Collette, P., Jones, C.B.: Enhancing the tractability of rely/guarantee specifications in the development of interfering operations. In: Plotkin, G., Stirling, C., Tofte, M. (eds.) Proof, Language and Interaction, Chap. 10, pp. 277–307. MIT Press (2000)Google Scholar
  6. [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)MathSciNetCrossRefzbMATHGoogle Scholar
  7. [Col08]
    Coleman, J.W.: Constructing a Tractable Reasoning Framework upon a Fine-Grained Structural Operational Semantics. Ph.D. thesis, Newcastle University, January 2008Google Scholar
  8. [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). doi: 10.1007/978-3-642-00590-9_26 CrossRefGoogle Scholar
  9. [Din00]
    Jürgen Dingel. Systematic Parallel Programming. Ph.D. thesis, Carnegie Mellon University (2000). CMU-CS-99-172Google Scholar
  10. [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). doi: 10.1007/978-3-642-14107-2_24 CrossRefGoogle Scholar
  11. [FFS07]
    Feng, X., Ferreira, R., Shao, Z.: On the relationship between concurrent separation logic and assume-guarantee reasoning. In: Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 173–188. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-71316-6_13 CrossRefGoogle Scholar
  12. [GGH07]
    Gao, H., Groote, J.F., Hesselink, W.H.: Lock-free parallel and concurrent garbage collection by mark & sweep. Sci. Comput. Program. 64(3), 341–374 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  13. [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
  14. [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
  15. [HL10]
    Hesselink, W.H., Lali, M.I.: Simple concurrent garbage collection almost without synchronization. Formal Methods Syst. Des. 36(2), 148–166 (2010)CrossRefzbMATHGoogle Scholar
  16. [Hoa72]
    Hoare, C.A.R.: Towards a theory of parallel programming. In: Operating System Techniques, pp. 61–71. Academic Press (1972)Google Scholar
  17. [JH16]
    Jones, C.B., Hayes, I.J.: Possible values: exploring a concept for concurrency. J. Logical Algebraic Methods Program. 85(5, Part 2), 972–984 (2016). Articles dedicated to Prof. J. N. Oliveira on the occasion of his 60th birthdayMathSciNetCrossRefzbMATHGoogle Scholar
  18. [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)MathSciNetCrossRefzbMATHGoogle Scholar
  19. [Jon81]
    Jones,C.B.: Development Methods for Computer Programs including a Notion of Interference. Ph.D. thesis, Oxford University, June 1981. Oxford University Computing Laboratory (now Computer Science) Technical Monograph PRG-25Google Scholar
  20. [Jon90]
    Jones, C.B.: Systematic Software Development using VDM, 2nd edn. Prentice Hall International, Englewood Cliffs (1990)zbMATHGoogle Scholar
  21. [Jon96]
    Jones, C.B.: Accommodating interference in the formal design of concurrent object-based programs. Formal Methods Syst. Des. 8(2), 105–122 (1996)CrossRefGoogle Scholar
  22. [JP11]
    Jones, C.B., Pierce, K.G.: Elucidating concurrent algorithms via layers of abstraction and reification. Formal Aspects Comput. 23(3), 289–306 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
  23. [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). doi: 10.1007/978-3-319-22969-0_1 CrossRefGoogle Scholar
  24. [Mor90]
    Morgan, C.: Programming from Specifications. Prentice-Hall, New York (1990)zbMATHGoogle Scholar
  25. [NE00]
    Nieto, L.P., Esparza, J.: Verifying single and multi-mutator garbage collectors with owicki-gries in Isabelle/HOL. In: Nielsen, M., Rovan, B. (eds.) MFCS 2000. LNCS, vol. 1893, pp. 619–628. Springer, Heidelberg (2000). doi: 10.1007/3-540-44612-5_57 CrossRefGoogle Scholar
  26. [OG76]
    Owicki, S.S., Gries, D.: An axiomatic proof technique for parallel programs I. Acta Informatica 6(4), 319–340 (1976)MathSciNetCrossRefzbMATHGoogle Scholar
  27. [O’H07]
    O’Hearn, P.W.: Resources, concurrency and local reasoning. Theoret. Comput. Sci. 375(1–3), 271–307 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  28. [Owi75]
    Owicki, S.: Axiomatic Proof Techniques for Parallel Programs. Ph.D. thesis, Department of Computer Science, Cornell University (1975)Google Scholar
  29. [Par10]
    Parkinson, M.: The next 700 separation logics. In: Leavens, G.T., O’Hearn, P., Rajamani, S.K. (eds.) VSTTE 2010. LNCS, vol. 6217, pp. 169–182. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-15057-9_12 CrossRefGoogle Scholar
  30. [Pie09]
    Pierce, K.: Enhancing the Useability of Rely-Guaranteee Conditions for Atomicity Refinement. Ph.D. thesis, Newcastle University (2009)Google Scholar
  31. [PPS10]
    Pavlovic, D., Pepper, P., Smith, D.R.: Formal derivation of concurrent garbage collectors. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 353–376. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-13321-3_20 CrossRefGoogle Scholar
  32. [Pre01]
    Nieto, L.P.: 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
  33. [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
  34. [Stø90]
    Stølen, K.: Development of Parallel Programs on Shared Data-Structures. Ph.D. thesis, Manchester University (1990). UMCS-91-1-1Google Scholar
  35. [TSBR08]
    Torp-Smith, N., Birkedal, L., Reynolds, J.C.: Local reasoning about a copying garbage collector. ToPLaS 30, 1–58 (2008)CrossRefzbMATHGoogle Scholar
  36. [Vaf07]
    Vafeiadis, V.: Modular fine-grained concurrency verification. Ph.D. thesis, University of Cambridge (2007)Google Scholar
  37. [vdS87]
    van de Jan, L.A.: “Algorithms for on-the-fly garbage collection” revisited. Inf. Process. Lett. 24(4), 211–216 (1987)CrossRefGoogle Scholar
  38. [VYB06]
    Vechev, M.T., Yahav, E., Bacon, D.F.: Correctness-preserving derivation of concurrent garbage collection algorithms. In: PLDI, pp. 341–353 (2006)Google Scholar
  39. [WDP10]
    Wickerson, J., Dodds, M., Parkinson, M.: Explicit stabilisation for modular rely-guarantee reasoning. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 610–629. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-11957-6_32 CrossRefGoogle Scholar
  40. [Xu92]
    Xu, Q.: A Theory of State-based Parallel Programming. Ph.D. thesis, Oxford University (1992)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Cliff B. Jones
    • 1
  • Andrius Velykis
    • 1
  • Nisansala Yatapanage
    • 1
    • 2
  1. 1.School of Computing ScienceNewcastle UniversityNewcastle upon TyneUK
  2. 2.School of Computer Science and InformaticsDe Montfort UniversityLeicesterUK

Personalised recommendations