While the generation of executable code for explicit associations in UML models is well understood, it is less clear how executable code can be generated if the associations are derived. We discuss how this can be achieved for an important class of derived associations that are defined by means of derivation rules. The result is optimized and executable (as opposed to template) code. The generated code supports semantic reflection, that is, runtime access to the rules used to define the association. We relate these features to use cases from the area of business rules. We also present the Take rule compiler, a Java implementation of the principles discussed.
Index Terms:
MDA, MDE, UML, code generation, rule-based systems, derivation rules, reflection, model transformations
Citation:
Jens Dietrich, Bastian Schenke, Gerd Wagner, "On Code Generation for Derived Associations," aswec, pp.347-356, 19th Australian Conference on Software Engineering (aswec 2008), 2008