A Graph-Based Semantics Workbench for Concurrent Asynchronous Programs

  • Claudio Corrodi
  • Alexander Heußner
  • Christopher M. Poskitt
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9633)

Abstract

A number of novel programming languages and libraries have been proposed that offer simpler-to-use models of concurrency than threads. It is challenging, however, to devise execution models that successfully realise their abstractions without forfeiting performance or introducing unintended behaviours. This is exemplified by Scoop—a concurrent object-oriented message-passing language—which has seen multiple semantics proposed and implemented over its evolution. We propose a “semantics workbench” with fully and semi-automatic tools for Scoop, that can be used to analyse and compare programs with respect to different execution models. We demonstrate its use in checking the consistency of semantics by applying it to a set of representative programs, and highlighting a deadlock-related discrepancy between the principal execution models of the language. 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, and how the visual yet algebraic nature of the model can be used to ascertain soundness.

References

  1. 1.
    Agha, G.: ACTORS: A Model of Concurrent Computation in Distributed Systems. MIT Press, Cambridge (1986)Google Scholar
  2. 2.
    Armstrong, J., Virding, R., Williams, M.: Concurrent Programming in ERLANG, 2nd edn. Prentice Hall, Englewood Cliffs (1996)MATHGoogle Scholar
  3. 3.
    Backes, P., Reineke, J.: Analysis of infinite-state graph transformation systems by cluster abstraction. In: D’Souza, D., Lal, A., Larsen, K.G. (eds.) VMCAI 2015. LNCS, vol. 8931, pp. 135–152. Springer, Heidelberg (2015)Google Scholar
  4. 4.
    Bogdanas, D., Rosu, G.: K-Java: A complete semantics of Java. In: Proceedings of POPL 2015, pp. 445–456. ACM (2015)Google Scholar
  5. 5.
    Brooke, P.J., Paige, R.F.: Cameo: an alternative model of concurrency for Eiffel. Formal Aspects Comput. 21(4), 363–391 (2009)CrossRefMATHGoogle Scholar
  6. 6.
    Brooke, P.J., Paige, R.F., Jacob, J.L.: A CSP model of Eiffel’s SCOOP. Formal Aspects Comput. 19(4), 487–512 (2007)CrossRefMATHGoogle Scholar
  7. 7.
    Caltais, G., Meyer, B.: Coffman deadlocks in SCOOP. In: Proceedings of NWPT 2014 (2014). http://arxiv.org/abs/1409.7514
  8. 8.
    Corradini, A., Dotti, F.L., Foss, L., Ribeiro, L.: Translating Java code to graph transformation systems. In: Ehrig, H., Engels, G., Parisi-Presicce, F., Rozenberg, G. (eds.) ICGT 2004. LNCS, vol. 3256, pp. 383–398. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  9. 9.
    Dotti, F.L., Duarte, L.M., Foss, L., Ribeiro, L., Russi, D., dos Santos, O.M.: An environment for the development of concurrent object-based applications. In: Proceedings of GraBaTs 2004. ENTCS, vol. 127, pp. 3–13. Elsevier (2005)Google Scholar
  10. 10.
    Downey, A.B.: The Little Book of Semaphores. http://greenteapress.com/semaphores/. Accessed Jan 2016
  11. 11.
    Eiffel Documentation: Concurrent Eiffel with SCOOP. https://docs.eiffel.com/book/solutions/concurrent-eiffel-scoop. Accessed Oct 2015
  12. 12.
    Ferreira, A.P.L., Foss, L., Ribeiro, L.: Formal verification of object-oriented graph grammars specifications. In: Proceedings of GT-VC 2006. ENTCS, vol. 175, pp. 101–114. Elsevier (2007)Google Scholar
  13. 13.
    Ferreira, A.P.L., Ribeiro, L.: A graph-based semantics for object-oriented programming constructs. In: Proceedings of CTCS 2004. ENTCS, vol. 122, pp. 89–104. Elsevier (2005)Google Scholar
  14. 14.
  15. 15.
    Geeraerts, G., Heußner, A., Raskin, J.: On the verification of concurrent, asynchronous programs with waiting queues. ACM Trans. Embed. Comput. Syst. 14(3), 58 (2015)CrossRefGoogle Scholar
  16. 16.
    Ghamarian, A.H., de Mol, M., Rensink, A., Zambon, E., Zimakova, M.: Modelling and analysis using GROOVE. Int. J. Softw. Tools Technol. Transf. 14(1), 15–40 (2012)CrossRefGoogle Scholar
  17. 17.
    Groove (project web page). http://groove.cs.utwente.nl/. Accessed October 2015
  18. 18.
    Heußner, A., Poskitt, C.M., Corrodi, C., Morandi, B.: Towards practical graph-based verification for an object-oriented concurrency model. In: Proceedings of GaM 2015. EPTCS, vol. 181, pp. 32–47 (2015)Google Scholar
  19. 19.
    Johnsen, E.B., Owe, O., Axelsen, E.W.: A run-time environment for concurrent objects with asynchronous method calls. In: Proceedings of WRLA 2004. ENTCS, vol. 117, pp. 375–392. Elsevier(2005)Google Scholar
  20. 20.
    Johnsen, E.B., Owe, O., Yu, I.C.: Creol: a type-safe object-oriented model for distributed concurrent systems. Theor. Comput. Sci. 365(1–2), 23–66 (2006)MathSciNetCrossRefMATHGoogle Scholar
  21. 21.
    Lucanu, D., Şerbănuţă, T.F., Roşu, G.: \(\mathbb{K}\) framework distilled. In: Durán, F. (ed.) WRLA 2012. LNCS, vol. 7571, pp. 31–53. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  22. 22.
    Meseguer, J.: Conditioned rewriting logic as a united model of concurrency. Theor. Comput. Sci. 96(1), 73–155 (1992)MathSciNetCrossRefMATHGoogle Scholar
  23. 23.
    Meseguer, J.: Twenty years of rewriting logic. J. Logic Algebraic Program. 81(7–8), 721–781 (2012)MathSciNetCrossRefMATHGoogle Scholar
  24. 24.
    Meyer, B.: Systematic concurrent object-oriented programming. Commun. ACM (CACM) 36(9), 56–80 (1993)CrossRefGoogle Scholar
  25. 25.
    Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall, Upper Saddle River (1997)MATHGoogle Scholar
  26. 26.
    Morandi, B., Schill, M., Nanz, S., Meyer, B.: Prototyping a concurrency model. In: Proceedings of ACSD 2013, pp. 170–179. IEEE (2013)Google Scholar
  27. 27.
    Morandi, B., Nanz, S., Meyer, B.: Safe and efficient data sharing for message-passing concurrency. In: Kühn, E., Pugliese, R. (eds.) COORDINATION 2014. LNCS, vol. 8459, pp. 99–114. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  28. 28.
    Nienaltowski, P.: Practical framework for contract-based concurrent object-oriented programming. Doctoral dissertation, ETH Zürich (2007)Google Scholar
  29. 29.
    Ostroff, J.S., Torshizi, F.A., Huang, H.F., Schoeller, B.: Beyond contracts for concurrency. Formal Aspects Comput. 21(4), 319–346 (2009)CrossRefMATHGoogle Scholar
  30. 30.
    Park, D., Ştefănescu, A., Roşu, G.: KJS: a complete formal semantics of JavaScript. In: Proceedings of PLDI 2015, pp. 346–356. ACM (2015)Google Scholar
  31. 31.
    Rensink, A.: The edge of graph transformation — graphs for behavioural specification. In: Engels, G., Lewerentz, C., Schäfer, W., Schürr, A., Westfechtel, B. (eds.) Nagl Festschrift. LNCS, vol. 5765, pp. 6–32. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  32. 32.
    Rensink, A., Zambon, E.: A type graph model for Java programs. In: Lee, D., Lopes, A., Poetzsch-Heffter, A. (eds.) FMOODS 2009. LNCS, vol. 5522, pp. 237–242. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  33. 33.
    Rosu, G., Serbanuta, T.: An overview of the K semantic framework. J. Logic Algebraic Program. 79(6), 397–434 (2010)MathSciNetCrossRefMATHGoogle Scholar
  34. 34.
    Schäfer, J., Poetzsch-Heffter, A.: JCoBox: generalizing active objects to concurrent components. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 275–299. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  35. 35.
    Şerbănuţă, T.F., Roşu, G.: A truly concurrent semantics for the \(\mathbb{K}\) framework based on graph transformations. In: Ehrig, H., Engels, G., Kreowski, H.-J., Rozenberg, G. (eds.) ICGT 2012. LNCS, vol. 7562, pp. 294–310. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  36. 36.
  37. 37.
    Torshizi, F.A., Ostroff, J.S., Paige, R.F., Chechik, M.: The SCOOP concurrency model in Java-like languages. In: Proceedings of CpPA 2009. Concurrent Systems Engineering Series, vol. 67, pp. 7–27. IOS Press (2009)Google Scholar
  38. 38.
    Tschannen, J., Furia, C.A., Nordio, M., Meyer, B.: Usable verification of object-oriented programs by combining static and dynamic techniques. In: Barthe, G., Pardo, A., Schneider, G. (eds.) SEFM 2011. LNCS, vol. 7041, pp. 382–398. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  39. 39.
    West, S., Nanz, S., Meyer, B.: A modular scheme for deadlock prevention in an object-oriented programming model. In: Dong, J.S., Zhu, H. (eds.) ICFEM 2010. LNCS, vol. 6447, pp. 597–612. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  40. 40.
    West, S., Nanz, S., Meyer, B.: Efficient and reasonable object-oriented concurrency. In: Proceedings of ESEC/FSE 2015, pp. 734–744. ACM (2015)Google Scholar
  41. 41.
    Zambon, E., Rensink, A.: Using graph transformations and graph abstractions for software verification. In: Proceedings of ICGT-DS 2010. ECEASST, vol. 38 (2011)Google Scholar
  42. 42.
    Zambon, E., Rensink, A.: Solving the N-Queens problem with GROOVE - towards a compendium of best practices. In: Proceedings of GT-VMT 2014. ECEASST, vol. 67 (2014)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  • Claudio Corrodi
    • 1
    • 2
  • Alexander Heußner
    • 3
  • Christopher M. Poskitt
    • 1
    • 4
  1. 1.Department of Computer ScienceETH ZürichZürichSwitzerland
  2. 2.Software Composition GroupUniversity of BernBernSwitzerland
  3. 3.Software Technologies Research GroupUniversity of BambergBambergGermany
  4. 4.Singapore University of Technology and DesignSingaporeSingapore

Personalised recommendations