Skip to main content
Log in

Elucidating concurrent algorithms via layers of abstraction and reification

  • Published:
Formal Aspects of Computing

Abstract

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.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abrial J-R (1996) The B-Book: assigning programs to meanings. Cambridge University Press

  2. Abrial J-R, Cansell D (2005) Formal construction of a non-blocking concurrent queue algorithm. J Univers Comput Sci 11(5): 744–770

    Google Scholar 

  3. Abrial J-R, Cansell D (2008) Development of a concurrent program. Private communication

  4. 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. 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–34

    Article  MATH  MathSciNet  Google Scholar 

  6. Coleman JW, Jones CB (2007) A structural proof of the soundness of rely/guarantee rules. J Logic Comput 17(4): 807–841

    Article  MATH  MathSciNet  Google Scholar 

  7. de Roever WP (2001) Concurrency verification: introduction to compositional and noncompositional methods. Cambridge University Press

  8. de Roever WP, Engelhardt K (1999) Data refinement: model-oriented proof methods and their comparison. Cambridge University Press

  9. Henderson N (2004) Formal modelling and analysis of an asynchronous communication mechanism. PhD thesis, University of Newcastle upon Tyne

  10. 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–369

  11. Jones CB, Lomet D, Romanovsky A, Weikum G (2005) The atomic manifesto. J Univers Comput Sci 11(5): 636–650

    Google Scholar 

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

  13. Jones CB (1983) Specification and design of (parallel) programs. In: Proceedings of IFIP’83. North-Holland, pp 321–332

  14. Jones CB (1983) Tentative steps toward a development method for interfering programs. Trans Program Lang Syst 5(4): 596–619

    Article  MATH  Google Scholar 

  15. Jones CB (1989) Data reification. In McDermid JA (ed) The theory and practice of refinement. Butterworths, pp 79–89

  16. Jones CB (1990) Systematic software development using VDM, 2nd edn. Prentice Hall

  17. Jones CB (1996) Accommodating interference in the formal design of concurrent object-based programs. Formal Methods Syst Des 8(2): 105–122

    Article  Google Scholar 

  18. Jones CB (2003) Wanted: a compositional approach to concurrency. In: McIver A, Morgan C (eds) Programming methodology. Springer-Verlag, pp 1–15

  19. Jones CB (2007) Splitting atoms safely. Theor Comput Sci 357: 109–119

    Article  Google Scholar 

  20. 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)

  21. Jones CB, Pierce KG (2008) Splitting atoms with rely/guarantee conditions coupled with data reification. In: ABZ2008, LNCS, vol 5238, pp 360–377

  22. Lamport L (1986) The mutual exclusion problem: Part I—a theory of interprocess communication. J ACM 33(2): 313–326

    Article  MATH  MathSciNet  Google Scholar 

  23. Nipkow T (1986) Non-deterministic data types: models and implementations. Acta Inform 22: 629–661

    Article  MATH  MathSciNet  Google Scholar 

  24. Nipkow T (1987) Behavioural implementation concepts for nondeterministic data types. PhD thesis, University of Manchester

  25. 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–67

    Article  MATH  MathSciNet  Google Scholar 

  26. 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–280

    Google Scholar 

  27. 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–258

  28. Peterson GL (1983) Concurrent reading while writing. ACM Trans Program Lang Syst 5(1): 46–55

    Article  MATH  Google Scholar 

  29. Peterson GL (1983) A new solution to lamport’s concurrent programming problem using small shared variables. ACM Trans Program Lang Syst 5(1): 56–65

    Article  MATH  Google Scholar 

  30. 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–351

    Article  MATH  Google Scholar 

  31. Pierce K (2009) Enhancing the useability of rely-guaranteee conditions for atomicity refinement. PhD thesis, Newcastle University

  32. Reynolds JC (2002) Separation logic: a logic for shared mutable data structures. In: Proceedings of 17th LICS. IEEE, pp 55–74

  33. Rodin (2008) Rodin tools can be downloaded from SourceForge. http://sourceforge.net/projects/rodin-b-sharp/

  34. Roscoe AW (2010) Understanding concurrent systems. Springer

  35. Rushby J (2002) Model checking Simpson’s four-slot fully asynchronous communication mechanism. Technical report, SRI, July 2002

  36. Simpson HR (1990) Four-slot fully asynchronous communication mechanism. IEE Proc Comput Digital Tech 137(1): 17–30

    Article  MathSciNet  Google Scholar 

  37. Simpson HR (1997) New algorithms for asynchronous communication. IEE Proc Comput Digital Technol 144(4): 227–231

    Article  Google Scholar 

  38. Vafeiadis V (2007) Modular fine-grained concurrency verification. PhD thesis, University of Cambridge

  39. Weikum G, Vossen G (2001) Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery. Morgan Kaufmann, Los Altos

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cliff B. Jones.

Additional information

by J. C. P. Woodcock

Rights and permissions

Reprints and permissions

About this article

Cite this article

Jones, C.B., Pierce, K.G. Elucidating concurrent algorithms via layers of abstraction and reification. Form Asp Comp 23, 289–306 (2011). https://doi.org/10.1007/s00165-010-0156-1

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00165-010-0156-1

Keywords

Navigation