Skip to main content
Log in

A semantics comparison workbench for a concurrent, asynchronous, distributed programming language

  • Original Article
  • Published:
Formal Aspects of Computing

Abstract

A number of high-level languages and libraries have been proposed that offer novel and simple to use abstractions for concurrent, asynchronous, and distributed programming. The execution models that realise them, however, often change over time—whether to improve performance, or to extend them to new language features—potentially affecting behavioural and safety properties of existing programs. This is exemplified by Scoop, a message-passing approach to concurrent object-oriented programming that has seen multiple changes proposed and implemented, with demonstrable consequences for an idiomatic usage of its core abstraction. We propose a semantics comparison workbench for Scoop with fully and semi-automatic tools for analysing and comparing the state spaces of programs with respect to different execution models or semantics. We demonstrate its use in checking the consistency of properties across semantics by applying it to a set of representative programs, and highlighting a deadlock-related discrepancy between the principal execution models of Scoop. Furthermore, we demonstrate the extensibility of the workbench by generalising the formalisation of an execution model to support recently proposed extensions for distributed programming. Our workbench is based on a modular and parameterisable graph transformation semantics implemented in the Groove tool. We discuss how graph transformations are leveraged to atomically model intricate language abstractions, how the visual yet algebraic nature of the model can be used to ascertain soundness, and highlight how the approach could be applied to similar languages.

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. Agha G (1986) ACTORS: a model of concurrent computation in distributed systems. MIT Press, Cambridge

    Google Scholar 

  2. Armstrong J, Virding R, Williams M (1996) Concurrent Programming in ERLANG, 2nd edn. Prentice Hall, Upper Saddle River

  3. Burdy L, Cheon Y, Cok DR, Ernst MD, Kiniry JR, Leavens GT, Leino KRM, Poll E (2005) An overview of JML tools and applications.. Int J Softw Tools Technol Transf 7(3): 212–232

    Article  Google Scholar 

  4. Brooke PJ, Paige RF, Jacob JL (2007) A CSP model of Eiffel’s SCOOP. Formal Aspects Comput 19(4): 487–512

    Article  MATH  Google Scholar 

  5. Backes P, Reineke J (2015) Analysis of infinite-state graph transformation systems by cluster abstraction. In: Proceedings of VMCAI 2015, LNCS, vol 8931. Springer, pp. 135–152

  6. Bogdanas D, Rosu G (2015) K-Java: A complete semantics of Java. In: Proceeding of POPL 2015. ACM, pp 445–456

  7. Corradini A., Dotti F.L., Foss L, Ribeiro L (2004) Translating Java code to graph transformation systems. In: Proceedings of ICGT 2004. LNCS, vol 3256. Springer, pp. 383–398

  8. Corrodi C, Heußner A, Poskitt CM (2016) A graph-based semantics workbench for concurrent asynchronous programs. In: Proceedings of FASE 2016. LNCS, vol 9633. Springer, pp 31–48

  9. Caltais G, Meyer B (2017) On the verification of SCOOP programs. Sci Comput Program 133: 194–215

    Article  Google Scholar 

  10. Code Contracts. https://www.microsoft.com/en-us/research/project/code-contracts/, accessed: Oct 2017.

  11. Christakis M, Sagonas K (2010) Static detection of race conditions in Erlang. In: Proceedings of PADL 2010. Springer, pp 119–133

  12. Dotti FL, Duarte LM, Foss L, Ribeiro L, Russi D, dos Santos OM (2005) An environment for the development of concurrent object-based applications. In: Proceedings of GraBaTs 2004. ENTCS, vol 127. Elsevier, pp 3–13

  13. Desai A, Garg P, Madhusudan P (2014) Natural proofs for asynchronous programs using almost-synchronous reductions. In: Proceedings of OOPLA 2014. ACM, pp 709–725

  14. Downey Allen B (October 2017) The Little Book of Semaphores. http://greenteapress.com/semaphores/. Accessed: Oct 2017

  15. Delzanno G, Sangnier A, Zavattaro G (2012) Verification of ad hoc networks with node and communication failures. In: Proceedings of FMOODS/FORTE 2012. LNCS, vol 7273. Springer, pp 235–250

  16. Ehrig H, Ehrig K, Prange U, Taentzer G (2006) Fundamentals of Algebraic Graph Transformation Monographs in Theoretical Computer Science. An EATCS Series. Springer, Berlin

    MATH  Google Scholar 

  17. Eiffel Documentation: Concurrent Eiffel with SCOOP. https://www.eiffel.org/doc/solutions/Concurrent%20programming%20with%20SCOOP. Accessed.: Oct 2017.

  18. Ferreira APL, Foss L, Ribeiro L (2007) Formal verification of object-oriented graph grammars specifications. In: Proceedings of GT-VC 2006. ENTCS, vol 175. Elsevier, pp 101–114

  19. Ferreira APL, Ribeiro L (2005) A graph-based semantics for object-oriented programming constructs. In: Proceedings of CTCS 2004. ENTCS, vol 122. Elsevier, pp 89–104

  20. Grand Central Dispatch (GCD) Reference. https://developer.apple.com/reference/dispatch. Accessed: Oct 2017.

  21. Ghamarian AH, de Mol M, Rensink A, Zambon E, Zimakova M (2012) Modelling and analysis using GROOVE. Int J Softw Tools Technol Transf 14(1): 15–40

    Article  Google Scholar 

  22. Geeraerts G, Heußner A, Raskin JF (2015) On the verification of concurrent, asynchronous programs with waiting queues. ACM Trans Embed Comput Syst 14(3): 58

    Article  Google Scholar 

  23. Higham L, Kawash J, Verwaal N (1997) Defining and comparing memory consistency models. In: Proceedings of PDCS 1997. pp 349–356

  24. Habel A, Pennemann KH (2009) Correctness of high-level transformation systems relative to nested conditions. Math Struct Comput Sci 19(2): 245–296

    Article  MathSciNet  MATH  Google Scholar 

  25. Heußner A, Poskitt CM, Corrodi C, Morandi B (2015) Towards practical graph-based verification for an object-oriented concurrency model. In: Proceeding of GaM 2015. EPTCS, vol 181. pp 32–47

  26. Johnsen EB, Owe O, Axelsen EW (2005) A run-time environment for concurrent objects with asynchronous method calls. In: Proceedings of WRLA 2004. ENTCS, vol 117. Elsevier, pp 375–392

  27. Johnsen EB, Owe O, Yu IC (2006) Creol: A type-safe object-oriented model for distributed concurrent systems. Theor Comput Sci, 365(1-2): 23–66

    Article  MathSciNet  MATH  Google Scholar 

  28. Kitchin D, Quark A, Cook WR, Misra J (2009) The Orc programming language. In: Proceedings of FMOODS/FORTE 2009. LNCS, vol 5522. Springer, pp 1–25

  29. Lucanu D, Serbanuta T-F, Rosu G (2012) \({\mathbb{K}}\) framework distilled. In: Proceedings of WRLA 2012. LNCS, vol 7571. Springer, pp 31–53

  30. Mador-Haim S, Alur R, Martin MMK (2010) Generating litmus tests for contrasting memory consistency models. In: Proceedings of CAV 2010. LNCS, vol 6174. Springer, pp 273–287

  31. Meseguer J (1992) Conditioned rewriting logic as a united model of concurrency. Theor Comput Sci 96(1): 73–155

    Article  MATH  Google Scholar 

  32. Meseguer J (2012) Twenty years of rewriting logic. J Log Algeb Program 81(7-8): 721–781

    Article  MathSciNet  MATH  Google Scholar 

  33. Meyer B (1993) Systematic concurrent object-oriented programming. Commun ACM (CACM) 36(9): 56–80

    Article  Google Scholar 

  34. Meyer Bertrand (1997) Object-Oriented Software Construction. Prentice Hall, 2nd edition

  35. Mador-Haim S, Maranget L, Sarkar S, Memarian K, Alglave J, Owens S, Alur R, Martin MMK, Sewell P, Williams D (2012) An axiomatic memory model for power multiprocessors. In: Proceedings of CAV 2012. LNCS, vol 7385. Springer, pp 495–512

  36. Morandi B, Nanz S, Meyer B (2012) Who is accountable for asynchronous exceptions? In: Proceedings of APSEC 2012. IEEE, pp 462–471

  37. Morandi B, Nanz S, Meyer B (2014) Safe and efficient data sharing for message-passing concurrency. In: Proceedings of COORDINATION 2014. LNCS, vol 8459. Springer, pp 99–114

  38. Morandi B, Schill M, Nanz S, Meyer B (2013) Prototyping a concurrency model. In: Proceedings of ACSD 2013. IEEE, pp 170–179

  39. Nienaltowski P (2007) Practical framework for contract-based concurrent object-oriented programming. Doctoral dissertation, ETH Zürich

  40. Nienhuis K, Memarian K, Sewell P (2016) An operational semantics for C/C++11 concurrency. In: Proceedings of OOPSLA 2016. ACM, pp 111–128

  41. Ostroff JS, Torshizi FA, Huang HF, Schoeller B (2009) Beyond contracts for concurrency. Formal Aspects Comput 21(4): 319–346

    Article  MATH  Google Scholar 

  42. Park D, Ştefănescu A, Roşu G (2015) KJS: A complete formal semantics of JavaScript. In Proceedings of PLDI 2015. ACM, pp 346–356

  43. Plump D (2012) The design of GP 2. In: Proceedings of WRS 2011, Electronic Proceedings in Theoretical Computer Science, vol 82. pp 1–16

  44. Poskitt CM, Plump D (2012) Hoare-style verification of graph programs. Fundamenta Informaticae 118(1-2): 135–175

    MathSciNet  MATH  Google Scholar 

  45. Poskitt CM, Plump D (2014) Verifying monadic second-order properties of graph programs. In: Proceedings of ICGT 2014. LNCS, vol 8571. Springer, pp 33–48

  46. Rensink A (2010) The edge of graph transformation—graphs for behavioural specification. In: Graph transformations and model-driven engineering, LNCS, vol 5765. Springer, Berlin, pp 6–32

  47. Source code repository. https://bitbucket.org/ccorrodi/scoopworkbench.

  48. Rozenberg G (eds) (1997) Handbook of graph grammars and computing by graph transformation: volume I. Foundations. World Scientific, Singapore

  49. Rosu G, Serbanuta T-F (2010) An overview of the K semantic framework. J Log Algebraic Program 79(6): 397–434

    Article  MathSciNet  MATH  Google Scholar 

  50. Rensink A, Zambon E (2009) A type graph model for Java programs. In: Proceedings of FMOODS 2009. LNCS, vol 5522. Springer, pp 237–242

  51. Schill M (2016) Unified interference-free parallel, concurrent and distributed programming, Dissertation, ETH Zürich, No. 24002.

  52. Svensson H, Fredlund L-Å, Benac Earle C (2010) A unified semantics for future Erlang. In: Proceedings of the 9th ACM SIGPLAN Workshop on Erlang, Erlang ’10. ACM, pp 23–32

  53. Summers AJ, Müller P (2016) Actor services. In: Proceedings of ESOP 2016. LNCS, vol 9632. Springer, pp 699–726

  54. Schill M, Poskitt CM, Meyer B (2016) An interference-free programming model for network objects. In: Proceedings of COORDINATION 2016. LNCS, vol 9686. Springer, pp 227–244

  55. Serbanuta Traian-Florin, Rosu Grigore (2012) A truly concurrent semantics for the K framework based on graph transformations. In Proc. ICGT 2012, volume 7562 of LNCS, pages 294–310. Springer

  56. Tschannen J, Furia CA, Nordio M, Meyer B (2011) Usable verification of object-oriented programs by combining static and dynamic techniques. In: Proceedings of SEFM 2011. LNCS, vol 7041. Springer, pp 382–398

  57. Torshizi F A, Ostroff J S, Paige R F, Chechik M (2009) The SCOOP concurrency model in Java-like languages. In: Proceedings of CPA 2009. Concurrent systems engineering series, vol 67. IOS Press, pp 7–27

  58. Wickerson J, Batty M, Sorensen T, Constantinides GA (2017) Automatically comparing memory consistency models. In: Proceedings of POPL 2017. ACM, pp 190–204

  59. West S, Nanz S, Meyer B (2010) A modular scheme for deadlock prevention in an object-oriented programming model. In: Proceedings of ICFEM 2010. LNCS, vol 6447. Springer, pp 597–612

  60. West S, Nanz S, Meyer B (2015) Efficient and reasonable object-oriented concurrency. In: Proceedings of ESEC/FSE 2015. ACM, pp 734–744

  61. Companion website. https://ccorrodi.bitbucket.io/scoopgraphs/.

  62. Zambon E, Rensink A (2011) Using graph transformations and graph abstractions for software verification. In: Proceedings of ICGT-DS 2010. ECEASST, vol 38

  63. Zambon E, Rensink A (2014) Solving the N-Queens problem with GROOVE—towards a compendium of best practices. In: Proceedings of GT-VMT 2014. ECEASST, vol 67

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christopher M. Poskitt.

Additional information

Perdita Stevens, Andrzej Wasowski, and Ewen Denney

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Corrodi, C., Heußner, A. & Poskitt, C.M. A semantics comparison workbench for a concurrent, asynchronous, distributed programming language. Form Asp Comp 30, 163–192 (2018). https://doi.org/10.1007/s00165-017-0443-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00165-017-0443-1

Keywords

Navigation