Designing a semantic model for a wide-spectrum language with concurrency

A wide-spectrum language integrates specification constructs into a programming language in a manner that treats a specification command just like any other command. The primary contribution of this paper is a semantic model for a wide-spectrum language that supports concurrency and a refinement calculus. A distinguishing feature of the language is that steps of the environment are modelled explicitly, alongside steps of the program. From these two types of steps a rich set of specification commands can be constructed, based on operators for nondeterministic choice, and sequential and parallel composition. We also introduce a novel operator, weak conjunction, which is used extensively to conjoin separate aspects of specifications, allowing us to take a separation-of-concerns approach to subsequent reasoning. We provide a denotational semantics for the language based on traces, which may be terminating, aborting, infeasible, or infinite. To demonstrate the generality and unifying strength of the language, we use it to express a range of concepts from the concurrency literature, including: a refinement theory for rely/guarantee reasoning; an abstract specification of local variables in a concurrent context; specification of an abstract, linearisable data structure; a partial encoding of temporal logic; and defining the relationships between notions of nonblocking programs. The novelty of the paper is that these diverse concepts build on the same theory. In particular, the rely concept from Jones’ rely/guarantee framework, and a stronger demand concept that restricts the environment, are reused across the different domains to express assumptions about the environment. The language and model form an instance of an abstract concurrent program algebra, and this facilitates reasoning about properties of the model at a high level of abstraction.

[1]  Amir Pnueli,et al.  The temporal logic of programs , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[2]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[3]  Cliff B. Jones,et al.  Tentative steps toward a development method for interfering programs , 1983, TOPL.

[4]  Jim Woodcock,et al.  Using Z - specification, refinement, and proof , 1996, Prentice Hall international series in computer science.

[5]  Cliff B. Jones,et al.  Balancing expressiveness in formal approaches to concurrency , 2015, Formal Aspects of Computing.

[6]  Ian J. Hayes,et al.  Deadlines are termination , 1998, PROCOMET.

[7]  Ralph-Johan Back A Method for Refining Atomicity in Parallel Algorithms , 1989, PARLE.

[8]  C. A. R. Hoare,et al.  Communicating Sequential Processes (Reprint) , 1983, Commun. ACM.

[9]  Stephen D. Brookes Full Abstraction for a Shared-Variable Parallel Language , 1996, Inf. Comput..

[10]  Carroll Morgan,et al.  The specification statement , 1988, TOPL.

[11]  Maurice Herlihy,et al.  Obstruction-free synchronization: double-ended queues as an example , 2003, 23rd International Conference on Distributed Computing Systems, 2003. Proceedings..

[12]  Stephen Brookes A semantics for concurrent separation logic , 2007, Theor. Comput. Sci..

[13]  Simon Foster,et al.  Isabelle/UTP: A Mechanised Theory Engineering Framework , 2014, UTP.

[14]  Cliff B. Jones,et al.  A Structural Proof of the Soundness of Rely/guarantee Rules , 2007, J. Log. Comput..

[15]  Cliff B. Jones,et al.  Developing methods for computer programs including a notion of interference , 1981 .

[16]  Frank S. de Boer,et al.  Formal Justification of the Rely-Guarantee Paradigm for Shared-Variable Concurrency: A Semantic Approach , 1999, World Congress on Formal Methods.

[17]  Ian J. Hayes,et al.  Specification case studies , 1987 .

[18]  Joakim von Wright,et al.  Towards a refinement algebra , 2004, Sci. Comput. Program..

[19]  Lauretta O. Osho,et al.  Axiomatic Basis for Computer Programming , 2013 .

[20]  Jürgen Dingel,et al.  A Refinement Calculus for Shared-Variable Parallel and Distributed Programming , 2002, Formal Aspects of Computing.

[21]  Jozef Hooman,et al.  Concurrency Verification: Introduction to Compositional and Noncompositional Methods , 2001, Cambridge Tracts in Theoretical Computer Science.

[22]  Georg Struth,et al.  Hybrid process algebra , 2005, J. Log. Algebraic Methods Program..

[23]  Cliff B. Jones,et al.  Laws and Semantics for Rely-Guarantee Refinement , 2014 .

[24]  Ralph-Johan Back,et al.  Refinement Calculus: A Systematic Introduction , 1998 .

[25]  Leslie Lamport,et al.  Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers [Book Review] , 2002, Computer.

[26]  Jan Madey,et al.  The Z notation: A reference manual , 1990 .

[27]  Gordon D. Plotkin,et al.  A structural approach to operational semantics , 2004, J. Log. Algebraic Methods Program..

[28]  J. Michael Spivey,et al.  The Z notation - a reference manual , 1992, Prentice Hall International Series in Computer Science.

[29]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[30]  Ian J. Hayes,et al.  Generalised rely-guarantee concurrency: an algebraic foundation , 2016, Formal Aspects of Computing.

[31]  Ian J. Hayes,et al.  Invariants, Well-Founded Statements and Real-Time Program Algebra , 2014, FM.

[32]  Robert W. Floyd,et al.  Assigning meaning to programs , 1967 .

[33]  Brijesh Dongol Formalising Progress Properties of Non-blocking Programs , 2006, ICFEM.