<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Bidirectional Synchronization of Multiple Views of Software Models</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Miguel Garcia</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for Software Systems (STS) Hamburg University of Technology (TUHH)</institution>
          ,
          <addr-line>21073 Hamburg</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Current best-practices for defining Domain-Specific Modeling Languages call for metamodeling techniques, which do not take into account the future use of such languages in multiview design environments. Tool implementers have tried a variety of ad-hoc techniques to maintain views in-synch, with modest results. To improve this state of affairs, a declarative approach is elaborated to automate multiview synchronization, building upon existing metamodeling techniques and recent advances in the field of function inversion for bidirectionalization. An application of these ideas to EMOF and a discussion of the resulting Declarative MVC software architecture are also provided. A significant benefit of the approach is the resulting comprehensive solution to a recurrent problem in the software modeling field.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>The definition of a modeling language that introduces views is thus expected to provide
an algorithm to determine whether a set of views is consistent. Using metamodeling
terminology, the check for consistency is formulated as follows: (a) for each diagram type
a metamodel has been defined, whose instances constitute the views manipulated by the
modeler, including geometric information; (b) each such metamodel defines its intra-view
Well-Formedness Rules (WFRs); and (c) additional WFRs ensure consistency
encompassing several views. Given that WFRs are boolean-valued predicates over an object
population, a yes/no answer can be provided about the consistency of the integrated model, i.e.,
the set of all views prepared by the modeler. Unless inter-view consistency is addressed at
the level of the language definition itself, disagreement will otherwise ensue. For
example, the workshop series Consistency Problems in UML-based Software Development was
devoted to overcoming such disagreement for UML 1.x.</p>
      <p>As useful as they are, yes/no answers about consistency contribute only partially to
productivity. In a multiview setting, additional use cases demand automation (multiview
synchronization, model refactoring [MB05, CW07], and model completion [SBP07]). In this
paper, we address the multiview synchronization problem (defined below), leveraging on
the lessons learnt from the related problem of inter-view consistency: we rely on a formal
technique and address this concern at the language definition level.</p>
      <p>Keeping multiple views in-synch requires propagating changes in two directions: (a) change
requests validated against the WFRs of the integrated model are to be reflected on views;
and (b) user-initiated view updates are to be processed in the opposite direction. The
algorithm for realizing (a) is fixed once a view definition is available: given that the integrated
model includes geometric information, updating views amounts to evaluating a function
again. The situation is not so simple for (b), where partial information is available. For
example, a particular view definition may select only those items at odd-numbered
positions in a list. Inserting into the view then raises the question as to where to add an item in
the underlying list (which is part of the integrated model). Such kind of decision problems
are not solved by the current best-practices around tool implementation:
Model-ViewController architecture (MVC), runtime evaluation of WFRs expressed in OCL,
transparent undo/redo. Rather, the particular realization of (b) is left to the criteria of tool vendors,
thus opening the door to non-standard implementations. Our contribution in this paper
improves on this state of affairs, not by building a tool with multiview synchronization
capabilities (which is a task for industry) but by disclosing the inner workings of such
solution (which industry refrains from doing).
1.1</p>
      <sec id="sec-1-1">
        <title>Benefits of the proposed approach</title>
        <p>The lack of tool compatibility (and sometimes correctness) around multiview
synchronization stems from the fact that the specific policy governing synchronization is encoded
manually in the Controller module of MVC (by each tool vendor, usually in an
imperative language). In contrast, a declarative formulation, available as part of the language
definition itself, allows both generating such implementation as well as statically
analyzing the bidirectional transformations at design time. We call this approach DMVC, for
Declarative MVC. The resulting productivity gain is particularly relevant for DSMLs, as
the cost of developing tooling for them has to be amortized over a much smaller number
of projects than for their general purpose counterparts. The DMVC approach is in line
with recent advances in the definition of visual notations, where geometric constraints are
used at runtime to automate the maintenance of diagram layouts, as discussed in detail by
Grundy [LHG07] and exemplified in an Eclipse-based modeling tool generator1.
1Marama meta-tools, https://wiki.auckland.ac.nz/display/csidst/Marama+Tatau
This is called the view update problem in the database literature.</p>
        <sec id="sec-1-1-1">
          <title>Database</title>
        </sec>
        <sec id="sec-1-1-2">
          <title>View definition</title>
        </sec>
        <sec id="sec-1-1-3">
          <title>View</title>
          <p>S
Updated</p>
          <p>S
recombine old S with new T</p>
          <p>T
Updated</p>
          <p>T
