Skip to main content

A Clean and Efficient Implementation of Choreography Synthesis for Behavioural Contracts

  • Conference paper
  • First Online:
Coordination Models and Languages (COORDINATION 2021)

Abstract

The Contract Automata Tool is an open-source tool for the specification, composition and synthesis of coordination of service contracts, including functionalities to deal with modalities and configurations. We discuss an implementation of the abstract parametric synthesis algorithm firstly introduced in our COORDINATION 2019 paper, comprehending most permissive controller, orchestration and choreography synthesis. The tool’s source code has been redesigned and refactored in Java 8, and we show the resulting gain in computational efficiency.

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

Access this chapter

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

Institutional subscriptions

Notes

  1. 1.

    https://sparxsystems.com/products/ea/.

  2. 2.

    https://www.oracle.com/java/technologies/java8.html.

References

  1. Ahrendt, W., Beckert, B., Bubel, R., Hähnle, R., Schmitt, P.H., Ulbrich, M. (eds.): Deductive Software Verification - The KeY Book: From Theory to Practice. LNCS, vol. 10001. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-49812-6

    Book  Google Scholar 

  2. Atampore, F., Dingel, J., Rudie, K.: Automated service composition via supervisory control theory. In: Proceedings of the 13th International Workshop on Discrete Event Systems (WODES 2016), pp. 28–35. IEEE (2016). https://doi.org/10.1109/WODES.2016.7497822

  3. Autili, M., Inverardi, P., Perucci, A., Tivoli, M.: Synthesis of distributed and adaptable coordinators to enable choreography evolution. In: de Lemos, R., Garlan, D., Ghezzi, C., Giese, H. (eds.) Software Engineering for Self-Adaptive Systems III. Assurances. LNCS, vol. 9640, pp. 282–306. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-74183-3_10

    Chapter  Google Scholar 

  4. Autili, M., Salle, A.D., Gallo, F., Pompilio, C., Tivoli, M.: CHOReVOLUTION: service choreography in practice. Sci. Comput. Program. 197 (2020). https://doi.org/10.1016/j.scico.2020.102498

  5. Bartoletti, M., Cimoli, T., Zunino, R.: Compliance in behavioural contracts: a brief survey. In: Bodei, C., Ferrari, G.-L., Priami, C. (eds.) Programming Languages with Applications to Biology and Security. LNCS, vol. 9465, pp. 103–121. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-25527-9_9

    Chapter  Google Scholar 

  6. Basile, D., et al.: Controller synthesis of service contracts with variability. Sci. Comput. Program. 187 (2020). https://doi.org/10.1016/j.scico.2019.102344

  7. Basile, D., ter Beek, M.H., Gnesi, S.: Modelling and analysis with featured modal contract automata. In: Proceedings of the 22nd International Systems and Software Product Line Conference (SPLC 2018), vol. 2, pp. 11–16. ACM (2018). https://doi.org/10.1145/3236405.3236408

  8. Basile, D., ter Beek, M.H., Legay, A.: Strategy synthesis for autonomous driving in a moving block railway system with Uppaal Stratego. In: Gotsman, A., Sokolova, A. (eds.) FORTE 2020. LNCS, vol. 12136, pp. 3–21. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-50086-3_1

    Chapter  Google Scholar 

  9. Basile, D., ter Beek, M.H., Pugliese, R.: Synthesis of orchestrations and choreographies: bridging the gap between supervisory control and coordination of services. Log. Methods Comput. Sci. 16(2) (2020). https://doi.org/10.23638/LMCS-16(2:9)2020

  10. Basile, D., Degano, P., Ferrari, G.L.: Automata for specifying and orchestrating service contracts. Log. Methods Comput. Sci. 12(4:6), 1–51 (2016). https://doi.org/10.2168/LMCS-12(4:6)2016

    Article  MathSciNet  MATH  Google Scholar 

  11. Basile, D., Degano, P., Ferrari, G.L., Tuosto, E.: Relating two automata-based models of orchestration and choreography. J. Log. Algebr. Meth. Program. 85(3), 425–446 (2016). https://doi.org/10.1016/j.jlamp.2015.09.011

    Article  MathSciNet  MATH  Google Scholar 

  12. Basu, S., Bultan, T.: Automated choreography repair. In: Stevens, P., Wąsowski, A. (eds.) FASE 2016. LNCS, vol. 9633, pp. 13–30. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49665-7_2

    Chapter  Google Scholar 

  13. ter Beek, M.H., Reniers, M.A., de Vink, E.P.: Supervisory controller synthesis for product lines using CIF 3. In: Margaria, T., Steffen, B. (eds.) ISoLA 2016, Part I. LNCS, vol. 9952, pp. 856–873. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-47166-2_59

    Chapter  Google Scholar 

  14. ter Beek, M.H., Bucchiarone, A., Gnesi, S.: Web service composition approaches: from industrial standards to formal methods. In: Proceedings of the 2nd International Conference on Internet and Web Applications and Services (ICIW 2007). IEEE (2007). https://doi.org/10.1109/ICIW.2007.71

  15. Boswell, D., Foucher, T.: The Art of Readable Code. O’Reilly, Sebastopol (2011)

    Google Scholar 

  16. Bouguettaya, A., et al.: A service computing manifesto: the next 10 years. Commun. ACM 60(4), 64–72 (2017). https://doi.org/10.1145/2983528

    Article  Google Scholar 

  17. Caillaud, B., Darondeau, P., Lavagno, L., Xie, X. (eds.): Synthesis and Control of Discrete Event Systems. Springer, New York (2002). https://doi.org/10.1007/978-1-4757-6656-1

    Book  MATH  Google Scholar 

  18. https://github.com/davidebasile/ContractAutomataLib

  19. https://github.com/davidebasile/ContractAutomataApp

  20. Dean, J., Ghemawat, S.: MapReduce: simplified data processing on large clusters. Commun. ACM 51(1), 107–113 (2008). https://doi.org/10.1145/1327452.1327492

    Article  Google Scholar 

  21. Ferrari, A., Mazzanti, F., Basile, D., ter Beek, M.H., Fantechi, A.: Comparing formal tools for system design: a judgment study. In: Proceedings of the 42nd International Conference on Software Engineering (ICSE 2020), pp. 62–74. ACM (2020). https://doi.org/10.1145/3377811.3380373

  22. https://github.com/davidebasile/ContractAutomataLib/blob/old-backup/src/FMCA/FMCA.java#L1200 . Lines 1200–1378 contain the orchestration synthesis, lines 1385–1596 the choreography synthesis (the utility methods are not counted)

  23. Garavel, H., Beek, M.H., van de Pol, J.: The 2020 expert survey on formal methods. In: ter Beek, M.H., Ničković, D. (eds.) FMICS 2020. LNCS, vol. 12327, pp. 3–69. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-58298-2_1

  24. Gleirscher, M., Marmsoler, D.: Formal methods in dependable systems engineering: a survey of professionals from Europe and North America. Empir. Softw. Eng. 25(6), 4473–4546 (2020). https://doi.org/10.1007/s10664-020-09836-5

    Article  Google Scholar 

  25. Goetz, B., Peierls, T., Bloch, J., Bowbeer, J., Holmes, D., Lea, D.: Java Concurrency in Practice. Addison-Wesley, Amsterdam (2006)

    Google Scholar 

  26. Goorden, M.A., et al.: The road ahead for supervisor synthesis. In: Pang, J., Zhang, L. (eds.) SETTA 2020. LNCS, vol. 12153, pp. 1–16. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-62822-2_1

    Chapter  Google Scholar 

  27. Goorden, M., van de Mortel-Fronczak, J., Reniers, M., Fokkink, W., Rooda, J.: The impact of requirement splitting on the efficiency of supervisory control synthesis. In: Larsen, K.G., Willemse, T. (eds.) FMICS 2019. LNCS, vol. 11687, pp. 76–92. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-27008-7_5

    Chapter  MATH  Google Scholar 

  28. Guanciale, R., Tuosto, E.: PomCho: a tool chain for choreographic design. Sci. Comput. Program. 202 (2021). https://doi.org/10.1016/j.scico.2020.102535

  29. Henderson, K., Salado, A.: Value and benefits of model-based systems engineering (MBSE): evidence from the literature. Syst. Eng. 24(1), 51–66 (2021). https://doi.org/10.1002/sys.21566

    Article  Google Scholar 

  30. Huisman, M., Gurov, D., Malkis, A.: Formal methods: from academia to industrial practice. A travel guide. arXiv:2002.07279 [cs.SE], February 2020. https://arxiv.org/abs/2002.07279

  31. Khatchadourian, R., Tang, Y., Bagherzadeh, M.: Safe automated refactoring for intelligent parallelization of Java 8 streams. Sci. Comput. Program. 195 (2020). https://doi.org/10.1016/j.scico.2020.102476

  32. Khatchadourian, R., Tang, Y., Bagherzadeh, M., Ahmed, S.: Safe automated refactoring for intelligent parallelization of Java 8 streams. In: Proceedings of the 41st International Conference on Software Engineering (ICSE 2019), pp. 619–630. IEEE (2019). https://doi.org/10.1109/ICSE.2019.00072

  33. Khatchadourian, R., Tang, Y., Bagherzadeh, M., Ray, B.: An empirical study on the use and misuse of Java 8 streams. In: Wehrheim, H., Cabot, J. (eds.) FASE 2020. LNCS, vol. 12076, pp. 97–118. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45234-6_5

    Chapter  Google Scholar 

  34. Komenda, J., Masopust, T., van Schuppen, J.H.: Supervisory control synthesis of discrete-event systems using a coordination scheme. Automatica 48(2), 247–254 (2012). https://doi.org/10.1016/j.automatica.2011.07.008

    Article  MathSciNet  MATH  Google Scholar 

  35. Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes – a comprehensive study on real world concurrency bug characteristics. In: Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2008), pp. 329–339. ACM (2008). https://doi.org/10.1145/1346281.1346323

  36. Martin, R.C.: Clean Code. Prentice Hall, Upper Saddle River (2008)

    Google Scholar 

  37. https://jgraph.github.io/mxgraph/java/index.html

  38. Najem, T.: A formal semantics for supporting the automated synthesis of choreography-based architectures. In: Proceedings of the 13th European Conference on Software Architecture (ECSA 2019), vol. 2, pp. 51–54. ACM (2019). https://doi.org/10.1145/3344948.3344949

  39. Ng, N., Yoshida, N.: Static deadlock detection for concurrent go by global session graph synthesis. In: Proceedings of the 25th International Conference on Compiler Construction (CC 2016), pp. 174–184. ACM (2016). https://doi.org/10.1145/2892208.2892232

  40. Peltz, C.: Web services orchestration and choreography. IEEE Comput. 36(10), 46–52 (2003). https://doi.org/10.1109/MC.2003.1236471

    Article  Google Scholar 

  41. Ramadge, P.J., Wonham, W.M.: Supervisory control of a class of discrete event processes. SIAM J. Control. Optim. 25(1), 206–230 (1987). https://doi.org/10.1137/0325013

    Article  MathSciNet  MATH  Google Scholar 

  42. Tockey, S.: How to Engineer Software: A Model-Based Approach. Wiley, Hoboken (2019)

    Book  Google Scholar 

  43. Warburton, R.: Java 8 Lambdas: Pragmatic Functional Programming. O’Reilly, New York (2014)

    Google Scholar 

Download references

Acknowledgments

We acknowledge funding from the MIUR PRIN 2017FTXR7S project IT MaTTerS (Methods and Tools for Trustworthy Smart Systems).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Davide Basile .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Basile, D., ter Beek, M.H. (2021). A Clean and Efficient Implementation of Choreography Synthesis for Behavioural Contracts. In: Damiani, F., Dardha, O. (eds) Coordination Models and Languages. COORDINATION 2021. Lecture Notes in Computer Science(), vol 12717. Springer, Cham. https://doi.org/10.1007/978-3-030-78142-2_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-78142-2_14

  • Published:

  • Publisher Name: Springer, Cham

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

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics