Skip to main content

Matching and Merging Scenarios Automatically with Alloy

Part of the Communications in Computer and Information Science book series (CCIS,volume 506)


The design of large systems often involves the creation of models that describe partial specifications. Model composition is the process of combining partial models to create a single coherent model. This paper presents an automatic composition technique for creating a sequence diagram from partial specifications captured in multiple sequence diagrams with the help of Alloy. Our contribution is twofold: a novel true-concurrent semantics for sequence diagram composition, and a model-driven transformation of sequence diagrams to Alloy that preserves the semantics of composition defined. We have created a tool SD2Alloy that implements the technique as follows: two given sequence diagrams are transformed into two Alloy models, and merged according to a set of syntactic logical constraints describing how their elements should be matched. These constraints are in accordance to our compositional semantics. The technique can also be used to detect problems and inconsistencies in the composition of diagrams.


  • UML sequence diagrams
  • Model transformation
  • Composition
  • Alloy

This is a preview of subscription content, access via your institution.

Buying options

USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-319-25156-1_7
  • Chapter length: 17 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
USD   54.99
Price excludes VAT (USA)
  • ISBN: 978-3-319-25156-1
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   69.99
Price excludes VAT (USA)
Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.
Fig. 7.
Fig. 8.
Fig. 9.
Fig. 10.
Fig. 11.


  1. 1.


  1. La Rosa, M., Dumas, M., Uba, R., Dijkman, R.: Merging business process models. In: Meersman, R., Dillon, T.S., Herrero, P. (eds.) OTM 2010. LNCS, vol. 6426, pp. 96–113. Springer, Heidelberg (2010)

    CrossRef  Google Scholar 

  2. Rubin, J., Chechik, M., Easterbrook, S.: Declarative approach for model composition. In: MiSE 2008, pp. 7–14. ACM (2008)

    Google Scholar 

  3. Widl, M., Biere, A., Brosch, P., Egly, U., Heule, M., Kappel, G., Seidl, M., Tompits, H.: Guided merging of sequence diagrams. In: Czarnecki, K., Hedin, G. (eds.) SLE 2012. LNCS, vol. 7745, pp. 164–183. Springer, Heidelberg (2013)

    CrossRef  Google Scholar 

  4. OMG: UML: Superstructure. Version 2.4.1. OMG (2011)., Document id: formal/2011-08-06. Accessed 1 June 2012

  5. Winskel, G., Nielsen, M.: Models for concurrency. In: Abramsky, S., Gabbay, D., Maibaum, T. (eds.) Handbook of Logic in Computer Science. Semantic Modelling, vol. 4, pp. 1–148. Oxford Science Publications (1995)

    Google Scholar 

  6. Küster-Filipe, J.: Modelling concurrent interactions. Theor. Comput. Sci. 351, 203–220 (2006)

    MathSciNet  CrossRef  MATH  Google Scholar 

  7. Kleppe, A., Warmer, J., Bast, W.: MDA Explained: The Model Driven Architecture: Practice and Promise. Addison-Wesley, Boston (2003)

    Google Scholar 

  8. Harel, D., Marelly, R.: Come, Let’s Play: Scenario-Based Programming Using LSCs and the Play-Engine. Springer, Heidelberg (2003)

    CrossRef  Google Scholar 

  9. Micskei, Z., Waeselynck, H.: The many meanings of UML 2 sequence diagrams: a survey. Softw. Syst. Model. 10, 489–514 (2011)

    CrossRef  Google Scholar 

  10. Jackson, D.: Software Abstractions: Logic, Language and Analysis. MIT Press, Cambridge (2006)

    Google Scholar 

  11. Berre, D.L., Parrain, A.: The SAT4j library, release 2.2 - system description. J. Satisfiability, Boolean Model. Comput. 7, 59–64 (2010)

    Google Scholar 

  12. Stahl, T., Völter, M.: Model-Driven Software Development. Wiley, Chichester (2006)

    MATH  Google Scholar 

  13. Gonzalez-Perez, C., Henderson-Sellers, B.: Metamodelling for Software Engineering. Wiley, Chichester (2008)

    Google Scholar 

  14. Akehurst, D.H., Bordbar, B., Evans, M.J., Howells, W.G.J., McDonald-Maier, K.D.: SiTra: simple transformations in java. In: Wang, J., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 351–364. Springer, Heidelberg (2006)

    CrossRef  Google Scholar 

  15. Chen, Y.: Automated synthesis of sequence diagrams. Master’s thesis, University of Birmingham (2013)

    Google Scholar 

  16. Lanusse, A., Tanguy, Y., Espinoza, H., et al.: Papyrus UML: an open source toolset for MDA. In: ECMDA-FA 2009, pp. 1–4 (2009)

    Google Scholar 

  17. Liang, H., Diskin, Z., Dingel, J., Posse, E.: A general approach for scenario integration. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 204–218. Springer, Heidelberg (2008)

    CrossRef  Google Scholar 

  18. Bordbar, B., Anastasakis, K.: Uml2alloy: a tool for lightweight modelling of discrete event systems. In: IADIS International Conference in Applied Computing, vol. 1, pp. 209–216 (2005)

    Google Scholar 

  19. Bowles, J., Bordbar, B.: A formal model for integrating multiple views. In: ACSD 2007, pp. 71–79. IEEE (2007)

    Google Scholar 

  20. Araújo, J., Whittle, J., Kim, D.: Modeling and composing scenario-based requirements with aspects. In: RE 2004, pp. 58–67. IEEE (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to J. Bowles .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Bowles, J., Alwanain, M., Bordbar, B., Chen, Y. (2015). Matching and Merging Scenarios Automatically with Alloy. In: Hammoudi, S., Pires, L., Filipe, J., das Neves, R. (eds) Model-Driven Engineering and Software Development. MODELSWARD 2014. Communications in Computer and Information Science, vol 506. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-25155-4

  • Online ISBN: 978-3-319-25156-1

  • eBook Packages: Computer ScienceComputer Science (R0)