Skip to main content

Concurrency: Handling Interference Formally

  • Chapter
  • First Online:
  • 474 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11180))

Abstract

Interference between threads makes it difficult to design concurrent programs. Faced with such a difficulty, it is reasonable to seek clarification and leverage from formality. Whereas powerful abstractions have been found for sequential programming languages, the inherent operational nature of interference infects attempts to describe it formally. Model-oriented (i.e. operational and denotational) and property-oriented (mainly axiomatic) descriptions of the semantics of programming languages that support shared-variable concurrency look totally different. This paper identifies the source of the challenge as accommodating interference and highlights some important connections between the approaches.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    A wider review of the challenges that arise in writing formal semantic descriptions is given in [JA17]; more historical context is given in [JA16] (which will appear in the proceedings of HaPoP-16 as [AJ18]).

  2. 2.

    Any partition of \(\{1..N\}\) will serve—choosing to split odd/even indexes is notationally convenient and abbreviates the presentation.

  3. 3.

    The use of VDM notation will hopefully present no difficulty: it has been widely used for decades and is the subject of an ISO standard; one useful reference is [Jon90].

  4. 4.

    At the time Plotkin’s useful commentary was being written, the current author was writing [Jon03b] and drafts were exchanged between Plotkin and Jones that enriched the cross references.

  5. 5.

    The rule that is erroneously referred to as Reynold’s rule states that there should be only one shared variable in any assignment—this does not provide a general semantics.

  6. 6.

    The proceedings [Ste66] took two years to appear but are invaluable partly because they include transcripts of the recorded discussions.

  7. 7.

    They also always mentioned Cal Elgot and Peter Landin.

  8. 8.

    The adverse effects on proofs of putting unnecessary things in the state are examined in [JA16, §3].

  9. 9.

    Hoare’s path from a comment made at the 1964 Formal Language Description Languages Working Conference in Baden-bei-Wien to his Axiomatic Basis paper [Hoa69] is outlined in [JA16]. The relation to (but lack of influence of) earlier work by Turing and von Neumann is discussed in [Jon03a].

  10. 10.

    The decision to employ predicates of a single state even for post conditions looks convenient especially in this rule but the choice results in messy tricks to circumvent the fact that a specification should obviously relate the initial and final states—VDM [Jon80], Z [Hay86] and B [Abr96] all use relations.

  11. 11.

    Particularly interesting Chinese references include [Fen09, LFF12, Lia14].

  12. 12.

    The asymmetric version needed in examples such as concurrent garbage collection [JVY17] or Asynchronous Communication Mechanisms [JH16] is actually more interesting.