Our proposed architecture for DMVC builds upon a bidirectional transformation engine
fulfilling formal guarantees. For example, given a view definition written by the DSML
author, the engine can automatically derive its corresponding backward transformation.
Importantly, the backward transformations [Ste07] thus obtained can cope with
many-toone mappings (i.e., non-injective functions, where different inputs are mapped to the same
output, as for example in f (x; y) = x + y). This is achieved with stateful transformations,
which track the information needed to complement that lost by the mapping (in the
example, keeping a copy of either x or y allows handling user updates to x + y). Additionally,
it is common practice for a backward transformation to take as input, besides the updated
view, the original source. The intuition behind this scheme is depicted in Figure 1.
Statefulness and recombination distinguish our problem space from plain function
inversion, which is enough in the particular case where each of (source, view) can be fully
reconstructed from the other, i.e., whenever there is a one-to-one correspondence (a
bijection) between source and target domains. As argued by Stevents [Ste07], such situation
constitutes the exception rather than the rule in multiview modeling languages. For
example, dual syntaxes [BMS07] do exhibit this property: a human-oriented syntax is defined
for pretty-printing Abstract Syntax Trees (ASTs), while an accompanying XML-based
syntax is defined for tool interchange. An MVC editor displaying a dedicated view for
each representation needs no further information than the contents of an updated view in
order to refresh the other, as no information is elided in the alternative syntaxes. In terms
of our adopted approach, bijections are handled the same as the non-injective case (the
latter being the “interesting” one from the point of view of multiview synchronization).
In summary, bidirectional transformations increase the productivity of the tooling process
for DSMLs, and the quality of multiview environments. The structure of this paper is as
follows. Competing methodologies around view update are reviewed in Sec. 2, followed in
Sec. 3 by the application of one of them to the multiview synchronization problem,
comprising the definition of EMOF-level operators for view specification (Sec. 3.1) that are
well-behaved from a bidirectionalization point of view (Sec. 3.2). Given that any realistic
multiview modeling tool will rely on available MVC frameworks, these practical aspects
are discussed in Sec. 4. By placing the reported techniques in perspective, Sec. 5 reviews
our contributions and concludes. Knowledge is assumed about language metamodeling, a
background in functional programming is helpful but not required.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Candidate approaches distilled</title>
      <p>All the approaches reviewed in this section share the common goal of enabling
bidirectional transformations between pairs of data structures, with differences spanning the
preferred representation (e.g., unordered trees vs. semi-structured data) and the available
transformation operators (which may or may not allow user updates to alter the
transformation as a side-effect). Besides highlighting the innovative aspects of each technique,
their comparison allows introducing terminology to better characterize the multiview
synchronization problem. However, the reader interested in the resulting Declarative MVC
architecture may focus on Sec. 2.1 and skip the remaining subsections, moving directly to
Sec. 3.</p>
      <p>For ease of reference, candidate approaches are loosely grouped into (a) general
purpose techniques (program inversion, data synchronization, and virtual view update); and
(b) techniques aiming at supporting model transformations (QVT-Relations and
graphgrammar based). This classification has more to do with the current level of adoption in
the model-driven community than with any inherent capability of each approach.
2.1</p>
      <sec id="sec-2-1">
        <title>Program inversion, Data synchronization, and Virtual view update</title>
        <p>Program inversion. We discuss this technique first as it constitutes the basis for
Declarative MVC. Program inversion [MHN+07] in the context of functional programming refers
to determining, given a function f (x1; : : : xn), its inverse, so as to obtain the arguments
given a result. For our problem at hand, an insight consists in choosing the building blocks
for expressing view definitions such that they fulfill three bidirectional properties:
a) Stability: unmodified views are transformed back into the same source that gave origin
to them (i.e., backward transformations introduce no spurious information);
b) Restorability: all updates on a source (that affect a view) can be canceled by updates
on the view (i.e., the user has means to restore the integrated model to a previous state
by just acting on the view)
c) Composability: the backward transformation is oblivious to the order in which updates
took place (what counts is the end state).</p>
        <p>Moreover, any composition of building blocks fulfilling these properties defines again a
well-behaved bidirectional transformation. A Haskell implementation of an algorithm for
the above is available2. We do not reproduce here the theory behind this algorithm, which
is proficiently covered by Matsuda et. al. in their ICFP 2007 paper [MHN+07].
Program inversion fulfilling the above properties has been applied to particular cases: Liu
[LHT+07b] presents a Java library for the bidirectional transformation of XML documents
2Generation of backward transformation programs based on derivation of view complement functions,
http://www.ipl.t.u-tokyo.ac.jp/˜kztk/bidirectionalization/
(the transformation operators constituting the BiXJ language). A subset of XQuery is
translated into BiXJ in [LHT07a], thus allowing using a mainstream language for view
definition, again with a prototype realization available3. Along the same lines, Xiong
[XLH+07] translates a subset of ATL (Atlas Transformation Language), thus achieving
bidirectionality4.</p>
        <p>Data synchronization. Algorithms developed to synchronize intermittently connected
data sources (such as file systems or address books, between mobile and stationary
devices) can also be applied to keep complex software artifacts in-synch. An exponent of
this approach is the Harmony project [FGM+07] whose engine5 implements Focal, a
language with building blocks that allow writing only functions that always behave as lenses,
i.e., bidirectional transformations. Focal is a low-level language operating on tree-shaped
data structures (specifically, edge-labeled unordered trees). Standard encodings for
mainstream data structures (lists, XML) are available, as well as libraries of higher-level lenses
defined in terms of primitive ones. The design of Focal reflects its theoretical
underpinnings in the field of type systems for programming languages, as static assurances can be
obtained about the detailed type of inputs and outputs, to avoid runtime checks. In contrast,
implementations such as BiXJ resort to returning a default value (e.g., unchanged input)
or throw an exception whenever a function argument lies outside the function’s domain.
The capabilities of EMOF-based modeling infrastructures (in particular undo/redo and
evaluation of OCL invariants) grant a large degree of tolerance to inconsistent input, a
feature that proves extremely valuable during the initial exploratory phases of DSML
language engineering (which comprises the definition of transformations for each view).
Moreover, experience shows that modelers frequently perform a series of editing
operations which temporarily result in WFRs being broken. We aim at preserving this flexibility,
to avoid usability problems similar to those that plagued syntax-directed text editors. In
summary, we strike a balance between static assurances and ease of use by relying on
runtime checks to capture side conditions not enforceable at design-time. If needed, static
assurances beyond those amenable to static type checking can still be obtained by offline
model checking, as shown in the case studies of [ABK07] (for transformations expressed
as LHS ! RHS production rules) and [GM07] (for imperative transformations).
Update of virtual views in databases. The view update problem has been studied in the
context of databases, where the mechanism to define views is taken as given (relational
algebra or calculus) and the kinds of view updates that may be propagated back without loss
of information are determined. Recent work focuses on updating virtual and materialized
XML views (in the latter case, incrementally). Most results have been incorporated into
the program inversion and data synchronization techniques [MHN+07, FGM+07].
Given that the EMOF data model is richer than its relational counterpart (because of object
IDs, ordered collections, reference handshaking), techniques targeting relational databases
are overly restrictive when adapted to EMOF, limiting the operators available for view
definition. The incremental maintenance of materialized views in OO databases is studied
by Ali [AFP03].</p>
        <p>3BiXJ and Bi-CQ, http://www.ipl.t.u-tokyo.ac.jp/˜liu/
4Bi-ATL, http://www.ipl.t.u-tokyo.ac.jp/˜xiong/modelSynchronization.html.
5Harmony Project, http://www.seas.upenn.edu/˜harmony.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>QVT-Relations and Graph-grammars</title>
        <p>QVT-Relations. QVT-Relations was designed to encode input-output relationships by
means of pattern-matching guarded by preconditions. At any given point in time, all but
one of the models participating in a transformation are considered as non-updatable, thus
constraining the solution space to a well-defined set of (updates, instantiations, deletions)
on the target model.</p>
        <p>Erche et. al. [EWH07] point out that metamodel-based language specs do not specify the
connection between concrete and abstract syntax and propose QVT-Relations to bridge
that gap. Given that such transformations are bidirectional, their architecture aims at
solving the same problem space as Declarative MVC. There is no detailed discussion in
[EWH07] on whether every QVT-Relations transformation is well-behaved in terms of the
conditions defined by Matsuda et. al. [MHN+07] (Sec. 2.1). Irrespective of the particular
transformation mechanism adopted, Duboisset [DPKS05] recognizes that not all
geometric constraints relevant for concrete visual syntaxes can be expressed in EMOF + OCL
metamodels, offering as an example topological constraints in spatial databases. It is clear
that QVT-Relations can support roundtripping over one-to-one mappings, however a
discussion of its capabilities to back-propagate updates on non-injective views is missing in
the literature. Our approach around geometric constraints is covered in Sec. 4.
Triple Graph Grammars (TGGs). TGGs [GGL05] build upon directed typed graphs and
graph morphisms. Informally, a TGG transformation rule consists of three graphs (left,
interface, and right) and two morphisms (from the interface graph to each of left, right)
which together describe the correspondence between embeddings of these graphs in source
and target. In other words, such rule also states the inter-consistency conditions between
source and target, besides specifying a transformation. Figure 2 depicts an example, the
compilation of if-then-else into lower-level constructs (conditional jumps). Before a
TGG transformation can be applied, its positive and negative application conditions are
evaluated. These conditions demand a required context (certain nodes or edges must exist)
or forbid a context (certain nodes or edges must be absent) connected in a certain topology.
An extension of TGG transformations to accomodate N -way relations is offered in [KS06].
For our purposes, this capability is not necessary as our architecture revolves around a
single integrated model (i.e., to synchronize N different view types N bidirectional
transformations are defined, as depicted in Figure 3). Graphical IDE support is available6, and
modularization has been proposed to cope with large-scale transformations. Similar to
other rewriting techniques, the control flow aspect of a complex transformation (when to
apply which rules) suggests breaking up large transformations into several more focused
ones, to be applied sequentially.</p>
        <p>As with the data synchronization approach, an encoding of EMOF models is necessary
(in this case, into directed typed graphs), as well as expressing transformations in terms
of graph morphisms guarded by application conditions. In our setting, some features of
6Some TGG-based tools: (a) MOFLON, http://www.moflon.org/; (b) MoTE/MoRTEn (as FUJABA
plugins), http://wwwcs.uni-paderborn.de/cs/fujaba/projects/tgg/; (c) AToM3, http:
//atom3.cs.mcgill.ca/
the program inversion approach (Sec. 2.1) prove beneficial over TGGs: (a) OCL
expressions in view definitions can be used directly by Matsuda’s bidirectionalization algorithm
[MHN+07], and (b) no explicit rules need be declared to delete view elements not
supported anymore by source elements. The runtime overhead of encoding EMOF models
into graphs can be reduced with the Adapter design pattern, at the cost of an indirection
level (as with any approach, these design decisions would need to be revisited if the
modeling infrastructure natively managed models in the format of the transformation engine).</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Integration in an EMOF-based modeling infrastructure</title>
      <p>After settling on the bidirectional program inversion technique [MHN+07], the
interfacing of its functional inversion algorithm with current metamodeling infrastructure has to be
addressed. A canonical approach consists in encoding EMOF models into inductive data
types to automatically apply the inversion algorithm to each view definition, expressed
as an affine function in treeless form [MHN+07]. Alternatively, a fixed catalog of
bidirectional operators can be defined for EMOF models, fulfilling the three stated
bidirectional properties. Both alternatives are explored, in Sec. 3.2 and Sec. 3.1 resp. Briefly,
the advantage of the canonical approach is the open-ended set of base operators that can
be defined, while the existing EMOF-based ones can only be recombined. On the other
hand, adopting the EMOF-based operators avoids the detour to the inductive-data-types
representation. Besides the performance gain, usability is also improved, as modelers are
accustomed to conceptualizing transformations in terms of EMOF-level constructs. In any
case, the approaches are not mutually exclusive, and any of them can be adopted to define
views (injective or not) as part of the Declarative MVC (DMVC) architecture (Sec. 4).
As with Bidirectional-XQuery [LHT07a] and Bidirectional-ATL [XLH+07] a possibility
consists in finding a subset of QVT-Relations amenable to encoding with bidirectional
operators. Given that DSML authors already master the concepts required to understand
the building blocks of bidirectionalization, directly using them results in making available
their full expressive power. In a next step, subsets of OCL and QVT-Relations, which are
already EMOF-aware, can be recast in terms of the operators in the next two subsections.</p>
      <sec id="sec-3-1">
        <title>Operators for two-way transformations in Ecore: TwEcore</title>
        <p>Each operator consists of a forward and a backward function. Borrowing notation from
[HLM+06], JXKF (s) stands for the application of the (possibly composite) operator X
to the source s in the forward direction, resulting in a view t. The backward function,
X B(s; t0) takes as argument the unmodified source s, the updated view t0, and
reJ K
turns a pair (s0; X0) consisting of an updated source s0 as well as a possibly updated
operator X0, to be used in further invocations. This statefulness is exemplified by X =
twRenameProp(old, new), to rename the property p named old, where s denotes an
EMOF class. In this case JXKF (s) is a clone of s save for renaming the cloned
property p from old to new. In turn, JXKB(s; t0) = (s0; X0) where t0 may have user
updates, including renaming of property p itself. The backward function returns in s0 such
changes save for any renaming of p, whose name is restored to old. An updated
property name new’ provided by the user on the view t0 is recorded instead in the state of X0
= twRenameProp(old, new’). Therefore, a successive application of X will involve
again the latest name entered by the user.</p>
        <p>The basic example of a composite transformation is function composition, represented by
X = twSeq(X0 ...Xn), where the simpler transformations X0 . . . Xn are applied so
that s0i is the updated source for ti (0 i n 1). The definition for this generic
operation is reproduced from [HLM+06]:</p>
        <p>[[X]]F (s) = t
[[X]]B(s, t ) = (s , &lt;txwsSeeqq&gt;[X0 ... Xn])
where t0 = [[X0]]F (s)
...</p>
        <p>t = [[Xn]]F (tn−1)
(sn−1, Xn) = [[Xn]]B(tn−1, t )</p>
        <p>...</p>
        <p>(s , X0) = [[X0]]B(s, s0)
In addition to the operator definitions, an EBNF-based concrete syntax is necessary to
facilitate the discussion and exchange of view definitions (an area for future work in
TwEcore). In terms of implementation, such syntax proves useful as it enables the
interpretation of ad-hoc, or dynamically generated, view-definition scripts. In fact, this use
case was foreseen by the authors of [MHN+07] and is supported in a Haskell-based
bidirectional XML editor where users can update not only sources and views, but also
transformations connecting them.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Encoding of EMOF models using inductive data types</title>
        <p>This subsection explores the implications (for multiview synchronization) of
implementing an EMOF infrastructure using functional programming (FP) instead of Java. This
exercise is not as far-fetched as it might seem at first sight because: (a) several
bidirectionalization approaches are naturally expressed with FP; (b) functional programs are more
amenable to static analysis than their OO counterparts; and (c) most of the proposed new
language features for post-Java languages originate in FP7. The Declarative MVC
architecture does not impose a functional realization, with this subsection serving as outlook
for readers sharing an interest in functional programming.</p>
        <p>Porting an EMOF infrastructure to the functional paradigm comprises devising
encodings for (a) EMOF data structures, and (b) algorithms for views and transformations in
EMOF. Regarding (a), given that EMOF models are typed, labelled graphs, the
encoding proposed by Erwig is applicable [Erw01]. Regarding (b), the algorithms to port fall
into two categories: (b.1) those already formulated in terms of OO concepts (e.g.,
written in QVT-Relations, ATL8, or Java); and (b.2) those written as affine functions in
treeless form, as expected by the algorithm for well-behaved bidirectionalization of Matsuda
et. al. [MHN+07]. For (b.1) an encoding style is required that at least preserves the
typechecking capabilities of the OO representation. The OOHaskell approach (Kiselyov and
La¨mmel [KL05]) fulfills these requirements by exploiting the type checking and type
inference mechanisms of Haskell. As a result, Haskell-based processing following an OO
style never results in a runtime errors like “method not found” that the OO version would
have detected at compile-time.</p>
        <p>While the pragmatic approach of TwEcore (and BiXJ, Bi-XQuery, and Bi-ATL) accelerates
the construction of proofs of concept for DMVC tools, the same benefits could be easily
achieved in a modeling infrastructure based on functional programming.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Diagram-based views and Geometric Constraint Solvers</title>
      <p>Existing MVC frameworks for modeling infrastructures (e.g., EMF.Edit) support
out-ofthe-box a particular case of synchronization between view and model, namely bijections,
where updates originating in a view are applied as-is to the single correspoding item in the
associated model. The Declarative MVC architecture leverages this data binding
capability (for EMF9, GUI widgets10, and the Eclipse Graphical Modeling Framework11).
Interactions of this kind do not have to cope with non-injectiveness (as in f (x; y) = x + y).
For comparison, they are shown bracketed with (A) in Figure 3, while those requiring
bidirectionalization are marked with (B).</p>
      <p>In case an update to the integrated model requires adding figures to a diagram view, default
values have to be provided for the figure’s position, size, layer, color, etc. While these
values cannot be computed by the bidirectional transformation engine, they can still be
managed declaratively with the help of a geometric constraint solver (e.g., [MC02]) which
assumes the role of a local Controller in one of the MVC subsystems depicted in Figure 3
7Scala programming language, http://www.scala-lang.org/
8ATL, ATLAS Transformation Language, http://www.eclipse.org/m2m/atl/
9EMF Data Binding, https://bugs.eclipse.org/bugs/show_bug.cgi?id=75625
10JFace Data Binding, http://wiki.eclipse.org/index.php/JFace_Data_Binding
11Eclipse GMF, http://www.eclipse.org/gmf/
(i.e., it processes a subset of the view-level change requests, forwarding the non-filtered
ones to the main Controller). Constraint solvers are responsible for enforcing geometric
invariants, such as: (a) ensuring area inclusion between substates and their parent state in
a statechart diagram, (b) ensuring non-overlap of the 2D regions for different figures.
The constraints on the layout of figures mandated by a visual syntax do not usually
comprise the heuristics (such as crossings minimization) that distinguish a diagram with a
comfortable layout from another which is hard to decipher. After computing a layout
that fulfills those cognitive quality measures, small user edits should not cause a full
re-arrangement, as becoming familiar with a new layout places a cognitive load on the
user. This dynamic aspect is not normally considered in graph layout algorithms [Dub06].
Moreover, capturing all relevant visual aesthetics of a given visual notation is nowhere
near straightforward, as their relative weight on diagram understanding may be discovered
only with empirical studies [Dub06, p. 5]:</p>
      <p>A followup study reveals a visual aesthetic not previously considered by the
graph drawing community. This new aesthetic, continuity, is the measure of
the angle formed by the incoming and outgoing edges of a vertex. For the task
of finding a shortest path between two vertices, continuity can become even
more important than edge crossings.</p>
      <p>The example reveals that well known visual aesthetics for graph layout overlook
constraints that can be specified declaratively. Geometric constraint solvers are widely used
in CAD tools (feature-based parametric modeling, [HJA05]) and are starting to be adopted
by graphical frameworks for metamodeling [LHG07].
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>The complexity around keeping views in-synch in multiview authoring environments
requires a comprehensive solution. As shown in this paper, one such solution relies on
metamodeling, well-behaved bidirectional transformations, and geometric constraint solvers.
Current EMOF infrastructures have paved the way for functional extensions, such as
bidirectionalization (which requires moderate integration effort) and geometric constraint
solving (which is only now starting to be considered part of metamodeling [LHG07]).
Existing tools for general-purpose modeling have been developed following a traditional
(non-declarative) MVC architecture, and are not expected to migrate overnight to a new
paradigm. Instead, the primary candidates to benefit from Declarative MVC are
DomainSpecific Modeling Languages (DSMLs). More generally, we argue that applying to DSMLs
the same (metamodel-based) definition techniques as for UML 1.x will impair their
adoption, as such techniques overlook the connection between concrete and abstract syntax,
do not handle multiview synchronization, and lack precise semantics for
backpropagating updates from non-injective views. The techniques brought together in this paper
address those weaknesses identified in previous efforts around the definition and tooling of
DSMLs.</p>
      <p>) t
