A synchronous program algebra: a basis for reasoning about shared-memory and event-based concurrency
- 22 Downloads
In this paper we introduce an abstract algebra for reasoning about concurrent programs, that includes an abstract algebra of atomic steps, with sub-algebras of program and environment steps, and an abstract synchronisation operator. We show how the abstract synchronisation operator can be instantiated as a synchronous parallel operator with interpretations in rely-guarantee concurrency for shared-memory systems, and in process algebras CCS and CSP. It is also instantiated as a weak conjunction operator, an operator that is useful for the specification of rely and guarantee conditions in rely/guarantee concurrency. The main differences between the parallel and weak conjunction instantiations of the synchronisation operator are how they combine individual atomic steps. Lemmas common to these different instantiations are proved once using the axiomatisation of the abstract synchronous operator. Using the sub-algebras of program and environment atomic steps, rely and guarantee conditions, as well as Morgan-style specification commands, are defined at a high-level of abstraction in the program algebra. Lifting these concepts from rely/guarantee concurrency to a higher level of abstraction makes them more widely applicable. We demonstrate the practicality of the algebra by showing how a core law from rely-guarantee theory, the parallel introduction law, can be abstracted and verified easily in the algebra. In addition to proving fundamental properties for reasoning about concurrent shared-variable programs, the algebra is instantiated to prove abstract process synchronisation properties familiar from the process algebras CCS and CSP. The algebra has been encoded in Isabelle/HOL to provide a basis for tool support for concurrent program verification based on the rely/guarantee technique. It facilitates simpler, more general, proofs that allow a higher level of automation than what is possible in low-level, model-specific interpretations.
KeywordsRefinement calculus Program algebra Rely/guarantee Concurrency Process algebra Synchronous parallel
Unable to display preview. Download preview PDF.
We would like to thank Cliff Jones, Kim Solin, Andrius Velykis and the anonymous referees for feedback on this research. This work was supported by Australian Research Council (ARC) Discovery Project DP130102901.
- Acz83.Aczel PHG (1983) On an inference rule for parallel composition. Private communication to Cliff Jones http://homepages.cs.ncl.ac.uk/cliff.jones/publications/MSs/PHGA-traces.pdf
- AGS14.Armstrong A, Gomes VBF, Struth G (2014) Algebras for program correctness in Isabelle/HOL. In: Höfner P et al. (eds) International conference on relational and algebraic methods in computer science (RAMiCS 2014), volume 8428 of Lecture notes in computer science. Springer, pp 49–64Google Scholar
- Bli78.Blikle A (1978) Specified programming. In: Blum EK, Paul M, Takasu S (eds) Mathematical studies of information processing, volume 75 of Lecture notes in computer science. Springer, pp 228–251Google Scholar
- CH09.Colvin RJ, Hayes IJ (2009) CSP with hierarchical state. In: Leuschel M, Wehrheim H (eds) Integrated formal methods (IFM 2009), volume 5423 of LNCS. Springer, pp 118–135Google Scholar
- Hay16.Hayes, I.J.: Generalised rely-guarantee concurrency: an algebraic foundation. Form Asp Comput 28(6), 1057–1078 (November 2016)Google Scholar
- HCM+16.Hayes IJ, Colvin RJ, Meinicke LA, Winter K, Velykis A (2016) An algebra of synchronous atomic steps. In: Fitzgerald J, Heitmeyer C, Gnesi S, Philippou A (eds) FM 2016: formal methods: 21st international symposium, proceedings, volume 9995 of LNCS.Springer International Publishing, Cham, pp 352–369Google Scholar
- HJC14.Hayes IJ, Jones CB, Colvin RJ (2014) Laws and semantics for rely-guarantee refinement. Technical Report CS-TR-1425, Newcastle UniversityGoogle Scholar
- JH16.Jones CB, Hayes IJ (2016) Possible values: exploring a concept for concurrency. J Log Algebr Methods Program 85(5, Part 2):972–984Google Scholar
- Jon81.Jones CB (1981) 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-25Google Scholar
- Jon83a.Jones CB (1983) Specification and design of (parallel) programs. In: Proceedings of IFIP'83. North-Holland, pp 321–332Google Scholar
- NPW02.Nipkow T, Paulson LC, Wenzel M (2002) Isabelle/HOL: a proof assistant for higher-order logic, volume 2283 of LNCS. Springer, BerlinGoogle Scholar
- Pre03.Prensa Nieto L (2003) The rely-guarantee method in Isabelle/HOL. In: Proceedings of ESOP 2003, volume 2618 of LNCS. SpringerGoogle Scholar
- Ros98.Roscoe, A.W.: The theory and practice of concurrency. Prentice-Hall, Englewood-Cliffs (1998)Google Scholar
- SLD08.Sun J, Liu Y, Dong JS (2008) Model checking CSP revisited: introducing a process analysis toolkit. In: Margaria T, Steffen B (eds) Leveraging applications of formal methods, verification and validation: third international symposium, ISoLA 2008, Porto Sani, Greece, October 13–15, 2008. Proceedings. Springer, Berlin, pp 307–322Google Scholar
- Sol07.Solin K (2007) Abstract algebra of program refinement. Ph.D. thesis, Turku Centre for Computer ScienceGoogle Scholar