Translating Alloy Specifications to UML Class Diagrams Annotated with OCL

  • Ana Garis
  • Alcino Cunha
  • Daniel Riesco
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7041)


Model-Driven Engineering (MDE) is a Software Engineering approach based on model transformations at different abstraction levels. It prescribes the development of software by successively transforming models from abstract (specifications) to more concrete ones (code). Alloy is an increasingly popular lightweight formal specification language that supports automatic verification. Unfortunately, its widespread industrial adoption is hampered by the lack of an ecosystem of MDE tools, namely code generators. This paper presents a model transformation between Alloy and UML Class Diagrams annotated with OCL. The proposed transformation enables current UML-based tools to also be applied to Alloy specifications, thus unleashing its potential for MDE.




Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Anastasakis, K., Bordbar, B., Georg, G., Ray, I.: On challenges of model transformation from UML to Alloy. Software and Systems Modeling 9(1), 69–86 (2008)CrossRefGoogle Scholar
  2. 2.
    Braga, B.F.B., Almeida, J.P.A., Guizzardi, G., Benevides, A.B.: Transforming OntoUML into Alloy: towards conceptual model validation using a lightweight formal method. Innovations in Systems and Software Engineering 6(1-2), 55–63 (2010)CrossRefGoogle Scholar
  3. 3.
    Brucker, A.D., Wolff, B.: HOL-OCL: a formal proof environment for UML/OCL. In: Fiadeiro, J.L., Inverardi, P. (eds.) FASE 2008. LNCS, vol. 4961, pp. 97–100. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  4. 4.
    Demuth, B., Hussmann, H., Loecher, S.: OCL as a specification language for business rules in database applications. In: Gogolla, M., Kobryn, C. (eds.) UML 2001. LNCS, vol. 2185, pp. 104–117. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  5. 5.
  6. 6.
    Edwards, J., Jackson, D., Torlak, E.: A type system for object models. In: Proceedings of the 12th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 189–199. ACM, New York (2004)Google Scholar
  7. 7.
    Georg, G., Anastasakis, K., Bordbar, B., Houmb, S.H., Toahchoodee, I.R.M.: Verification and trade-off analysis of security properties in UML system models. IEEE Transactions on Software Engineering 36(3), 338–356 (2010)CrossRefGoogle Scholar
  8. 8.
    El Ghazi, A.A., Taghdiri, M.: Relational reasoning via SMT solving. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 133–148. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  9. 9.
    Gheyi, R., Massoni, T., Borba, P.: Formally introducing Alloy idioms. In: Proceedings of the Brazilian Symposium on Formal Methods, pp. 22–37 (2007)Google Scholar
  10. 10.
    Giannakopoulos, T., Dougherty, D.J., Fisler, K., Krishnamurthi, S.: Towards an operational semantics for alloy. In: Cavalcanti, A., Dams, D.R. (eds.) FM 2009. LNCS, vol. 5850, pp. 483–498. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  11. 11.
    Gogolla, M., Bohling, J., Richters, M.: Validating UML and OCL models in USE by automatic snapshot generation. Software and Systems Modeling 4(4), 386–398 (2005)CrossRefGoogle Scholar
  12. 12.
    Jackson, D.: Software Abstractions: Logic, Language, and Analysis. MIT Press, Cambridge (2006)Google Scholar
  13. 13.
    Massoni, T., Gheyi, R., Borba, P.: Formal refactoring for UML Class Diagrams. In: Proceedings of the 19th Brazilian Symposium on Software Engineering, pp. 152–167 (2005)Google Scholar
  14. 14.
    Mostefaoui, F., Vachon, J.: Verification of Aspect-UML models using Alloy. In: Proceedings of the 10th International Workshop on Aspect-Oriented Modeling, pp. 41–48. ACM, New York (2007)CrossRefGoogle Scholar
  15. 15.
    OMG: MDA Guide version 1.0.1 (2003)Google Scholar
  16. 16.
    OMG: Object Constraint Language, Version 2.2 (2010)Google Scholar
  17. 17.
    OMG: UML Superstructure, Version 2.3 (2010)Google Scholar
  18. 18.
    Shah, S.M.A., Anastasakis, K., Bordbar, B.: From UML to Alloy and back again. In: Proceedings of the 6th International Workshop on Model-Driven Engineering, Verification and Validation. ACM, New York (2009)Google Scholar
  19. 19.
    Vaziri, M., Jackson, D.: Some shortcomings of OCL, the Object Constraint Language of UML. In: Proceedings of the 34th International Conference on Technology of Object-Oriented Languages and Systems, pp. 555–562. IEEE, Los Alamitos (2000)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Ana Garis
    • 1
  • Alcino Cunha
    • 2
  • Daniel Riesco
    • 1
  1. 1.Universidad Nacional de San LuisSan LuisArgentina
  2. 2.DI-CCTCUniversidade do MinhoBragaPortugal

Personalised recommendations