Reasoning about distributive laws in a concurrent refinement algebra (2403.13425v1)
Abstract: Distributive laws are important for algebraic reasoning in arithmetic and logic. They are equally important for algebraic reasoning about concurrent programs. In existing theories such as Concurrent Kleene Algebra, only partial correctness is handled, and many of its distributive laws are weak, in the sense that they are only refinements in one direction, rather than equalities. The focus of this paper is on strengthening our theory to support the proof of strong distributive laws that are equalities, and in doing so come up with laws that are quite general. Our concurrent refinement algebra supports total correctness by allowing both finite and infinite behaviours. It supports the rely/guarantee approach of Jones by encoding rely and guarantee conditions as rely and guarantee commands. The strong distributive laws may then be used to distribute rely and guarantee commands over sequential compositions and into (and out of) iterations. For handling data refinement of concurrent programs, strong distributive laws are essential.
- P. H. G. Aczel. On an inference rule for parallel composition, 1983. Private communication to Cliff Jones http://homepages.cs.ncl.ac.uk/cliff.jones/publications/MSs/PHGA-traces.pdf.
- Refinement Calculus: A Systematic Introduction. Springer, New York, 1998.
- Enhancing the tractability of rely/guarantee specifications in the development of interfering operations. In Gordon Plotkin, Colin Stirling, and Mads Tofte, editors, Proof, Language and Interaction, chapter 10, pages 277–307. MIT Press, 2000.
- Designing a semantic model for a wide-spectrum language with concurrency. Formal Aspects of Computing, 29:853–875, 2016.
- E. W. Dijkstra. Guarded commands, nondeterminacy, and a formal derivation of programs. CACM, 18:453–458, 1975.
- E. W. Dijkstra. A Discipline of Programming. Prentice-Hall, 1976.
- R. W. Floyd. Assigning meanings to programs. In Proceedings of Symposia in Applied Mathematics: Math. Aspects of Comput. Sci., volume 19, pages 19–32, 1967.
- Lindsay Groves. Refinement and the Z schema calculus. Electronic Notes Theoretical Computer Science, 70(3):70–93, 2002.
- I. J. Hayes. Generalised rely-guarantee concurrency: An algebraic foundation. Formal Aspects of Computing, 28(6):1057–1078, November 2016.
- An algebra of synchronous atomic steps. In J. Fitzgerald, C. Heitmeyer, S. Gnesi, and A. Philippou, editors, FM 2016: Formal Methods: 21st International Symposium, Proceedings, volume 9995 of LNCS, pages 352–369, Cham, November 2016. Springer International Publishing.
- A synchronous program algebra: a basis for reasoning about shared-memory and event-based concurrency. Formal Aspects of Computing, 31(2):133–163, April 2019.
- C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576–580, 583, October 1969.
- Laws of programming. Communications of the ACM, 30(8):672–686, August 1987. Corrigenda: CACM 30(9):770.
- Concurrent Kleene Algebra and its foundations. J. Log. Algebr. Program., 80(6):266–296, 2011.
- C. B. Jones. Development Methods for Computer Programs including a Notion of Interference. PhD thesis, Oxford University, June 1981. Available as: Oxford University Computing Laboratory (now Computer Science) Technical Monograph PRG-25.
- C. B. Jones. Specification and design of (parallel) programs. In Proceedings of IFIP’83, pages 321–332. North-Holland, 1983.
- C. B. Jones. Tentative steps toward a development method for interfering programs. ACM ToPLaS, 5(4):596–619, 1983.
- D. Kozen. Kleene algebra with tests. ACM Trans. Prog. Lang. and Sys., 19(3):427–443, May 1997.
- R. Milner. Calculi for synchrony and asynchrony. Theoretical Computer Science, 25(3):267–310, 1983.
- C. C. Morgan. Programming from Specifications. Prentice Hall, second edition, 1994.
- Types and invariants in the refinement calculus. Science of Computer Programming, 14:281–304, 1990.
- Isabelle/HOL: A Proof Assistant for Higher-Order Logic, volume 2283 of LNCS. Springer, 2002.
- C. Prisacariu. Synchronous Kleene Algebra. Journal of Logic and Algebraic Programming, 79(7):608–635, 2010.
- John C. Reynolds. The Craft of Programming. Prentice/Hall International, 1981.
- N. Ward. Adding specification constructors to the refinement calculus. In FME ’93: Industrial-Strength Formal Methods, number 670 in Lecture Notes in Computer Science. Springer-Verlag, 1993.