Staged Model-Driven Generators - Shifting Responsibility for Code Emission to Embedded Metaprograms

Yannis Lilis, Anthony Savidis, Yannis Valsamakis

2014

Abstract

We focus on MDE tools generating source code, entire or partial, providing a basis for programmers to introduce custom system refinements and extensions. The latter may introduce two maintenance issues once code is freely edited: (i) if source tags are affected model reconstruction is broken; and (ii) code inserted without special tags is overwritten on regeneration. Additionally, little progress has been made in combining sources whose code originates from multiple generative tools. To address these issues we propose an alternative path. Instead of generating code MDE tools generate source fragments as abstract syntax trees (ASTs). Then, programmers deploy metaprogramming to manipulate, combine and insert code on-demand from ASTs with calls resembling macro invocations. The latter shifts responsibility for source code emission from MDE tools to embedded metaprograms and enables programmers control where the produced code is inserted and integrated. Moreover, it supports source regeneration and model reconstruction causing no maintenance issues since MDE tools produce non-editable ASTs. We validate our proposition with case studies involving a user-interface builder and a general purpose modeling tool.

Download


Paper Citation


in Harvard Style

Lilis Y., Savidis A. and Valsamakis Y. (2014). Staged Model-Driven Generators - Shifting Responsibility for Code Emission to Embedded Metaprograms . In Proceedings of the 2nd International Conference on Model-Driven Engineering and Software Development - Volume 1: MODELSWARD, ISBN 978-989-758-007-9, pages 509-521. DOI: 10.5220/0004878605090521

in Bibtex Style

@conference{modelsward14,
author={Yannis Lilis and Anthony Savidis and Yannis Valsamakis},
title={Staged Model-Driven Generators - Shifting Responsibility for Code Emission to Embedded Metaprograms},
booktitle={Proceedings of the 2nd International Conference on Model-Driven Engineering and Software Development - Volume 1: MODELSWARD,},
year={2014},
pages={509-521},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0004878605090521},
isbn={978-989-758-007-9},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 2nd International Conference on Model-Driven Engineering and Software Development - Volume 1: MODELSWARD,
TI - Staged Model-Driven Generators - Shifting Responsibility for Code Emission to Embedded Metaprograms
SN - 978-989-758-007-9
AU - Lilis Y.
AU - Savidis A.
AU - Valsamakis Y.
PY - 2014
SP - 509
EP - 521
DO - 10.5220/0004878605090521