Transformation contracts in practice

C. Braga, R. Menezes, T. Comicio, C. Santos, E. Landim
2012 IET Software  
Model-driven development (MDD) is a software engineering discipline which suggests that software development should be done at the modeling level and that applications should be generated from models. The MDD approach is becoming more mature in time with new techniques and tools being defined to support it, also as a result of intensive research in this field. A key concept of MDD is a model transformation that generates applications from models. Since models are "first-class" citzens in MDD
more » ... ir verification and validation is an important task. Of course, also are model transformations. In this paper we apply the transformation contract approach to model transformations. A transformation contract is a specification of what a particular model transformation must implement and essentially specifies a relation between metamodels, the transformation metamodel, and properties that such a relation must satisfy, such as invariants in the Object Constraint Language (OCL). A transformation contract is said to be correct when a source model in conformance with its metamodel implies in a target model in conformance with the target metamodel and the joined model of source and target is in conformance with the transformation metamodel, where model conformance means that all the properties of a metamodel hold in a model. We have defined a design pattern that enforces transformation contract correction over model transformations, that is, a model transformation implemented following our transformation contract will be verified and validated following transformation contracts correctness. We have also developed model transformations using our transformation contract design pattern. The UMLToEJB model transformation generates application code in Enterprise Java Beans, from class diagrams described in the Unified Modeling Language. This paper reports on our proposed design pattern, the design of UMLToEJB, and illustrates how our approach may help different actors in MDD with transformation contracts, including model transformation designers, to identify erroneous situations.
doi:10.1049/iet-sen.2011.0013 fatcat:oznv3u4lsrcwtog2j6izdu5sjy