====== Towards Round-Trip Engineering in Model-Driven Software Product Lines ====== ==== Go back to... ==== {{backlinks>.}} ===== Context ===== In [[http://www.softwareproductlines.com/|Software Product Lines (SPLs)]], commonalities between closely related software products are leveraged by integrating all those products in a single production line. Our [[research:mdd:casestudies:im]] is an example of such a product line, where multiple versions of an instant messenger are generated from a central specification, as shown below: {{ teaching:thesis0910:proposals:instantmessengerspl.png?550 |Instant Messenger SPL}} This particular SPL is a Model-Driven SPL: it uses models to represent the core architecture and the features, and it uses [[wp>Model_transformation|model transformation]] to generate the products. The core architecture is represented as a [[wp>Platform-independent_model|Platform-Independent Model (PIM)]]. In the case of our instant messenger, the PIM is specific to Java client platforms, but it is independent of any specific Java client platform, such as J2ME [[http://java.sun.com/products/personalprofile/|PP]] or [[http://java.sun.com/products/midp/|MIDP]]. Step-wise refinement transformations defined in [[eclipse>ATL]] are used to replace platform-independent parts in the PIM by platform-specific parts -- one step at a time. The end result is a [[wp>Platform-specific_model|Platform-Specific Model (PSM)]], which can be translated directly into code. ===== Problem ===== The current state of model-driven SPLs does not allow for easy feedback of code changes into the PIM, such that other product variants can benefit from it. In the case of our instant messenger example, code changes need to be copied back manually either to the PIM or the corresponding feature. After that, the other products can be re-generated. In addition to the fact that having to manually copy back code is very tedious and error-prone, the developer also has to find out **where** the code has to be copied to. This requires in-depth knowledge of the SPL. This is something that the core architecture team has, but the same cannot be expected from the product development teams. ===== Objective ===== In order to propagate back code changes to the models from which it was generated, one can use [[wp>Round-trip_engineering|Round-Trip Engineering (RTE)]]. There currently are a number of existing approaches for RTE, but none of them is really generic. As a consequence, the RTE problem must be solved again for each specific situation. Model transformation languages provide a step towards generic RTE, for example by providing bi-directional transformations. As a first step, you will focus on the model-to-code step in our [[research:mdd:casestudies:im]]. At this moment, code is generated as text, which can be parsed by the Java compiler. In order to perform RTE, our model transformations must be able to read back generated Java code. This can be done by providing the code as a low-level model, which is readable by model transformation engines. Possible candidates for reading back code as a model are: * The [[http://www.eclipse.org/gmt/modisco/toolBox/JavaAbstractSyntax/|MoDisco Java Abstract Syntax Discovery]] tool. * The [[http://tinyurl.com/spoonemf|SPOON-EMF]] tool. Based on such a tool, you will build a framework that can keep the model and code representation of a Java program synchronised. Such a framework will provide generic RTE for all Java code, as the remainder of the RTE can then be done by model transformation. ===== Advisors ===== * [[SSELMember>ragnhildvanderstraeten|Ragnhild Van Der Straeten]] * [[SSELMember>denniswagelaar|Dennis Wagelaar]] ===== References ===== ==== Links ==== The following links are provided **in addition to** the links given above: * [[wp>Model_Driven_Engineering|Model Driven Engineering]] * [[http://www.modelsconference.org/|International Conference on Model Driven Engineering Languages and Systems]] * [[http://www.model-transformation.org/ICMT2008/|International Conference on Model Transformation]] * [[http://ecmda2009.utwente.nl/|European Conference on Model-Driven Architecture Foundations and Applications]] ==== Papers ==== @inproceedings{conf/models/Antkiewicz06, Author = {Michal Antkiewicz and Krzysztof Czarnecki}, Month = OCT, Publisher = publisher/springer, Title = {Proceedings of the ACM/IEEE 9th International Conference on Model Driven Engineering Languages and Systems (MoDELS 2006), Genova, Italy}, Volume = {4199}, Year = {2006}, Pages = {692--706}, URL = {http://gp.uwaterloo.ca/files/2006-antkiewicz-fsmls-with-rte.pdf}, Title = {Framework-Specific Modeling Languages with Round-Trip Engineering}} @techreport{techrep/Henriksson2003, Address = {Link\"{o}ping, Sweden}, Author = {Anders Henriksson and Henrik Larsson}, Institution = {Department of Computer and Information Science, Link\"{o}pings Universitet}, Title = {A Definition of Round-trip Engineering}, Year = {2003}, URL = {http://www.ida.liu.se/~andhe/re.pdf}} @phdthesis{phdthesis/VanPaesschen2006, Address = {Brussels, Belgium}, Author = {Ellen {Van Paesschen}}, School = {Vrije Universiteit Brussel}, Title = {Advanced Round-Trip Engineering: An Agile Analysis-driven Approach for Dynamic Languages}, Year = {2006}, URL = {http://prog.vub.ac.be/Publications/2006/vub-prog-phd-06-03.pdf}}