Transformation contracts in practice
Model-driven development (MDD) is a software engineering discipline which suggests that software development should be done at the modelling level and that applications should be generated from models. A key concept of MDD is a model transformation that generates software artifacts, such as code, from models. Since models are ‘first-class’ citizens in MDD, their verification and validation are important tasks and so are the model transformations. A transformation contract, which is also a model, is a specification of what a particular model transformation must implement and essentially specifies a relation between metamodels and properties that must hold on such a relation. The authors have defined a design pattern that enforces transformation contract correctness over model transformations implementations. This study reports on (i) the proposed design pattern, (ii) the design of the UMLtoEJB model transformation that generates application code, following the Enterprise Java Beans standard, from class diagrams described in the Unified Modelling Language, and (iii) a discussion on how the transformation contracts approach may help different actors, in an MDD software development process with transformation contracts, to identify erroneous situations.