References

  1. Abrial, J.-R.: The B-Book: Assigning Programs to Meanings. Cambridge University Press, Cambridge (1996)

    Book  Google Scholar 

  2. Aczel, P.H.G.: On an inference rule for parallel composition. (private communication) Manuscript, Manchester (1983)

    Google Scholar 

  3. Astarte, T.K., Jones, C.B.: Formal semantics of ALGOL 60: four descriptions in their historical context. In: De Mol, L., Primiero, G. (eds.) Reflections on Programming Systems - Historical and Philosophical Aspects. Springer Philosophical Studies Series, pp. 71–141. In press (2018)

    Google Scholar 

  4. America, P.: Issues in the design of a parallel object-oriented language. Form. Asp. Comput. 1, 366–411 (1989)

    Article  Google Scholar 

  5. Bornat, R., Amjad, H.: Inter-process buffers in separation logic with rely-guarantee. Form. Asp. Comput. 22(6), 735–772 (2010)

    Article  Google Scholar 

  6. Bornat, R., Amjad, H.: Explanation of two non-blocking shared-variable communication algorithms. Form. Asp. Comput. 1–39 (2011)

    Google Scholar 

  7. Brookes, S., W O’Hearn, P.: Concurrent separation logic. ACM SIGLOG News 3(3), 47–65 (2016)

    Google Scholar 

  8. Brinch Hansen, P.: Concurrent programming concepts. ACM Comput. Surv. 5, 223–245 (1973)

    Article  Google Scholar 

  9. Back, R.-J.R., von Wright, J.: Refinement Calculus: A Systematic Introduction. Springer, New York (1998)

    Book  Google Scholar 

  10. Bekič, H., Walk, K.: Formalization of storage properties. In: Engeler, E. (ed.) Eng71, pp. 28–61. Springer, Berlin (1971)

    Google Scholar 

  11. Colvin, R.J., Hayes, I.J., Meinicke, L.A.: Designing a semantic model for a wide-spectrum language with concurrency. Form. Asp. Comput. 1–22 (2016)

    Google Scholar 

  12. Coleman, J.W., Jones, C.B.: A structural proof of the soundness of rely/guarantee rules. J. Logic Comput. 17(4), 807–841 (2007)

    Article  MathSciNet  Google Scholar 

  13. Coleman, J.W.: Constructing a Tractable Reasoning Framework upon a Fine-Grained Structural Operational Semantics. Ph.D. thesis, Newcastle University School of Computer Science (2008)

    Google Scholar 

  14. Dahl, O.-J., Myhrhaug, B., Nygaard, K.: SIMULA 67 common base language. Technical Report S-2, Norwegian Computing Center, Oslo (1968)

    Google Scholar 

  15. de Roever, W.-P.: Concurrency Verification: Introduction to Compositional and Noncompositional Methods. Cambridge University Press, Cambridge (2001)

    MATH  Google Scholar 

  16. Dinsdale-Young, T., Birkedal, L., Gardner, P., Parkinson, M., Yang, H.: Views: compositional reasoning for concurrent programs. In: Proceedings of the 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 287–300. ACM (2013)

    Google Scholar 

  17. Engeler, E. (ed.): Symposium on Semantics of Algorithmic Languages. LNM, vol. 188. Springer, Heidelberg (1971). https://doi.org/10.1007/BFb0059689

    Book  MATH  Google Scholar 

  18. Feng, X.: Local rely-guarantee reasoning. In: Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2009, pp. 315–327. ACM, New York, NY, USA (2009)

    Google Scholar 

  19. Hayes, I. (ed.): Specification Case Studies. Prentice-Hall International, Upper Saddle River (1986)

    MATH  Google Scholar 

  20. Hayes, I.J.: Generalised rely-guarantee concurrency: an algebraic foundation. Form. Asp. Comput. 28(6), 1057–1078 (2016)

    Article  MathSciNet  Google Scholar 

  21. Hayes, I.J., Burns, A., Dongol, B., Jones, C.B.: Comparing degrees of non-deterministic in expression evaluation. Comput. J. 56(6), 741–755 (2013)

    Article  Google Scholar 

  22. Hayes, I.J., Jones, C.B.: A guide to rely/guarantee thinking. In: Bowen, J., Liu, Z., Zhan, Z. (eds.), Engineering Trustworthy Software Systems - Second International School, SETSS 2017, LNCS. Springer (2018)

    Google Scholar 

  23. Hayes, I.J., Jones, C.B., Colvin, R.J.: Laws and semantics for rely-guarantee refinement. Technical Report CS-TR-1425, Newcastle University (2014)

    Google Scholar 

  24. Hayes, I.J., Jackson, M.A., Jones, C.B.: Determining the Specification of a Control System from That of Its Environment. In: Araki, K., Gnesi, S., Mandrioli, D. (eds.) FME 2003. LNCS, vol. 2805, pp. 154–169. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-45236-2_10

    Chapter  Google Scholar 

  25. Hoare, Charles Antony, Richard, : An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)

    Article  Google Scholar 

  26. Hoare, C.A.R.: Towards a theory of parallel programming. In: Hoare, C.A.R., Perrot, R. (eds.) Operating System Techniques, pp. 61–71. Academic Press (1972)

    Google Scholar 

  27. Hoare, C.A.R.: Monitors: an operating system structuring concept. Commun. ACM 17, 549–557 (1974)

    Article  Google Scholar 

  28. Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, Upper Saddle River (1985)

    MATH  Google Scholar 

  29. Jones, C.B., Astarte, T.K.: An Exegesis of Four Formal Descriptions of ALGOL 60. Technical Report CS-TR-1498, Newcastle University School of Computer Science (2016). Forthcoming as a paper in the HaPoP 2016 proceedings

    Google Scholar 

  30. Jones, C.B., Astarte, T.K.: Challenges for semantic description: comparing responses from the main approaches. Technical Report CS-TR-1516, Newcastle University School of Computer Science (2017)

    Google Scholar 

  31. Jones, C.B., Hayes, I.J.: Possible values: exploring a concept for concurrency. J. Log. Algebr. Methods Program. (2016)

    Google Scholar 

  32. Jones, C.B., Hayes, I.J., Colvin, R.J.: Balancing expressiveness in formal approaches to concurrency. Form. Asp. Comput. 27(3), 465–497 (2015)

    Article  MathSciNet  Google Scholar 

  33. Jones, C.B., Hayes, I.J., Jackson, M.A.: Deriving specifications for systems that are connected to the physical world. In: Jones, C.B., Liu, Z., Woodcock, J. (eds.) Formal Methods and Hybrid Real-Time Systems. LNCS, vol. 4700, pp. 364–390. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-75221-9_16

    Chapter  Google Scholar 

  34. Jones, C.B.: Software Development: A Rigorous Approach. Prentice Hall International, Englewood Cliffs (1980)

    MATH  Google Scholar 

  35. Jones, C.B.: Development Methods for Computer Programs including a Notion of Interference. Ph.D. thesis, Oxford University (1981). Printed as: Programming Research Group, Technical Monograph 25

    Google Scholar 

  36. Jones, C.B.: Specification and design of (parallel) programs. In: Proceedings of IFIP 1983, pp. 321–332. North-Holland (1983)

    Google Scholar 

  37. Jones, C.B.: Tentative steps toward a development method for interfering programs. Trans. Program. Lang. Syst. 5(4), 596–619 (1983)

    Article  Google Scholar 

  38. Jones, C.B.: Systematic Software Development using VDM, 2nd edn. Prentice Hall International, Upper Saddle River (1990)

    MATH  Google Scholar 

  39. Jones, C.B.: The early search for tractable ways of reasoning about programs. IEEE, Ann. Hist. Comput. 25(2), 26–49 (2003)

    Article  MathSciNet  Google Scholar 

  40. Jones, C.B.: Operational semantics: concepts and their expression. Inf. Process. Lett. 88(1–2), 27–32 (2003)

    Article  MathSciNet  Google Scholar 

  41. Jones, C.B.: From problem frames to HJJ (and its known unknowns). In: Nuseibeh, B., Zave, P. (eds.), Software Requirements and Design: The Work of Michael Jackson, chapter 16, pp. 357–372. Good Friends Publishing Company (2010)

    Google Scholar 

  42. Jones, C.B., Pierce, K.G.: Elucidating concurrent algorithms via layers of abstraction and reification. Form. Asp. Comput. 23(3), 289–306 (2011)

    Article  MathSciNet  Google Scholar 

  43. Jones, C.B., Velykis, A., Yatapanage, N.: General lessons from a rely/guarantee development. In: Larsen, K.G., Sokolsky, O., Wang, J. (eds.) SETTA 2017. LNCS, vol. 10606, pp. 3–24. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-69483-2_1

    Chapter  Google Scholar 

  44. Jones, C.B., Yatapanage, N.: Reasoning about separation using abstraction and reification. In: Calinescu, R., Rumpe, B. (eds.) SEFM 2015. LNCS, vol. 9276, pp. 3–19. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-22969-0_1

    Chapter  MATH  Google Scholar 

  45. Liang, H., Feng, X., Fu, M.: A rely-guarantee-based simulation for verifying concurrent program transformations. In: Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2012, pp. 455–468. ACM, New York, NY, USA (2012)

    Google Scholar 

  46. Liang, H.: Refinement Verification of Concurrent Programs and Its Applications. Ph.D. thesis, USTC, China (2014)

    Google Scholar 

  47. Lucas, P.: Walk, Kurt: on the formal description of PL/I. Ann. Rev. Autom. Program. 6, 105–182 (1969)

    Article  Google Scholar 

  48. McCarthy, J.: A formal description of a subset of ALGOL. In: Formal Language Description Languages for Computer Programming, pp. 1–12. North-Holland (1966)

    Google Scholar 

  49. Milner, R.: Communication and Concurrency. Prentice Hall, Upper Saddle River (1989)

    Google Scholar 

  50. Morgan, C.: Programming from Specifications. Prentice-Hall, Upper Saddle River (1990)

    Google Scholar 

  51. Moszkowski, B.: Executing Temporal Logic Programs. Cambridge University Press, Cambridge (1986)

    Google Scholar 

  52. Milner, R., Parrow, J., Walker, D.: A calculus of mobile processes. Inf. Comput. 100, 1–77 (1992)

    Article  MathSciNet  Google Scholar 

  53. Owicki, S.S., Gries, D.: An axiomatic proof technique for parallel programs I. Acta Inf. 6, 319–340 (1976)

    Article  MathSciNet  Google Scholar 

  54. O’Hearn, P.W.: Resources, concurrency and local reasoning. Theor. Comput. Sci. 375(1–3), 271–307 (2007)

    Article  MathSciNet  Google Scholar 

  55. Owicki, S.S.: Axiomatic Proof Techniques for Parallel Programs. Ph.D. thesis, Department of Computer Science, Cornell University (1975). Hard copy - Published as technical report 75–251

    Google Scholar 

  56. Parkinson, M.: The next 700 separation logics. In: Leavens, G., O’Hearn, P., Rajamani, S. (eds.) Verified Software: Theories. Tools, Experiments, volume 6217 of LNCS, pp. 169–182. Springer, Berlin/Heidelberg (2010)

    Chapter  Google Scholar 

  57. Plotkin, G.D.: A powerdomain construction. SIAM J. Comput. 5, 452–487 (1976)

    Article  MathSciNet  Google Scholar 

  58. Plotkin, G.D.: A structural approach to operational semantics. Technical Report DAIMI FN-19, Aarhus University (1981)

    Google Scholar 

  59. Plotkin, G.D.: The origins of structural operational semantics. J. Logic Algebr. Program. 60–61, 3–15 (2004)

    Article  MathSciNet  Google Scholar 

  60. Plotkin, G.D.: A structural approach to operational semantics. J. Logic Algebr. Program. 60–61, 17–139 (2004)

    Google Scholar 

  61. Reynolds, J.: A logic for shared mutable data structures. In: Plotkin, G. (ed.) LICS 2002. IEEE Computer Society Press (2002)

    Google Scholar 

  62. Steel, T.B.: Formal Language Description Languages for Computer Programming. North-Holland (1966)

    Google Scholar 

  63. Schellhorn, G., Tofan, B., Ernst, G., Pf"ahler, J., Reif, W.: Rgitl: a temporal logic framework for compositional reasoning about interleaved programs. Ann. Math.Artif. Intell. 71(1–3), 131–174 (2014)

    Google Scholar 

  64. Stoy, J.E.: Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. MIT Press, Cambridge (1977)

    MATH  Google Scholar 

  65. Sangiorgi, D., Walker, D.: The \(\pi \)-calculus: A Theory of Mobile Processes. Cambridge University Press, Cambridge (2001)

    Google Scholar 

  66. Wang, S., Wang, X.: Proving simpson’s four-slot algorithm using ownership transfer. In: VERIFY Workshop, Edinburgh (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cliff B. Jones .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Jones, C.B. (2018). Concurrency: Handling Interference Formally. In: Jones, C., Wang, J., Zhan, N. (eds) Symposium on Real-Time and Hybrid Systems. Lecture Notes in Computer Science(), vol 11180. Springer, Cham. https://doi.org/10.1007/978-3-030-01461-2_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-01461-2_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-01460-5

  • Online ISBN: 978-3-030-01461-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics