D.3.3 ALGORITHMS FOR INCREMENTAL ... - SecureChange
D.3.3 ALGORITHMS FOR INCREMENTAL ... - SecureChange
D.3.3 ALGORITHMS FOR INCREMENTAL ... - SecureChange
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Quick fix generation for DSMLs<br />
Ábel Hegedüs ∗ , Ákos Horváth ∗ , István Ráth ∗ , Moisés Castelo Branco † and Dániel Varró ∗<br />
∗ Budapest University of Technology and Economics<br />
Budapest, Hungary<br />
Email: {hegedusa,ahorvath,rath,varro}@mit.bme.hu<br />
† University of Waterloo<br />
Waterloo, Ontario, Canada<br />
Email: mcbranco@gsd.uwaterloo.ca<br />
Abstract—Domain-specific modeling languages (DSML) proved<br />
to be an important asset in creating powerful design tools for<br />
domain experts. Although these tools are capable of preserving<br />
the syntax-correctness of models even during free-hand editing,<br />
they often lack the ability of maintaining model consistency for<br />
complex language-specific constraints. Hence, there is a need<br />
for a tool-level automatism to assist DSML users in resolving<br />
consistency violation problems. In this paper, we describe<br />
an approach for the automatic generation of quick fixes for<br />
DSMLs, taking a set of domain-specific constraints and model<br />
manipulation policies as input. The computation relies on statespace<br />
exploration techniques to find sequences of operations<br />
that decrease the number of inconsistencies. Our approach is<br />
illustrated using a BPMN case study, and it is evaluated by several<br />
experiments to show its feasibility and performance.<br />
I. INTRODUCTION<br />
In model-driven software engineering, domain-specific<br />
modeling (visual) languages (DSMLs) provide a popular<br />
rapid prototyping and generative technique to increase design<br />
reusability, speed up the development process and improve<br />
overall quality by raising the level of abstraction from software<br />
specific details to the problem domain itself. Today, DSMLs<br />
are deployed in many development toolchains to aid both<br />
software designers and domain experts, in order to integrate<br />
deep domain knowledge at an early design phase.<br />
While many standard DSMLs are readily available (such as<br />
AUTOSAR for automotive software design, or process modeling<br />
languages such as BPMN [1] for service-oriented systems),<br />
custom modeling environments are developed in-house by<br />
many organizations to tailor development tools and code<br />
generators to their specific needs. This language engineering<br />
process relies on frameworks such as the Eclipse Modeling<br />
Framework (EMF [2]) or MetaEdit+ [3] that provide powerful<br />
tools for defining DSMLs and to automatically generate textual<br />
or graphical editors for creating domain models.<br />
As domain-specific models are abstract and thus highly<br />
compact representations of the system-under-design, a key<br />
issue (that arises in both standardized and custom-made modeling<br />
environments) is inconsistency management. Inconsistencies<br />
are violations of the well-formedness and correctness<br />
rules of the language that may correspond to design errors, or<br />
violations of the company’s policies and best practices. While<br />
domain-specific editors are usually capable of ensuring that elementary<br />
editing operations preserve syntactic correctness (by<br />
e.g. syntax-driven editing), most DSMLs include additional<br />
language-specific consistency rules that must also be checked.<br />
In the current state-of-the-art of modeling tools, inconsistency<br />
management of complex rules focuses primarily on<br />
the detection of inconsistency rule violations, facilitated by<br />
dedicated constraint evaluators that take e.g. an OCL [4]<br />
expression and generate code that continuously scans the<br />
models and reports problematic model elements to the user.<br />
However, the resolution of these violations is mostly a manual<br />
task: the user may manually alter the model to eliminate the<br />
violations, but this can be a very challenging problem due to<br />
the complexity of the language or the concrete model. As a<br />
result, manually fixing a violation of one inconsistency rule<br />
may introduce new violations of other rules.<br />
In programming languages, the concept of quick fixes (also<br />
called error correction, code completion) is a very popular feature<br />
of integrated development environments such as Eclipse or<br />
Microsoft Visual Studio, which aids programmers in quickly<br />
repairing problematic source code segments. This feature is<br />
deeply integrated into the programming environment and it<br />
can be invoked any time for a detected violation, giving the<br />
developer a list of fixing actions that can be applied instantly.<br />
In the current paper, we propose to adapt this concept to<br />
domain-specific modeling languages. Our aim is to provide a<br />
domain-independent framework (that is applicable for a wide<br />
range of DSMLs), which can efficiently compute complex<br />
fixing action sequences even when multiple, overlapping inconsistency<br />
rule violations are present in the model. To capture<br />
inconsistency rules of a DSML, we use graph patterns that<br />
define declarative structural constraints. Our technique uses<br />
graph transformation rules to specify elementary fix operations<br />
(policies). These operations are automatically combined by a<br />
structural constraint solving algorithm that relies on heuristicsdriven<br />
state-space exploration to find quick fix sequences<br />
efficiently. As a result, our approach provides high-level extensibility<br />
that allows both the language engineer and the end<br />
user to extend the library of supported inconsistency rules and<br />
fixing policies.<br />
The rest of the paper is structured as follows. Section II<br />
introduces the problem of model editing for DSMLs and describes<br />
our BPMN case study used for illustration throughout<br />
the paper. In Section III, we give a more precise definition on<br />
quick fixes for DSMLs, describe the process for generating