Implementing QVT-R Bidirectional Model Transformations Using Alloy

  • Nuno Macedo
  • Alcino Cunha
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7793)


QVT Relations (QVT-R) is the standard language proposed by the OMG to specify bidirectional model transformations. Unfortunately, in part due to ambiguities and omissions in the original semantics, acceptance and development of effective tool support has been slow. Recently, the checking semantics of QVT-R has been clarified and formalized. In this paper we propose a QVT-R tool that complies to such semantics. Unlike any other existing tool, it also supports meta-models enriched with OCL constraints (thus avoiding returning ill-formed models), and proposes an alternative enforcement semantics that works according to the simple and predictable “principle of least change”. The implementation is based on an embedding of both QVT-R transformations and UML class diagrams (annotated with OCL) in Alloy, a lightweight formal specification language with support for automatic model finding via SAT solving.


Object Constraint Language Edit Operation Object Management Group Domain Pattern Graph Edit Distance 
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.


  1. 1.
    Anastasakis, K., Bordbar, B., Georg, G., Ray, I.: On challenges of model transformation from UML to Alloy. Software and Systems Modeling 9, 69–86 (2010)CrossRefGoogle Scholar
  2. 2.
    Boronat, A., Carsí, J.Á., Ramos, I.: Algebraic Specification of a Model Transformation Engine. In: Baresi, L., Heckel, R. (eds.) FASE 2006. LNCS, vol. 3922, pp. 262–277. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  3. 3.
    Bradfield, J., Stevens, P.: Recursive Checkonly QVT-R Transformations with General when and where Clauses via the Modal Mu Calculus. In: de Lara, J., Zisman, A. (eds.) FASE 2012. LNCS, vol. 7212, pp. 194–208. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  4. 4.
    Cabot, J., Clarisó, R., Guerra, E., de Lara, J.: Verification and validation of declarative model-to-model transformations through invariants. Journal of Systems and Software 83(2), 283–302 (2012)CrossRefGoogle Scholar
  5. 5.
    Cicchetti, A., Di Ruscio, D., Eramo, R., Pierantonio, A.: JTL: A Bidirectional and Change Propagating Transformation Language. In: Malloy, B., Staab, S., van den Brand, M. (eds.) SLE 2010. LNCS, vol. 6563, pp. 183–202. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  6. 6.
    Cunha, A., Garis, A., Riesco, D.: Translating between Alloy specifications and UML class diagrams annotated with OCL (2012),
  7. 7.
    Garcia, M.: Formalization of QVT-Relations: OCL-based static semantics and Alloy-based validation. In: MDSD Today 2008. pp. 21–30. Shaker Verlag (2008)Google Scholar
  8. 8.
    Greenyer, J., Kindler, E.: Comparing relational model transformation technologies: implementing Query/View/Transformation with Triple Graph Grammars. Software and System Modeling 9(1), 21–46 (2010)CrossRefGoogle Scholar
  9. 9.
    Guerra, E., de Lara, J.: An algebraic semantics for QVT-relations check-only transformations. Fundam. Inform. 114(1), 73–101 (2012)zbMATHGoogle Scholar
  10. 10.
    ikv++ technologies ag: medini QVT,
  11. 11.
    Jackson, D.: Software Abstractions: Logic, Language, and Analysis, revised edn. MIT Press, London (2012)Google Scholar
  12. 12.
    de Lara, J., Guerra, E.: Formal Support for QVT-Relations with Coloured Petri Nets. In: Schürr, A., Selic, B. (eds.) MODELS 2009. LNCS, vol. 5795, pp. 256–270. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  13. 13.
    Meertens, L.: Designing constraint maintainers for user interaction (1998), manuscript available at
  14. 14.
    Milicevic, A., Jackson, D.: Preventing Arithmetic Overflows in Alloy. In: Derrick, J., Fitzgerald, J., Gnesi, S., Khurshid, S., Leuschel, M., Reeves, S., Riccobene, E. (eds.) ABZ 2012. LNCS, vol. 7316, pp. 108–121. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  15. 15.
    OMG: MOF 2.0 Query/View/Transformation specification (QVT), version 1.1 (January 2011),
  16. 16.
    OMG: OMG Unified Modeling Language (UML), version 2.4.1 (August 2011),
  17. 17.
    OMG: OMG Object Constraint Language (OCL), version 2.3.1 (January 2012),
  18. 18.
    Stevens, P.: Bidirectional model transformations in QVT: semantic issues and open questions. Software and System Modeling 9(1), 7–20 (2010)CrossRefGoogle Scholar
  19. 19.
    Stevens, P.: A simple game-theoretic approach to checkonly QVT relations. Software and System Modeling (2011),
  20. 20.
    Tata Research Development and Design Centre: ModelMorf,
  21. 21.
    Voigt, K.: Structural Graph-based Metamodel Matching. Ph.D. thesis, University of Desden (2011)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Nuno Macedo
    • 1
  • Alcino Cunha
    • 1
  1. 1.HASLAB — High Assurance Software LaboratoryINESC TEC & Universidade do MinhoBragaPortugal

Personalised recommendations