(A rca</p>
      <p>w</p>
      <p>B e
B a
r
t
s rce nd
a
I
U
d
» es
w a
e b
i«V -s
m
r
o
F
t
n
e
m
u
» co
w D
ie t
«V rah
c
e
t
a
t</p>
      <p>S
m
a
r
g
a
» i
iew trD
V a
« h
c
e
t
a
t
S
)
e e ts
itv g s
a
t
n e
a u
n h q
te c re
(
s
d
) n
d a
te m
t
i m
m o</p>
      <p>c
m
o te
(c a
d
p
u
«M asb
F
O
M</p>
      <p>E
l» ee
e r
d T
o x
«M tan
)
t
u
o
y
a
l
t
x
e
t
(
y
S
e
t
e
r
c
n
o
C
m
l» e
e r
d a
o w
«M t-a
u
l
e
d
o
o
y
a
L
w
e
iv on</p>
      <p>i
re it</p>
      <p>n
co if
E de
w
T
w
e
iv on</p>
      <p>i
re it</p>
      <p>n
co if
E de
w
T
w
e
i n
v o</p>
      <p>i
re it</p>
      <p>n
co if
E de
w
T</p>
      <p>d
D n</p>
      <p>a
w ,
e ]
i 5
iv 0
t o
l r
u P</p>
      <p>[
M</p>
      <p>x
a a
ro tny
f s
e l
r a
u u
t t
c x
e e
ti t
h ,
c m
r</p>
      <p>a
A r</p>
      <p>g
e a
r i
a d
tw :
f s</p>
      <p>w
o
S ie
: v
3 f
e o
r s
t
n
I
[ABK07]
[AFP03]
[BMS07]
[CW07]
[DPKS05]
[Dub06]
[Egy06]
[Erw01]
[EWH07]</p>
      <p>Anastasakis, K, Bordbarand, B, and Ku¨ster, J. M. Analysis of Model
Transformations via Alloy. In Faivre, B. B. A, Ghosh, S, and Pretschner, A, editors, 4th
MoDeVVa workshop Model-Driven Engineering, Verification and Validation, pages 47–56,
In conjunction with MoDELS07, Nashville, TN, USA, 2007.</p>
      <p>Ali, M. A, Fernandes, A. A. A, and Paton, N. W. MOVIE: an incremental maintenance
system for materialized object views. Data Knowl. Eng., 47(2):131–166, 2003.</p>
      <p>Brabrand, C, Møller, A, and Schwartzbach, M. I. Dual Syntax for XML Languages.
Information Systems, 2007. Earlier version in Proc. 10th International Workshop on
Database Programming Languages, DBPL ’05, Springer LNCS vol. 3774. pp. 27-41.
Correa, A and Werner, C. Refactoring Object Constraint Language Specifications.
Software and Systems Modeling, 6:113–138, 2007.</p>
      <p>
        Duboisset, M, Pinet, F, Kang, M.-A, and Schneider, M. Precise Modeling and
Verification of Topological Integrity Constraints in Spatial Databases: From an Expressive
Power Study to Code Generation Principles. In Delcambre, L. M. L, Kop, C, Mayr,
H. C, Mylopoulos, J, and Pastor, O, editors, ER, volume 3716 of LNCS, pages 465–482.
        <xref ref-type="bibr" rid="ref16">Springer, 2005</xref>
        . http://www.isima.fr/˜kang/pinet/ER_paper.pdf.
Dube´, D. Graph Layout for Domain-Specific Modeling. Master’s thesis, School of
Computer Science, McGill University, Montreal, Canada, 2006. http://moncs.
cs.mcgill.ca/people/denis/files/thesis_HREF.pdf.
      </p>
      <p>Egyed, A. Instant consistency checking for the UML. In ICSE ’06: Proceeding of the
28th International Conference on Software Engineering, pages 381–390, New York,
NY, USA, 2006. ACM.
[GGL05]
[GM07]
[HJA05]</p>
      <p>
        Grunske, L, Geiger, L, and Lawley, M. A Graphical Specification of Model
Transformations with Triple Graph Grammars. In Hartman, A and Kreische, D, editors,
ECMDA-FA, volume 3748 of LNCS, pages 284–298.
        <xref ref-type="bibr" rid="ref16">Springer, 2005</xref>
        .
[SBP07]
[Ste07]
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Erwig</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <article-title>Inductive graphs and functional graph algorithms</article-title>
          .
          <source>J. Funct. Program.</source>
          ,
          <volume>11</volume>
          (
          <issue>5</issue>
          ):
          <fpage>467</fpage>
          -
          <lpage>492</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Erche</surname>
            ,
            <given-names>M</given-names>
          </string-name>
          , Wagner,
          <string-name>
            <surname>M,</surname>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Hein</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <article-title>Mapping visual notations to MOF compliant models with QVT relations</article-title>
          .
          <source>In SAC '07: Proceedings of the 2007 ACM symposium on Applied computing</source>
          , pages
          <fpage>1037</fpage>
          -
          <lpage>1038</lpage>
          , New York, NY, USA,
          <year>2007</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [FGM+07]
          <string-name>
            <surname>Foster</surname>
            ,
            <given-names>J. N</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Greenwald</surname>
          </string-name>
          , M. B,
          <string-name>
            <surname>Moore</surname>
            ,
            <given-names>J. T</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pierce</surname>
            ,
            <given-names>B. C,</given-names>
          </string-name>
          and
          <string-name>
            <surname>Schmitt</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <article-title>Combinators for bidirectional tree transformations: A linguistic approach to the view-update problem</article-title>
          .
          <source>ACM Trans. Program. Lang. Syst.</source>
          ,
          <volume>29</volume>
          (
          <issue>3</issue>
          ):
          <fpage>17</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Garcia</surname>
            , M and Mo¨ller,
            <given-names>R.</given-names>
          </string-name>
          <article-title>Certification of Transformation Algorithms in ModelDriven Software Development</article-title>
          . In Bleek, W.-G, Ra¨sch, J, and Zu¨llighoven, H, editors,
          <source>Software Engineering</source>
          <year>2007</year>
          , volume
          <volume>105</volume>
          of
          <string-name>
            <surname>GI-Edition</surname>
            <given-names>LNI</given-names>
          </string-name>
          , pages
          <fpage>107</fpage>
          -
          <lpage>118</lpage>
          ,
          <year>2007</year>
          . http://www.sts.tu-harburg.de/˜mi.garcia/pubs/2007/ se2007/GarciaMoeller.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Hoffmann</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <article-title>M</article-title>
          and
          <string-name>
            <surname>Joan-Arinyo</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <article-title>A Brief on Constraint Solving</article-title>
          .
          <source>Unabridged; abridged version in CAD&amp;A</source>
          ,
          <year>2005</year>
          . http://www.cs.purdue.edu/homes/ cmh/distribution/papers/Constraints/ThailandFull.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [HLM+06]
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>Z</given-names>
          </string-name>
          , Liu,
          <string-name>
            <surname>D</surname>
          </string-name>
          , Mei,
          <string-name>
            <surname>H</surname>
          </string-name>
          , Takeichi,
          <string-name>
            <surname>M</surname>
          </string-name>
          , Xiong,
          <string-name>
            <given-names>Y</given-names>
            , and
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <article-title>A Compositional Approach to Bidirectional Model Transformation</article-title>
          .
          <source>Technical Report METR</source>
          <year>2006</year>
          -
          <volume>54</volume>
          , The University of Tokyo, Bunkyo-Ku, Tokyo,
          <year>Oct 2006</year>
          . http://www.keisu.t.u-tokyo.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>ac.jp/research/techrep/data/2006/METR06-54.pdf.</mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <source>[KL05] [KS06] [Lei06] [LHG07] [LHT07a]</source>
          <string-name>
            <surname>Kiselyov</surname>
            ,
            <given-names>O</given-names>
          </string-name>
          and La¨mmel,
          <string-name>
            <surname>R.</surname>
          </string-name>
          <article-title>Haskell's overlooked object system</article-title>
          .
          <source>Draft; Submitted for publication; online since 30 Sep. 2004; Full version released 10 September</source>
          <year>2005</year>
          , http://homepages.cwi.nl/˜ralf/OOHaskell/paper.pdf,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>Ko¨nigs, A and Schu¨rr, A. MDI - a Rule-Based Multi-Document and Tool Integration Approach</article-title>
          .
          <source>Journal of Software &amp; System Modeling</source>
          ,
          <volume>5</volume>
          (
          <issue>4</issue>
          ):
          <fpage>349</fpage>
          -
          <lpage>368</lpage>
          ,
          <year>December 2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <string-name>
            <surname>Leitner</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <article-title>Verifikation von Modelltransformationen basierend auf Triple Graph Grammatiken</article-title>
          ,
          <year>March 2006</year>
          . Diplomarbeit. TU-Berlin und Universita¨
          <source>t Karlsruhe (TH).</source>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>N</given-names>
          </string-name>
          , Hosking,
          <string-name>
            <given-names>J. G</given-names>
            , and
            <surname>Grundy</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. C.</surname>
          </string-name>
          <article-title>MaramaTatau: Extending a Domain Specific Visual Language Meta Tool with a Declarative Constraint Mechanism</article-title>
          .
          <source>In VL/HCC</source>
          , pages
          <fpage>95</fpage>
          -
          <lpage>103</lpage>
          . IEEE Computer Society,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>D</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>Z</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Takeichi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <article-title>Bidirectional interpretation of XQuery</article-title>
          . In PEPM '
          <volume>07</volume>
          , pages
          <fpage>21</fpage>
          -
          <lpage>30</lpage>
          , New York, NY, USA,
          <year>2007</year>
          . ACM. http://www.ipl.t.u-tokyo.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>ac.jp/˜liu/PEPM2007.pdf.</mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [LHT+07b]
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>D</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>Z</given-names>
          </string-name>
          , Takeichi,
          <string-name>
            <surname>M</surname>
          </string-name>
          , Kakehi,
          <string-name>
            <given-names>K</given-names>
            , and
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <surname>H.</surname>
          </string-name>
          <article-title>A Java Library for Bidirectional XML Transformation</article-title>
          . JSSST Computer Software,
          <volume>24</volume>
          (
          <issue>2</issue>
          ):
          <fpage>164</fpage>
          -
          <lpage>177</lpage>
          , May
          <year>2007</year>
          . http: //www.ipl.t.u-tokyo.ac.jp/˜hu/pub/jssst-cs06-liu.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Markovic´</surname>
          </string-name>
          , S and Baar,
          <source>T. Proc of the 8th Intnl Conf MoDELS</source>
          <year>2005</year>
          , volume
          <volume>3713</volume>
          <source>of LNCS, chapter Refactoring OCL Annotated UML Class Diagrams</source>
          , pages
          <fpage>280</fpage>
          -
          <lpage>294</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          Springer Verlag,
          <year>October 2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <surname>Marriott</surname>
            ,
            <given-names>K</given-names>
          </string-name>
          and Chok,
          <string-name>
            <surname>S. S.</surname>
          </string-name>
          <article-title>QOCA: A Constraint Solving Toolkit for Interactive Graphical Applications</article-title>
          . Constraints,
          <volume>7</volume>
          (
          <issue>3</issue>
          -4):
          <fpage>229</fpage>
          -
          <lpage>254</lpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          <source>[MB05] [MC02] [Pie06] [Pro05] [XLH</source>
          +07]
          <string-name>
            <surname>Xion</surname>
            ,
            <given-names>Y</given-names>
          </string-name>
          , Liu,
          <string-name>
            <given-names>D</given-names>
            ,
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z</given-names>
            ,
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <surname>H</surname>
          </string-name>
          , Takeichi,
          <string-name>
            <surname>M,</surname>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Mei</surname>
          </string-name>
          ,
          <source>H. Towards Automatic Model Synchronization from Model Transformations. 22nd IEEE/ACM International Conference on Automated Software Engineering</source>
          , pages
          <fpage>164</fpage>
          -
          <lpage>173</lpage>
          ,
          <year>November 2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>http://www.ipl.t.u-tokyo.ac.jp/˜xiong/papers/ASE07.pdf.</mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [MHN+07]
          <string-name>
            <surname>Matsuda</surname>
            ,
            <given-names>K</given-names>
          </string-name>
          , Hu,
          <string-name>
            <surname>Z</surname>
          </string-name>
          , Nakano,
          <string-name>
            <surname>K</surname>
          </string-name>
          , Hamana,
          <string-name>
            <surname>M,</surname>
          </string-name>
          <article-title>and</article-title>
          <string-name>
            <surname>Takeichi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <article-title>Bidirectionalization transformation based on automatic derivation of view complement functions</article-title>
          . In Hinze, R and Ramsey, N, editors,
          <source>ICFP</source>
          , pages
          <fpage>47</fpage>
          -
          <lpage>58</lpage>
          . ACM,
          <year>2007</year>
          . http://www.ipl.
          <source>t.</source>
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>u-tokyo.ac.jp/˜hu/pub/icfp07.pdf.</mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          <string-name>
            <surname>Pierce</surname>
            ,
            <given-names>B. C.</given-names>
          </string-name>
          <article-title>The Weird World of Bi-Directional Programming</article-title>
          .
          <source>Invited talk at ETAPS</source>
          ,
          <year>2006</year>
          . http://www.cis.upenn.edu/˜bcpierce/papers/ lenses-etapsslides.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          <string-name>
            <surname>Prochnow</surname>
            ,
            <given-names>S. H.</given-names>
          </string-name>
          <article-title>KIEL: Textual and Graphical Representations of Statecharts</article-title>
          . http://rtsys.informatik.uni-kiel.de/˜rt-kiel/kiel/ documents/talks/oberseminar-0511-spr/talk.pdf,
          <year>Nov 2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          <string-name>
            <surname>Sen</surname>
            ,
            <given-names>S</given-names>
          </string-name>
          , Baudry,
          <string-name>
            <given-names>B</given-names>
            , and
            <surname>Precup</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>Partial Model Completion in Model Driven Engineering using Constraint Logic Programming</article-title>
          .
          <source>In INAP'07 (International Conference on Applications of Declarative Programming and Knowledge Management)</source>
          ,
          <source>Wu¨rzburg, Germany</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          <string-name>
            <surname>Stevens</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <article-title>Bidirectional Model Transformations in QVT: Semantic Issues and Open Questions</article-title>
          . In MoDELS, volume
          <volume>4735</volume>
          <source>of LNCS</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>15</lpage>
          . Springer,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>