Skip to main content
Log in

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

  • Original Article
  • Published:
Formal Aspects of Computing

Abstract

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.

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

  2. Back R-JR (1989) A method for refining atomicity in parallel algorithms. In: Odijk E, Rem M, Syre J-C (eds) PARLE’89 parallel architectures and languages Europe. LNCS, vol 366. Springer, Berlin, pp 199–216

  3. Back R-JR, von Wright J (1998) Refinement calculus: a systematic introduction. Springer, New York

  4. Brookes S (1996) Full abstraction for a shared-variable parallel language. Inf Comput 127(2): 145–163

    Article  MathSciNet  MATH  Google Scholar 

  5. Brookes S (2007) A semantics for concurrent separation logic. Theor Comput Sci 375(1–3): 227–270

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  7. de Boer FS, Hannemann U, De Roever W-P (1999) Formal justification of the rely-guarantee paradigm for shared-variable concurrency: a semantic approach. In: Wing J, Woodcock J, Davies J (eds) FM’99—Formal Methods. Lecture Notes in Computer Science, vol 1709. Springer, Berlin, pp 1245–1265

  8. De Roever W-P (2001) Concurrency verification: introduction to compositional and noncompositional methods. Cambridge University Press, Cambridge

    MATH  Google Scholar 

  9. Dingel J (2002) A refinement calculus for shared-variable parallel and distributed programming. Form Aspects Comput 14(2): 123–197

    Article  MATH  Google Scholar 

  10. Dongol B (2006) Formalising progress properties of non-blocking programs. In: Liu Z, He J (eds) Formal Methods and Software Engineering. Lecture Notes in Computer Science, vol 4260. Springer, Berlin, pp 284–303

  11. Floyd RW (1967) Assigning meanings to programs. Math Aspects Comput Sci 19: 19–32

    Article  MathSciNet  MATH  Google Scholar 

  12. Foster S, Zeyda F, Woodcock J (2014) Isabelle/UTP: a mechanised theory engineering framework. In: Naumann D (ed) Unifying Theories of Programming—5th International Symposium, UTP 2014, Singapore, May 13, 2014, Revised Selected Papers. Lecture Notes in Computer Science, vol 8963. Springer, pp 21–41

  13. Hayes IJ (2016) Generalised rely-guarantee concurrency: an algebraic foundation. Form Aspects Comput 28(6): 1057–1078

    Article  MathSciNet  MATH  Google Scholar 

  14. Hayes IJ, Jones CB, Colvin RJ (2014) Laws and semantics for rely-guarantee refinement. Technical Report CS-TR-1425, Newcastle University

  15. Hayes IJ, Utting M (1998) Deadlines are termination. In: Gries D, De Roever W-P (eds) IFIP TC2/WG2.2, 2.3 International Conference on Programming Concepts and Methods (PROCOMET’98). Chapman and Hall, London, pp 186–204

  16. Hayes I (ed) (1993) Specification case studies, 2nd edn. Prentice Hall International, Englewood Cliffs

  17. Hayes IJ, Meinicke L (2014) Invariants, well-founded statements and real-time program algebra. In: Jones CB, Pihlajasaari P, Sun J (eds) Formal Methods (FM 2014). LNCS, vol 8442. Springer, Berlin, pp 318–334

  18. Herlihy M, Luchangco V, Moir M (2003) Obstruction-free synchronization: double-ended queues as an example. In: ICDCS’03: Proceedings of the 23rd International Conference on Distributed Computing Systems, Washington, DC, USA. IEEE Computer Society, pp 522–529

  19. Herlihy MP, Wing JM (1990) Linearizability: a correctness condition for concurrent objects. ACM Trans Program Lang Syst 12(3): 463–492

    Article  Google Scholar 

  20. Hoare CAR (1969) An axiomatic basis for computer programming. Commun ACM 12(10):576–580, 583

  21. Hoare CAR (1985) Communicating sequential processes. Prentice-Hall, Englewood Cliffs

    MATH  Google Scholar 

  22. Hoare CAR, Möller B, Struth G, Wehrman I (2011) Concurrent Kleene algebra and its foundations. J Log Algebr Program 80(6): 266–296

    Article  MathSciNet  MATH  Google Scholar 

  23. Jones CB (1981) Development methods for computer programs including a notion of interference. PhD thesis, Oxford University. Oxford University Computing Laboratory (now Computer Science) Technical Monograph PRG-25

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

    Article  MATH  Google Scholar 

  25. Jones CB, Hayes IJ, Colvin RJ (2015) Balancing expressiveness in formal approaches to concurrency. Form Aspects Comput 27(3): 475–497

    Article  MathSciNet  MATH  Google Scholar 

  26. Lamport L (2003) Specifying systems: the TLA+ language and tools for hardware and software engineers. Addison Wesley, Reading

  27. Morgan CC (1988) The specification statement. ACM Trans Prog Lang Syst 10(3): 403–419

    Article  MATH  Google Scholar 

  28. Plotkin GD (2004) A structural approach to operational semantics. J Log Algebr Program 60–61:17–139

  29. Pnueli A (1977) The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science. IEEE, pp 46–57

  30. Spivey JM (1992) The Z notation: a reference manual, 2nd edn. Prentice Hall International, Englewood Cliffs

    MATH  Google Scholar 

  31. von Wright J (2004) Towards a refinement algebra. Sci Comput Program 51: 23–45

    Article  MathSciNet  MATH  Google Scholar 

  32. Woodcock J, Davies J (1996) Using Z: specification, refinement, and proof. Prentice Hall International, Englewood Cliffs

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Robert J. Colvin.

Additional information

Jim Woodcock

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Colvin, R.J., Hayes, I.J. & Meinicke, L.A. Designing a semantic model for a wide-spectrum language with concurrency. Form Asp Comp 29, 853–875 (2017). https://doi.org/10.1007/s00165-017-0416-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00165-017-0416-4

Keywords

Navigation