Formal Aspects of Computing

, Volume 23, Issue 3, pp 289–306 | Cite as

Elucidating concurrent algorithms via layers of abstraction and reification

  • Cliff B. Jones
  • Ken G. Pierce


Arguing that intricate concurrent programs satisfy their specifications can be difficult; recording understandable explanations is important for subsequent readers. Abstraction is a key tool even for sequential programs. The purpose here is to explore some abstractions that help readers (and writers) understand the design of concurrent programs. As an illustration, the paper presents a formal development of a non-trivial parallel program: Simpson’s implementation of asynchronous communication mechanisms. Although the correctness of this “4-slot algorithm” has been shown elsewhere, earlier proofs fail to offer much insight into the design. From an understandable (yet formal) design history of this one algorithm, the techniques employed in the explanation are teased out for wider application. Among these techniques is using a “fiction of atomicity” as an aid to understanding the initial steps of development. The rely-guarantee approach is, here, combined with notions of read/write frames and “phased” specifications; furthermore, the atomicity assumptions implied by the rely/guarantee conditions are achieved by clever choice of data representations.


Formal methods Concurrency Program proof Rely/Guarantee conditions Asynchronous Communication Mechanisms Simpson’s Algorithm 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Abr96.
    Abrial J-R (1996) The B-Book: assigning programs to meanings. Cambridge University PressGoogle Scholar
  2. AC05.
    Abrial J-R, Cansell D (2005) Formal construction of a non-blocking concurrent queue algorithm. J Univers Comput Sci 11(5): 744–770Google Scholar
  3. AC08.
    Abrial J-R, Cansell D (2008) Development of a concurrent program. Private communicationGoogle Scholar
  4. BA08.
    Bornat R, Amjad H (2008) Inter-process buffers in separation logic with rely-guarantee. Private communication. Formal Aspects Comput. doi: 10.1007/s00165-009-0141-8
  5. Bro07.
    Brookes SD (2007) A semantics of concurrent separation logic. Theor Comput Sci (Reynolds Festschrift) 375(1–3): 227–270 Preliminary version appeared in CONCUR’04, LNCS 3170, pp 16–34CrossRefzbMATHMathSciNetGoogle Scholar
  6. CJ07.
    Coleman JW, Jones CB (2007) A structural proof of the soundness of rely/guarantee rules. J Logic Comput 17(4): 807–841CrossRefzbMATHMathSciNetGoogle Scholar
  7. dR01.
    de Roever WP (2001) Concurrency verification: introduction to compositional and noncompositional methods. Cambridge University PressGoogle Scholar
  8. dRE99.
    de Roever WP, Engelhardt K (1999) Data refinement: model-oriented proof methods and their comparison. Cambridge University PressGoogle Scholar
  9. Hen04.
    Henderson N (2004) Formal modelling and analysis of an asynchronous communication mechanism. PhD thesis, University of Newcastle upon TyneGoogle Scholar
  10. HP02.
    Henderson N, Paynter SE (2002) The formal classification and verification of Simpson’s 4-slot asynchronous communication mechanism. In: Eriksson L-H, Lindsay PA (eds) FME 2002, Lecture notes in computer science, vol 2391. Springer-Verlag, pp 350–369Google Scholar
  11. JLRW05.
    Jones CB, Lomet D, Romanovsky A, Weikum G (2005) The atomic manifesto. J Univers Comput Sci 11(5): 636–650Google Scholar
  12. Jon81.
    Jones CB (1981) Development methods for computer programs including a notion of interference. PhD thesis, Oxford University, June 1981. Programming Research Group, Technical monograph no. 25Google Scholar
  13. Jon83a.
    Jones CB (1983) Specification and design of (parallel) programs. In: Proceedings of IFIP’83. North-Holland, pp 321–332Google Scholar
  14. Jon83b.
    Jones CB (1983) Tentative steps toward a development method for interfering programs. Trans Program Lang Syst 5(4): 596–619CrossRefzbMATHGoogle Scholar
  15. Jon89.
    Jones CB (1989) Data reification. In McDermid JA (ed) The theory and practice of refinement. Butterworths, pp 79–89Google Scholar
  16. Jon90.
    Jones CB (1990) Systematic software development using VDM, 2nd edn. Prentice HallGoogle Scholar
  17. Jon96.
    Jones CB (1996) Accommodating interference in the formal design of concurrent object-based programs. Formal Methods Syst Des 8(2): 105–122CrossRefGoogle Scholar
  18. Jon03.
    Jones CB (2003) Wanted: a compositional approach to concurrency. In: McIver A, Morgan C (eds) Programming methodology. Springer-Verlag, pp 1–15Google Scholar
  19. Jon07.
    Jones CB (2007) Splitting atoms safely. Theor Comput Sci 357: 109–119CrossRefGoogle Scholar
  20. Jon10.
    Jones CB (2010) The role of auxiliary variables in the formal development of concurrent programs. In: Jones C, Roscoe B (eds) Reflections on the work of C. A. R. Hoare. Springer (in press)Google Scholar
  21. JP08.
    Jones CB, Pierce KG (2008) Splitting atoms with rely/guarantee conditions coupled with data reification. In: ABZ2008, LNCS, vol 5238, pp 360–377Google Scholar
  22. Lam86.
    Lamport L (1986) The mutual exclusion problem: Part I—a theory of interprocess communication. J ACM 33(2): 313–326CrossRefzbMATHMathSciNetGoogle Scholar
  23. Nip86.
    Nipkow T (1986) Non-deterministic data types: models and implementations. Acta Inform 22: 629–661CrossRefzbMATHMathSciNetGoogle Scholar
  24. Nip87.
    Nipkow T (1987) Behavioural implementation concepts for nondeterministic data types. PhD thesis, University of ManchesterGoogle Scholar
  25. O’H07.
    O’Hearn PW (2007) Resources, concurrency and local reasoning. Theor Comput Sci (Reynolds Festschrift) 375(1–3): 271–307 Preliminary version appeared in CONCUR’04, LNCS, vol 3170, pp 49–67CrossRefzbMATHMathSciNetGoogle Scholar
  26. OYR09.
    O’Hearn PW, Yang H, Reynolds JC (2004) Separation and information hiding. ACM TOPLAS 31(3):April 2009. Preliminary version appeared in 31st POPL, pp 268–280Google Scholar
  27. PB05.
    Parkinson M, Bierman G (2005) Separation logic and abstraction. In: POPL ’05: Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on principles of programming languages, New York, NY, USA. ACM, pp 247–258Google Scholar
  28. Pet83a.
    Peterson GL (1983) Concurrent reading while writing. ACM Trans Program Lang Syst 5(1): 46–55CrossRefzbMATHGoogle Scholar
  29. Pet83b.
    Peterson GL (1983) A new solution to lamport’s concurrent programming problem using small shared variables. ACM Trans Program Lang Syst 5(1): 56–65CrossRefzbMATHGoogle Scholar
  30. PHA04.
    Paynter SE, Henderson N, Armstrong JM (2004) Ramifications of meta-stability in bit variables explored via Simpson’s 4-slot mechanism. Formal Aspects Comput 16(4): 332–351CrossRefzbMATHGoogle Scholar
  31. Pie09.
    Pierce K (2009) Enhancing the useability of rely-guaranteee conditions for atomicity refinement. PhD thesis, Newcastle UniversityGoogle Scholar
  32. Rey02.
    Reynolds JC (2002) Separation logic: a logic for shared mutable data structures. In: Proceedings of 17th LICS. IEEE, pp 55–74Google Scholar
  33. Rod08.
    Rodin (2008) Rodin tools can be downloaded from SourceForge.
  34. Ros10.
    Roscoe AW (2010) Understanding concurrent systems. SpringerGoogle Scholar
  35. Rus02.
    Rushby J (2002) Model checking Simpson’s four-slot fully asynchronous communication mechanism. Technical report, SRI, July 2002Google Scholar
  36. Sim90.
    Simpson HR (1990) Four-slot fully asynchronous communication mechanism. IEE Proc Comput Digital Tech 137(1): 17–30CrossRefMathSciNetGoogle Scholar
  37. Sim97.
    Simpson HR (1997) New algorithms for asynchronous communication. IEE Proc Comput Digital Technol 144(4): 227–231CrossRefGoogle Scholar
  38. Vaf07.
    Vafeiadis V (2007) Modular fine-grained concurrency verification. PhD thesis, University of CambridgeGoogle Scholar
  39. WV01.
    Weikum G, Vossen G (2001) Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery. Morgan Kaufmann, Los AltosGoogle Scholar

Copyright information

© British Computer Society 2010

Authors and Affiliations

  1. 1.School of Computing ScienceNewcastle UniversityNewcastleUK

Personalised recommendations