Translating Active Objects into Colored Petri Nets for Communication Analysis

  • Anastasia Gkolfi
  • Crystal Chang Din
  • Einar Broch Johnsen
  • Martin Steffen
  • Ingrid Chieh Yu
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10522)

Abstract

Actor-based languages attract attention for their ability to scale to highly parallel architectures. Active objects combine the asynchronous communication of actors with object-oriented programming by means of asynchronous method calls and synchronization on futures. However, the combination of asynchronous calls and synchronization introduces communication cycles which lead to a form of communication deadlock. This paper addresses such communication deadlocks for ABS, a formally defined active object language which additionally supports cooperative scheduling to express complex distributed control flow, using first-class futures and explicit process release points. Our approach is based on a translation of the semantics of ABS into colored Petri nets, such that a particular program corresponds to a marking of this net. We prove the soundness of this translation and demonstrate by example how the implementation of this net can be used to analyze ABS programs with respect to communication deadlock.

References

  1. 1.
    Agha, G.: ACTORS: A Model of Concurrent Computations in Distributed Systems. The MIT Press, Cambridge (1986)Google Scholar
  2. 2.
    Agha, G., Hewitt, C.: Concurrent programming using actors. In: Yonezawa, A., Tokoro, M. (eds.) Object-Oriented Concurrent Programming. The MIT Press, Cambridge (1987)Google Scholar
  3. 3.
    Armstrong, J.: Programming Erlang: Software for a Concurrent World. Pragmatic Bookshelf, Dallas (2007)Google Scholar
  4. 4.
    Baldan, P., Bonchi, F., Gadducci, F., Monreale, G.V.: Modular encoding of synchronous and asynchronous interactions using open Petri nets. Sci. Comput. Program. 109, 96–124 (2015)CrossRefMATHGoogle Scholar
  5. 5.
    Best, E., Devillers, R., Koutny, M.: Petri Net Algebra. EATCS. Springer, Heidelberg (2001). doi:10.1007/978-3-662-04457-5 CrossRefMATHGoogle Scholar
  6. 6.
    Bruni, R., Melgratti, H., Tuosto, E.: Translating orc features into petri nets and the join calculus. In: Bravetti, M., Núñez, M., Zavattaro, G. (eds.) WS-FM 2006. LNCS, vol. 4184, pp. 123–137. Springer, Heidelberg (2006). doi:10.1007/11841197_8 CrossRefGoogle Scholar
  7. 7.
    Busi, N., Gorrieri, R.: A petri net semantics for pi-calculus. In: Lee, I., Smolka, S.A. (eds.) CONCUR 1995. LNCS, vol. 962, pp. 145–159. Springer, Heidelberg (1995). doi:10.1007/3-540-60218-6_11 CrossRefGoogle Scholar
  8. 8.
    Caromel, D., Henrio, L.: A Theory of Distributed Object: Asynchrony – Mobility – Groups – Components. Springer, Heidelberg (2005). doi:10.1007/b138812 MATHGoogle Scholar
  9. 9.
    Chandy, K.M., Misra, J., Haas, L.M.: Distributed deadlock detection. ACM Trans. Comput. Syst. 1(2), 144–156 (1983)CrossRefGoogle Scholar
  10. 10.
    de Boer, F.S., Bravetti, M., Grabe, I., Lee, M., Steffen, M., Zavattaro, G.: A petri net based analysis of deadlocks for active objects and futures. In: Păsăreanu, C.S., Salaün, G. (eds.) FACS 2012. LNCS, vol. 7684, pp. 110–127. Springer, Heidelberg (2013). doi:10.1007/978-3-642-35861-6_7 CrossRefGoogle Scholar
  11. 11.
    de Boer, F.S., Clarke, D., Johnsen, E.B.: A complete guide to the future. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 316–330. Springer, Heidelberg (2007). doi:10.1007/978-3-540-71316-6_22 CrossRefGoogle Scholar
  12. 12.
    Flores-Montoya, A.E., Albert, E., Genaim, S.: May-happen-in-parallel based deadlock analysis for concurrent objects. In: Beyer, D., Boreale, M. (eds.) FMOODS/FORTE -2013. LNCS, vol. 7892, pp. 273–288. Springer, Heidelberg (2013). doi:10.1007/978-3-642-38592-6_19 CrossRefGoogle Scholar
  13. 13.
    Giachino, E., Laneve, C., Lienhardt, M.: A framework for deadlock detection in core ABS. Softw. Syst. Model. 15(4), 1013–1048 (2016)CrossRefGoogle Scholar
  14. 14.
    Haller, P., Odersky, M.: Scala actors: unifying thread-based and event-based programming. Theor. Comput. Sci. 410(2–3), 202–220 (2009)CrossRefMATHMathSciNetGoogle Scholar
  15. 15.
    Ichbiah, J., Barnes, J.G.P., Heliard, J.C., Krieg-Brückner, B., Roubine, O., Wichmann, B.A.: Modules and visibility in the Ada programming language. In: McKeag, R.M., Macnaghten, A.M. (eds.) On the Construction of Programs. Cambrige University Press, New York (1980)Google Scholar
  16. 16.
    Jensen, K.: Coloured petri nets. In: Brauer, W., Reisig, W., Rozenberg, G. (eds.) ACPN 1986. LNCS, vol. 254, pp. 248–299. Springer, Heidelberg (1987). doi:10.1007/978-3-540-47919-2_10 CrossRefGoogle Scholar
  17. 17.
    Jensen, K., Kristensen, L.M.: Coloured Petri Nets - Modelling and Validation of Concurrent Systems. Springer, Heidelberg (2009). doi:10.1007/b95112 CrossRefMATHGoogle Scholar
  18. 18.
    Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Steffen, M.: ABS: a core language for abstract behavioral specification. In: Aichernig, B.K., de Boer, F.S., Bonsangue, M.M. (eds.) FMCO 2010. LNCS, vol. 6957, pp. 142–164. Springer, Heidelberg (2011). doi:10.1007/978-3-642-25271-6_8 CrossRefGoogle Scholar
  19. 19.
    Johnsen, E.B., Schlatte, R., Tarifa, S.L.T.: Integrating deployment architectures and resource consumption in timed object-oriented models. J. Logic. Algebr. Methods Program. 84(1), 67–91 (2015)CrossRefMATHGoogle Scholar
  20. 20.
    Long, B., Strooper, P.A., Wildman, L.: A method for verifying concurrent Java components based on an analysis of concurrency failures. Concurr. Comput. Pract. Exp. 19(3), 281–294 (2007)CrossRefGoogle Scholar
  21. 21.
    Owe, O., Yu, I.C.: Deadlock detection of active objects with synchronous and asynchronous method calls. In: Proceedings of NIK 2014 (2014)Google Scholar
  22. 22.
    Petri, C.: Kommunikation mit Automaten. Ph.D. thesis, Universität Bonn (1962)Google Scholar
  23. 23.
    Pun, K.I.: Behavioural static analysis for deadlock detection. Ph.D. thesis, Department of informatics, University of Oslo, Norway (2014)Google Scholar
  24. 24.
    Ratzer, A.V., Wells, L., Lassen, H.M., Laursen, M., Qvortrup, J.F., Stissing, M.S., Westergaard, M., Christensen, S., Jensen, K.: CPN tools for editing, simulating, and analysing coloured petri nets. In: van der Aalst, W.M.P., Best, E. (eds.) ICATPN 2003. LNCS, vol. 2679, pp. 450–462. Springer, Heidelberg (2003). doi:10.1007/3-540-44919-1_28 CrossRefGoogle Scholar
  25. 25.
    Reisig, W.: Petri Nets. Monographs in Theoretical Computer Science. An EATCS Series, vol. 4. Springer, Heidelberg (1985). doi:10.1007/978-3-642-69968-9 CrossRefMATHGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2017

Authors and Affiliations

  • Anastasia Gkolfi
    • 1
  • Crystal Chang Din
    • 1
  • Einar Broch Johnsen
    • 1
  • Martin Steffen
    • 1
  • Ingrid Chieh Yu
    • 1
  1. 1.Department of InformaticsUniversity of OsloOsloNorway

Personalised recommendations