UML2Alloy: A Challenging Model Transformation

  • Kyriakos Anastasakis
  • Behzad Bordbar
  • Geri Georg
  • Indrakshi Ray
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4735)


Alloy is a formal language, which has been applied to modelling of systems in a wide range of application domains. It is supported by Alloy Analyzer, a tool, which allows fully automated analysis. As a result, creating Alloy code from a UML model provides the opportunity to exploit analysis capabilities of the Alloy Analyzer to discover possible design flaws at early stages of the software development. Our research makes use of model based techniques for the automated transformation of UML class diagrams with OCL constraints to Alloy code. The paper demonstrates challenging aspects of the model transformation, which originate in fundamental differences between UML and Alloy. We shall discuss some of the differences and illustrate their implications on the model transformation process. The presented approach is explained via an example of a secure e-business system.


Model Transformation Transformation Rule Class Diagram Alloy Analyzer Model Drive Architecture 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    OMG: UML Infrastructure Document: formal/05-07-05,
  2. 2.
    Marcano, R., Levy, N.: Using B formal specifications for analysis and verification of UML/OCL models. In: Workshop on consistency problems in UML-based software development. 5th International Conference on the Unified Modeling Language, Dresden, Germany (2002)Google Scholar
  3. 3.
    Kim, S.K.: A Metamodel-based Approach to Integrate Object-Oriented Graphical and Formal Specification Techniques. PhD thesis, University of Queensland, Brisbane, Australia (2002)Google Scholar
  4. 4.
    Evans, A., France, R., Grant, E.: Towards Formal Reasoning with UML Models. In: Proceedings of the OOPSLA 1999 Workshop on Behavioral Semantics (1999)Google Scholar
  5. 5.
    Jackson, D.: Software Abstractions: Logic, Language, and Analysis. The MIT Press, London, England (2006)Google Scholar
  6. 6.
    Jackson, D.: Alloy Analyzer website,
  7. 7.
    Taghdiri, M., Jackson, D.: A lightweight formal analysis of a multicast key management scheme. In: König, H., Heiner, M., Wolisz, A. (eds.) FORTE 2003. LNCS, vol. 2767, pp. 240–256. Springer, Heidelberg (2003)Google Scholar
  8. 8.
    Georg, G., Bieman, J., France, R.B.: Using Alloy and UML/OCL to Specify Run-Time Configuration Management: A Case Study. In: Evans, A., France, R., Moreira, A., Rumpe, B. (eds.) Practical UML-Based Rigorous Development Methods - Countering or Integrating the eXtremists. LNI, German Informatics Society, vol. P-7, pp. 128–141 (2001)Google Scholar
  9. 9.
    Dennis, G., Seater, R., Rayside, D., Jackson, D.: Automating commutativity analysis at the design level. In: ISSTA 2004. ACM SIGSOFT international symposium on Software testing and analysis, pp. 165–174. ACM Press, New York (2004)CrossRefGoogle Scholar
  10. 10.
    Richters, M.: A Precise Approach to Validating UML Models and OCL Constraints. PhD thesis, Universitaet Bremen, Logos Verlag, Berlin, BISS Monographs, No. 14 (2002)Google Scholar
  11. 11.
    Bordbar, B., Anastasakis, K.: UML2Alloy: A tool for lightweight modelling of Discrete Event Systems. In: Guimarães, N., Isaías, P. (eds.) IADIS International Conference in Applied Computing 2005, vol. 1, pp. 209–216. IADIS Press, Algarve, Portugal (2005)Google Scholar
  12. 12.
    Bordbar, B., Anastasakis, K.: MDA and Analysis of Web Applications. In: Draheim, D., Weber, G. (eds.) TEAA 2005. LNCS, vol. 3888, pp. 44–55. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  13. 13.
    Kleppe, A., Warmer, J., Bast, W.: MDA Explained: The Model Driven Architecture-Practice and Promise. The Addison-Wesley Object Technology Series. Addison-Wesley, Reading (2003)Google Scholar
  14. 14.
    OMG: MOF Core v. 2.0 Document Id: formal/06-01-01,
  15. 15.
    Akehurst, D.H., Bordbar, B., Evans, M.J., Howells, W.G.J., McDonald-Maier, K.D.: SiTra: Simple transformations in java. In: Nierstrasz, O., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 351–364. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  16. 16.
    OMG: UML: Superstructure. Document id: formal/05-07-04,
  17. 17.
    OMG: OCL Version 2.0 Document id: formal/06-05-01,
  18. 18.
    Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: principles, techniques, and tools. Addison-Wesley, Reading (1986)Google Scholar
  19. 19.
    Wimmer, M., Kramler, G.: Bridging grammarware and modelware. In: Bruel, J.M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 159–168. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  20. 20.
    TLSWG: SSL 3.0 specification (1996),
  21. 21.
    Georg, G., Anastasakis, K., Bordbar, B., Houmb, S.H., Ray, I., Toahchoodee, M.: Verification and trade-off analysis of security properties in UML system models. Transaction. In: Software Engineering. Special Issue on Security (submitted)Google Scholar
  22. 22.
    Jackson, D.: A Comparison of Object Modelling Notations: Alloy, UML and Z (August 1999), Available at
  23. 23.
    Vaziri, M., Jackson, D.: Some Shortcomings of OCL, the Object Constraint Language of UML. In: Technology of Object-Oriented Languages and Systems (TOOLS 34’00), Santa Barbara, California, pp. 555–562 (2000)Google Scholar
  24. 24.
    Gogolla, M., Richters, M.: Transformation rules for UML class diagrams. In: Bézivin, J., Muller, P.-A. (eds.) The Unified Modeling Language. UML 1998: Beyond the Notation. LNCS, vol. 1618, pp. 92–106. Springer, Heidelberg (1999)Google Scholar
  25. 25.
    Wallace, C.: Using Alloy in process modelling. Information and Software Technology 45(15), 1031–1043 (2003)CrossRefGoogle Scholar
  26. 26.
    Zito, A., Diskin, Z., Dingel, J.: Package Merge in UML 2: Practice vs. Theory? In: Nierstrasz, O., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 185–199. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  27. 27.
    Woodcock, J., Davies, J.: Using Z: Specification, Refinement, and Proof. Prentice Hall, Upper Saddle River, NJ (1996)zbMATHGoogle Scholar
  28. 28.
    Abrial, J.R.: The B-book: assigning programs to meanings. Cambridge University Press, New York (1996)zbMATHGoogle Scholar
  29. 29.
    He, Y.: Comparison of the modeling languages Alloy and UML. In: Arabnia, H.R., Reza, H. (eds.) SERP 2006. Software Engineering Research and Practice, Las Vegas, Nevada, vol. 2, pp. 671–677 (2006)Google Scholar
  30. 30.
    Negri, M., Pelagatti, G., Sbattella, L.: Formal semantics of SQL queries. ACM Transactions on Database Systems (TODS) 16(3), 513–534 (1991)CrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Kyriakos Anastasakis
    • 1
  • Behzad Bordbar
    • 1
  • Geri Georg
    • 2
  • Indrakshi Ray
    • 2
  1. 1.School of Computer Science, University of Birmingham, Edgbaston, BirminghamUK
  2. 2.Computer Science Department, Colorado State University, Fort Collins, ColoradoUSA

Personalised recommendations