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.
Similar content being viewed by others
References
Abrial J-R (1996) The B-Book: assigning programs to meanings. Cambridge University Press
Abrial J-R, Cansell D (2005) Formal construction of a non-blocking concurrent queue algorithm. J Univers Comput Sci 11(5): 744–770
Abrial J-R, Cansell D (2008) Development of a concurrent program. Private communication
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
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
Coleman JW, Jones CB (2007) A structural proof of the soundness of rely/guarantee rules. J Logic Comput 17(4): 807–841
de Roever WP (2001) Concurrency verification: introduction to compositional and noncompositional methods. Cambridge University Press
de Roever WP, Engelhardt K (1999) Data refinement: model-oriented proof methods and their comparison. Cambridge University Press
Henderson N (2004) Formal modelling and analysis of an asynchronous communication mechanism. PhD thesis, University of Newcastle upon Tyne
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
Jones CB, Lomet D, Romanovsky A, Weikum G (2005) The atomic manifesto. J Univers Comput Sci 11(5): 636–650
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
Jones CB (1983) Specification and design of (parallel) programs. In: Proceedings of IFIP’83. North-Holland, pp 321–332
Jones CB (1983) Tentative steps toward a development method for interfering programs. Trans Program Lang Syst 5(4): 596–619
Jones CB (1989) Data reification. In McDermid JA (ed) The theory and practice of refinement. Butterworths, pp 79–89
Jones CB (1990) Systematic software development using VDM, 2nd edn. Prentice Hall
Jones CB (1996) Accommodating interference in the formal design of concurrent object-based programs. Formal Methods Syst Des 8(2): 105–122
Jones CB (2003) Wanted: a compositional approach to concurrency. In: McIver A, Morgan C (eds) Programming methodology. Springer-Verlag, pp 1–15
Jones CB (2007) Splitting atoms safely. Theor Comput Sci 357: 109–119
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)
Jones CB, Pierce KG (2008) Splitting atoms with rely/guarantee conditions coupled with data reification. In: ABZ2008, LNCS, vol 5238, pp 360–377
Lamport L (1986) The mutual exclusion problem: Part I—a theory of interprocess communication. J ACM 33(2): 313–326
Nipkow T (1986) Non-deterministic data types: models and implementations. Acta Inform 22: 629–661
Nipkow T (1987) Behavioural implementation concepts for nondeterministic data types. PhD thesis, University of Manchester
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
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
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
Peterson GL (1983) Concurrent reading while writing. ACM Trans Program Lang Syst 5(1): 46–55
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
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
Pierce K (2009) Enhancing the useability of rely-guaranteee conditions for atomicity refinement. PhD thesis, Newcastle University
Reynolds JC (2002) Separation logic: a logic for shared mutable data structures. In: Proceedings of 17th LICS. IEEE, pp 55–74
Rodin (2008) Rodin tools can be downloaded from SourceForge. http://sourceforge.net/projects/rodin-b-sharp/
Roscoe AW (2010) Understanding concurrent systems. Springer
Rushby J (2002) Model checking Simpson’s four-slot fully asynchronous communication mechanism. Technical report, SRI, July 2002
Simpson HR (1990) Four-slot fully asynchronous communication mechanism. IEE Proc Comput Digital Tech 137(1): 17–30
Simpson HR (1997) New algorithms for asynchronous communication. IEE Proc Comput Digital Technol 144(4): 227–231
Vafeiadis V (2007) Modular fine-grained concurrency verification. PhD thesis, University of Cambridge
Weikum G, Vossen G (2001) Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery. Morgan Kaufmann, Los Altos
Author information
Authors and Affiliations
Corresponding author
Additional information
by J. C. P. Woodcock
Rights 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
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-010-0156-1