research paper groundtram: an integrated framework for ... · 1 introduction bidirectional model...

18
Special issue: Advanced Programming Techniques for Construction of Robust, General and Evolutionary Programs Progress in Informatics, No.10, pp.131–148, (2013) 131 Research Paper GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 1 Soichiro HIDAKA 1 , Zhenjiang HU 2 , Kazuhiro INABA 3 , Hiroyuki KATO 4 and Keisuke NAKANO 5 1,2,4 National Institute of Informatics 3 National Institute of Informatics 2 5 University of Electro-Communications ABSTRACT Bidirectional model transformation is useful for maintaining consistency between two mod- els, and has many potential applications in software development including model synchro- nization, round-trip engineering, and software evolution. Despite these attractive uses, the lack of a practical tool supporting for systematic development prevents it from being widely used. In this paper, we solve this problem by proposing an integrated framework called GRoundTram (Graph Roundtrip Transformation for Models), which is carefully designed and implemented for compositional development of well-behaved and efficient bidirectional model transformations. GRoundTram is built upon a well-founded bidirectional framework and is equipped with a user-friendly language for coding bidirectional model transforma- tions, a novel tool for validating both models and transformations, an optimization mech- anism for improving efficiency, and a powerful debugging environment for testing bidirec- tional behavior. GRoundTram has been used by other reseach groups besides ourselves and their results show its usefulness in practice. KEYWORDS Model-driven development, bidirectional transformation, model transformation, graph transforma- tion 1 Introduction Bidirectional model transformation [6], [12], [14], [44], [45] is an enhancement of model transforma- tion with bidirectional capability, and is an important requirement in Object Management Group (OMG)’s Queries/Views/Transformations (QVT) standard for defining model transformation languages. It describes not only a forward transformation from a source model to a target model, but also a backward transformation showing how to reflect the changes in the target model Received April 13, 2012; Revised September 30, 2012; Accepted December 10, 2012. 1 This paper is an extended version of the conference short paper [30] presented in ASE’11. 2 Current affiliation is Google. 1) [email protected], 2) [email protected], 3) [email protected], 4) [email protected], 5) [email protected] in the source model so that consistency between them is maintained. Bidirectional model transformation has many potential applications in software develop- ment, including model synchronization [6], [21], [50], round-trip engineering [5], software evolution [38], and multiple-view software development[19], [22]. Unlike (unidirectional) model transformation where lots of tools have been developed for supporting de- sign, validation, and test of model transformation, bidi- rectional model transformation lacks such useful tools, and that prevents it from being widely used. In fact, we have new requirements and challenges in the context of bidirectional model transformation. Most importantly, we should be sure that a bidi- rectional model transformation behaves exactly as we want. Such a transformation has more complicated be- DOI: 10.2201/NiiPi.2013.10.7 c 2013 National Institute of Informatics

Upload: others

Post on 05-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

Special issue: Advanced Programming Techniques for Construction of Robust, General and Evolutionary Programs

Progress in Informatics, No. 10, pp.131–148, (2013) 131

Research Paper

GRoundTram: An integrated framework fordeveloping well-behaved bidirectional modeltransformations∗1

Soichiro HIDAKA1, Zhenjiang HU2, Kazuhiro INABA3, Hiroyuki KATO4 andKeisuke NAKANO5

1,2,4National Institute of Informatics3National Institute of Informatics∗25University of Electro-Communications

ABSTRACTBidirectional model transformation is useful for maintaining consistency between two mod-els, and has many potential applications in software development including model synchro-nization, round-trip engineering, and software evolution. Despite these attractive uses, thelack of a practical tool supporting for systematic development prevents it from being widelyused. In this paper, we solve this problem by proposing an integrated framework calledGRoundTram (Graph Roundtrip Transformation for Models), which is carefully designedand implemented for compositional development of well-behaved and efficient bidirectionalmodel transformations. GRoundTram is built upon a well-founded bidirectional frameworkand is equipped with a user-friendly language for coding bidirectional model transforma-tions, a novel tool for validating both models and transformations, an optimization mech-anism for improving efficiency, and a powerful debugging environment for testing bidirec-tional behavior. GRoundTram has been used by other reseach groups besides ourselves andtheir results show its usefulness in practice.

KEYWORDSModel-driven development, bidirectional transformation, model transformation, graph transforma-tion

1 IntroductionBidirectional model transformation [6], [12], [14],

[44], [45] is an enhancement of model transforma-tion with bidirectional capability, and is an importantrequirement in Object Management Group (OMG)’sQueries/Views/Transformations (QVT) standard fordefining model transformation languages. It describesnot only a forward transformation from a source modelto a target model, but also a backward transformationshowing how to reflect the changes in the target model

Received April 13, 2012; Revised September 30, 2012; Accepted December10, 2012.∗1This paper is an extended version of the conference short paper [30] presentedin ASE’11.∗2Current affiliation is Google.1) [email protected], 2) [email protected], 3) [email protected], 4) [email protected],5) [email protected]

in the source model so that consistency between themis maintained. Bidirectional model transformationhas many potential applications in software develop-ment, including model synchronization [6], [21], [50],round-trip engineering [5], software evolution [38], andmultiple-view software development [19], [22].

Unlike (unidirectional) model transformation wherelots of tools have been developed for supporting de-sign, validation, and test of model transformation, bidi-rectional model transformation lacks such useful tools,and that prevents it from being widely used. In fact, wehave new requirements and challenges in the context ofbidirectional model transformation.

Most importantly, we should be sure that a bidi-rectional model transformation behaves exactly as wewant. Such a transformation has more complicated be-

DOI: 10.2201/NiiPi.2013.10.7

c©2013 National Institute of Informatics

Page 2: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

132 Progress in Informatics, No. 10, pp.131–148, (2013)

havior than a unidirectional one. It should be well-behaved in the sense that both the forward and back-ward transformations are consistent with each otherand have the roundtrip property [12]. As argued in [43]though, there are semantic issues with many of the ex-isting tools.

Next, bidirectional model transformations should becompositional so that they can reuse existing trans-formations and bigger ones can be constructed fromsmaller ones. As indicated in the conclusion of [15],most model transformation languages based on graphtransformations are rule-based, describing direct rela-tionships between the source and target models. Theyare not compositional in the sense that we cannot in-troduce intermediate models for gluing together modeltransformations. Therefore, rule-based techniques can-not easily support systematic development of modeltransformations in the large [36]. However, composi-tion comes at the cost of efficiency; many unnecessaryintermediate models might be produced. Therefore, anoptimization method is required to automatically elim-inate unnecessary intermediate models during execu-tion.

Furthermore, a bidirectional model transformationshould be general enough because it is to be used atvarious stages of the software development life cycle.It should be able to be applied to different models suchas UML diagrams, sequence diagrams, Petri-nets, andeven lower level control/data flow graphs. While visualframeworks are useful in high-level design, generaltext-based languages play an important role in develop-ing large-scale transformations, say, to deal with lowerlevel mappings or complex code refactoring. Moreover,we would expect to have a set of language-based toolsfor type checking (validating) both models and bidirec-tional model transformations to remove errors beforeexecution, an efficient execution model, and a tool fortesting/debugging bidirectional behavior. Apart from arecent attempt in [49] that embed lens [18] as a DSL inScala, which benefits from the type system in the hostlanguage, as far as we are aware, no such language-based modeling environments have been proposed forbidirectional model transformation.

In this paper, we remedy this situation by proposinga language-based modeling framework called GRound-Tram (Graph Roundtrip Transformation for Models),which is carefully designed and implemented forcompositional development of well-behaved and ef-ficient bidirectional model transformation at the var-ious stages of software development. Our workis inspired by recent research on bidirectional lan-guages (with well-behavedness) and automatic bidi-rectionalization in the programming language com-munity [9], [18], [32], [39]. In particular, it has been

recently shown [27] that a graph query algebra Un-CAL (Unstructured CALculus) [10], which consists ofcarefully designed graph constructors, conditional andstructural recursion operators, can be fully bidirection-alized. Each graph transformation in UnCAL has clearbidirectional semantics and is guaranteed to be well-behaved.

This paper is about a successful application of a bidi-rectional graph query algebra in the programming com-munity to the construction of a framework for develop-ing bidirectional model transformations in the softwareengineering community. Our main technical contribu-tions are summarized as follows.

Well-behavedness. We propose a novel bidirectionalgraph contraction algorithm so that we can build well-behaved bidirectional model transformations upon thewell-founded bidirectional UnCAL algebra. In fact,there is a gap between UnCAL graphs and the modelsused in model transformation: graphs in UnCAL areedge-labeled and their equivalence is defined by bisim-ilarity, while models in model transformation may havelabels on both edges and nodes and their equivalence isdefined by unique identifiers. We close this gap so thatevery UnCAL graph has a bidirectional correspondencewith a model.

Compositional. We design a user-friendly languageUnQL+, which is the first purely functional languagefor developing large bidirectional model transforma-tions in a compositional way. UnQL+ is an extensionof the graph query language UnQL [10] with new ad-ditional language constructs for graph transformation.We show that any UnQL+ program can be correctlytranslated into an UnCAL construct and inefficiencydue to intermediate models in the composition can beautomatically eliminated.

Language-based IDE. We implement an integrateddevelopment environment GRoundTram, which has anovel tool for validating both models and bidirec-tional model transformations, an automatic optimiza-tion mechanism for improving efficiency, and a power-ful debugging environment for testing bidirectional be-havior. The system (including sources, documents, andmany application examples) is available online [2], andbeing used by research groups besides ourselves for de-veloping some nontrivial applications. Their successesindicate the usefulness of GRoundTram in practice.

This paper is an enhancement of the emerging ideaof our previous work that was presented in a short pa-per [26]. Moreover, in relation to the bidirectionaliza-tion presented in [27], a bidirectional contraction stagehas been added after stage 2 (epsilon edge and un-

Page 3: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 133

Bidirectional Transformation

Source Model (DOT/UnCAL)

Source Schema (KM3)

Model Validation

Forward Transformation

Transformation(UnQL+)

Target Schema (KM3)

Model TransformationValidation

Verified Transformation

Target Model(DOT)

Graph Update

Updated Target Model(DOT)

Backward Transformation

Updated Source Model (DOT)

Graph Update

Source Model(DOT)

Fig. 1 Overview of GRoundTram.

Fig. 2 Snapshot of GRoundTram.

reachable part elimination stage) of the previous work.With respect to the surface syntax extension presentedin [25], the present paper can deal with regular path ex-pressions and treat multiple graph databases. We havealso added a proof of correctness of a translation to aninternal graph algebra and have integrated the verifica-tion framework presented in [33] into ours.

The rest of the paper is organized as follows. Webegin by demonstrating how the GRoundTram systemworks in Section 2. We then briefly review the Un-CAL bidirectional framework on which GRoundTramis based in Section 3. After explaining the design archi-tecture of the GRoundTram system, we show in detailthe definition of UnQL+, the bidirectional graph con-traction algorithm, and the translation from UnQL+ toUnCAL in Section 4. We evaluate the system in Section5, discuss the related work in Section 6, and concludethe paper in Section 7.

2 Overview of GRoundTramBefore proceeding with the technical details, let us

overview the GRoundTram system to give the readeran idea of what it can do. Figure 1 shows the basic

Fig. 3 A class diagram.

57 54

56

String65

53

Class51

src_of50

46

Class47

49

String61

Class44

src_of43

Class

68 42

67

String33

41

Boolean27

Attribute64 39

63

String32

38

Boolean23

Attribute60 36

59

String31

35

Boolean19

Attribute

30 8

29

String26

7

Boolean5

25

String18

4

Boolean16

PrimitiveDataType22 17

21

String2

12

PrimitiveDataType1

Boolean

0

true3

true6

true

10

9

"Integer"

11

String

name

14

13

"String"

15

String

name

nametype is_primary

20

"number"

name is_primary type

24

"addr"

name is_primary type

28

"name"

34

true37

false40

true

name is_persistent attrs

45

name src Association dest

name is_persistent attrs48

"phone"

52

name src Association dest

nameis_persistent attrs55

"address"

58

"Phone"62

"Address"66

"Person"

69

AssociationAssociation

Fig. 4 A class model represented by an edge-labeledgraph.

functions the GRoundTram system provides.

2.1 InputThe input to the system is a source model together

with its schema, a transformation described in UnQL+,and a target model schema. The target model is pro-duced by the forward transformation.

Model. Models are represented by general edge-labeled graphs, which form a general representationof various models. As a running example, considerthe class model diagram in Figure 3, which is takenfrom [15]. It consists of three classes and two directedassociations, and each class has a primary attribute∗3.This model can be represented by the graph in Figure 4,where the information has been moved to the edges.The graph is in the standard DOT format which can be∗3 For this particular example, the diagram could be further simplified by us-ing simple labeled references instead of model elements for phone number, forexample, and nothing prevents us from doing so. However, we believe this ex-ample helps us demonstrate the expressiveness of transformations in GRound-Tram.

Page 4: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

134 Progress in Informatics, No. 10, pp.131–148, (2013)

visualized and edited by the popular Graphviz tool [16].

Model schema (metamodel). Each model has a struc-ture. For instance, a class diagram has the followingstructure. A class diagram consists of classes and di-rected associations between classes. A class is indi-cated as persistent or non-persistent. It consists of oneor more attributes, at least one of which must be markedas constituting the classes’ primary key. An attributetype is of a primitive data type (e.g. String, Integer). Anassociation associates classes and is represented hereusing a model element. KM3 [35] is used to describesuch a model structure [25], and its definition can befound in [2]. We currently do not support complex OCLconstraints in the schema.

Model transformation. (Forward) Model transforma-tion is described compositionally in UnQL+ (Section4.1), a SQL-like graph query/transformation language.As an example, consider extracting all persistent classesfrom the class model $db, and transforming them intotables by replacing Attributes with Columns. This canbe described compositionally as follows, using the in-termediate model $persistentClass.

select {tables : $table} where$persistentClass in

(* select classes *)(select $class where{Association.(src|dest).Class : $class} in $db,{is persistent : {Boolean : true}} in $class),

$table in(* replace Attribute *)(replace attrs→ $g

by (select {Column : $a} where{attrs.Attribute:$a} in $persistentClass)

in $persistentClass)

2.2 ValidationIn order to detect errors during development as early

as possible and help users to develop correct modelsand transformations, GRoundTram provides two vali-dation mechanisms.

Model validation. The system can verify the confor-mance of the source and the target model to their asso-ciated schemata. In particular, after editing the models,it is important to check that they are in valid states.

Model transformation validation. Correct modeltransformations should always generate a target modelconforming to the target schema from any source modelsatisfying the source schema.

While the model validation is standard, a generalmodel transformation validation is more challenging

but more useful for ensuring correct model transforma-tions. As an instance of simple erroneous transforma-tion, suppose the user made an error writing select $ainstead of select {Column : $a} in the previous exam-ple. Its outputs do not conform to the schema and hencean error is reported by the system. The check is au-tomatic and static. Users neither have to provide anytest cases by hand, nor execute the transformation fortesting; the system automatically finds and displays anexample of a source model that reveals the problem (inthis case, a class model containing at least one persis-tent class).

2.3 Bidirectional transformationThe GRoundTram system is unique in its execution

of well-behaved bidirectional transformations, as seenin the lower part of Figure 1.

Forward transformation. After the user specified thesource model and the UnQL+ model transformation,the target model is computed by running the transfor-mation with the source model set to the variable $db.Like the source model, the target model can also be ex-ported and be edited in the standard DOT format.

Backward transformation. The most distinct fea-ture of GRoundTram is the automatic derivation ofbackward transformations that appropriately propagatemodifications on the target models to the source mod-els. There is no need to maintain two separate trans-formations or to worry about their consistency. Usersjust write a forward transformation from one model toanother in a compositional way, and a correspondingbackward transformation is automatically derived.

2.4 Graphical user interfaceThe GRoundTram system combines all its functions

as an integrated framework with a user-friendly GUI(Figure 2). The user loads a source graph (displayed inthe left pane) and a bidirectional transformation writtenin UnQL+. Once they are loaded, the forward trans-formation can be conducted by pushing the “forward”button (right arrow icon). The target graph appearson the right pane. The user can graphically edit thetarget graph and apply a backward transformation bypushing the “backward” button (left arrow icon). Thesource graph can be edited as well, of course. The usercan optionally specify the source schema and the targetschema and can run the validation by pushing the checkbutton on both panes. The transformation itself can alsobe checked.

For ease of debugging/understanding the behaviorof the bidirectional computation between two models,trace information is instantly displayed between thesource and target (red part in Figure 2). If subgraphs

Page 5: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 135

on either pane are selected, corresponding subgraphson the other pane are also highlighted. This helps usersto understand how a modification on the target affectsthat on the source, and vice versa.

3 Background: Bidirectional UnCALThe GRoundTram system is built upon our recent

work [27] on bidirectionalization of UnCAL, a graphalgebra known in the database community for graphquerying [10]. It has been shown that any unidirec-tional graph transformation written in UnCAL can befully bidirectionalized with a backward transformationsuch that both forward and backward transformationsare consistent and well-behaved. We briefly explain thebasic results that will be used in this paper.

3.1 Graph data modelGraphs in UnCAL are rooted and directed cyclic

graphs with no order between outgoing edges. They areedge-labeled in the sense that all information is storedas labels on edges and labels on nodes serve as uniqueidentifiers and have no particular meaning. Figure 5(a)gives a small example of a directed cyclic graph withsix nodes and seven edges. In text, it is represented by

g = {a : {a : g1}, b : {a : g1}, c : g2}g1 = {d : {}}g2 = {c : g2}

where the notation {l1 : g1, . . . , ln : gn} denotes a setrepresenting a graph which contains n edges with la-bels l1, . . . , ln, each edge pointing to a graph gi, and theempty set {} denotes a graph with a single node. Twographs g1 and g2 can be merged using the set union op-eration g1 ∪ g2. In addition, the ε-edge is allowed torepresent a shortcut between two nodes, and works likethe ε-transition used in automata.

Two graphs in UnCAL are considered to be equal ifthey are bisimilar. An intuitive understanding of bisim-ilarity is that unfolding of cycles and duplication ofequivalent subgraphs do not affect the equivalence of

1

2

a

3

b

4

c

5

a

a

c

6

d

(a) A simple graph

0

1

2

a

3

b

4

c

51

a

61

52

a

62

41

c

42

c

d

d

c

(b) An equivalent graph

Fig. 5 Graph equivalence based on bisimulation.

graphs, and unreachable parts from the root are ignored.For instance, the graph in Figure 5(b) is equivalent tothe graph in Figure 5(a); the new graph has an addi-tional ε-edge (denoted by the dotted line), duplicatesthe graph rooted at node 5, and unfolds and splits thecycle at node 4.

It is worth noting that bisimilarity plays an im-portant role in bidirectionalization [27], query opti-mization [10], and verification of graph transforma-tions [33]. However, bisimilarity is different fromthe usual equivalence of models whose elements haveunique identifiers. We will show how to bridge this gapin Section 4.2.

3.2 UnCALThe most important feature of UnCAL is that any

graph transformation in UnCAL is described by struc-tural recursions or their composition.

A structural recursive function f in UnCAL is a re-cursive computation scheme on graphs defined by

f ({}) = {}f ({l : g}) = (l, g) � f (g)f (g1 ∪ g2) = f (g1) ∪ f (g2)

where � is a given binary operator. Different choices of� define different recursive functions. For simplicity,the definition above is abbreviated to

sfun f ({l : g}) = (l, g) � f (g).

Note that even for a graph g having cycles, the com-putation of f (g) always terminates under the usual re-cursive semantics, where all recursive calls are memo-ized and their results are reused to avoid entering infi-nite loops.

As a simple example, we may use the following re-cursive function a2d xc to replace all edges labeled aby d and skip all edges labeled c for the graph in Fig-ure 5(a).

sfun a2d xc ({l : g}) = if l = a then {d : a2d xc(g)}else if l = c then a2d xc(g)else {l : a2d xc(g)}

We can naturally extend the structural recursionabove so that it allows mutual recursion. Any numberof mutually recursive functions can be merged into oneby using the standard tupling method [31].

3.3 Bidirectional semantics of UnCALA query in UnCAL is usually run in the forward di-

rection: under an environment (a mapping from vari-ables to graphs) ρ, a query Q generates a result graphdenoted by F [[Q]]ρ.

Let g = F [[Q]]ρ be a result graph. Assume that auser has edited it into g′. For example, one may add

Page 6: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

136 Progress in Informatics, No. 10, pp.131–148, (2013)

a new subgraph, modify some labels, or delete severaledges. In our previous study [27], we gave backwardsemantics that properly reflect back the editing to theoriginal inputs. Formally speaking, given the modifiedresult graph g′ and the original input environment ρ,we presented a method that computes the modified en-vironment ρ′ = B[[Q]](ρ, g′).

By “properly reflecting back” (or well-behaved), wemean the following two properties hold:

F [[Q]]ρ = gB[[Q]](ρ, g) = ρ

(GETPUT)

B[[Q]](ρ, g′) = ρ′

B[[Q]](ρ,F [[Q]]ρ′) = ρ′(WPUTGET)

The (GETPUT) property says that if no change is madeto the output g, there should be no change in the in-put environment. The (WPUTGET) property is an un-restricted version of the (PUTGET) property that ap-peared in [17], which requires g′ ∈ Range(F [[Q]]) andB[[Q]](ρ, g′) = ρ′ to imply F [[Q]]ρ′ = g′. The (PUT-GET) property states that if a result graph is modified tog′, which is in the range of the forward evaluation, thismodification can be reflected in the source such that aforward evaluation will produce the same result g′. Incontrast, the (WPUTGET) property allows the modi-fied result to be different (this difference is sometimescalled the view side-effect) from the result obtained bya backward evaluation followed by a forward evalua-tion, but requires both results to have the same effecton the original source if the backward evaluation is ap-plied again.

Although the (WPUTGET) property is weaker thanthe (PUTGET) property that forbids view side-effect,this property enables us to make flexible modificationson the result graphs. For example, if the transforma-tion includes a duplication, the target will include twocopies of the same data. If a user, being unaware ofthe duplicates, edits only one of them, then this mod-ification would be forbidden in the (PUTGET) setting,because updating only one of the copy will make theupdated target out of the range of the transformation.Instead, we reflect the updates and the user has a chanceto do another forward transformation to see the updatereflected in another copy in the view.

Even with the flexibility of (WPUTGET) explainedabove, we reject updating of values that come fromtransformation, like label d in a2d xc described ear-lier. Because whatever reflection was made, anotherforward transformation will always produce d again,so the user’s modification in the target would not havebeen preserved.

Note that these properties are true under bisimula-tion equivalence. We additionally need encoding in

order to represent models whose equivalence is basedon isomorphism. In our earlier study in [42], we fillthis gap by encoding identifiers of the model elementswith dedicated edges. In this way, no distinct value-equivalent subgraph encoding different model elementswill be contracted.

We use three different editing reflection mecha-nisms [27] for different editing operations: edge renam-ing, edge deletion, and subgraph insertion. Trace infor-mation is used to reflect edge deletion and determinethe insertion point in the source. Insertion is handledby using a general inversion technique [3] to enumeratethe pairs of the updated target and the correspondingsource. Unspecified edge label (corresponding to de-fault values) in the source should be filled in by users.

Although we have an SQL-like select/replace/delete-where surface syntax (described in section 4.1),bidirectional interpretation of the transformation takesplace at the UnCAL level. Therefore, although wecan encode join operations by using consecutive whereclauses, this join operation is not our unit of bidirec-tionalization (this join operation is translated to nestedstructural recursions which are units of bidirectional-ization), so we can not exploit these high level seman-tics to reflect changes like relational lenses [8]. Diskinet al. [13] pointed out a similar composability issue inthe state-based setting under the context of keys. Wedo not use the concept of a key, so we do not have thisproblem. We do not have a control over update policyusing the notion of key.

Hermann et al. [24] discuss the correctness of thesynchronization algorithm for TGGs. Compared withthis related work, our well-behavedness (correctness)reasoning is only at the graph level of representation.We could have better notion of correctness for usersat model level as in [24]. These related works are im-portant towards our reasoning about correctness in themodel level.

4 Design and implementation ofGRoundTram

Figure 6 depicts the architecture of GRoundTram.We provide a new user-friendly model transformationlanguage UnQL+ that is functional (rather than rule-based as in many existing tools) and compositional withhigh modularity for reuse and maintenance, and the ar-chitecture handles models that are described by edge-labeled graphs that are general enough to express var-ious models. GRoundTram system runs on the power-ful engine of bidirectional UnCAL, which has a set oflanguage-based tools: a bidirectional interpreter [27], agraph and graph transformation verifier [33], an opti-mizer to improve efficiency [28], and a checker of validupdates in the backward transformation [40]. The key

Page 7: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 137

contributions in this implementation are (1) a transla-tion of UnQL+ into UnCAL to enable the engine ofbidirectional UnCAL to execute UnQL+ bidirection-ally, and (2) a bidirectional graph contraction algorithmfor contracting bisimilar UnCAL graphs so that an or-dinary model will have a bidirectional correspondencewith an UnCAL graph.

In the rest of this section, we will focus on the ex-ploration of UnQL+, the bidirectional graph contractionalgorithm, and the translation from UnQL+ to UnCAL.

4.1 Model transformation in UnQL+

UnQL+ is the language the GRoundTram systemprovides for users to describe (bidirectional) modeltransformations. It is an extension of the well-knownUnQL [10], a graph querying language, which is com-positional and can be implemented by FO (TC) (firstorder with transitive closure) with PTIME time com-plexity for graph querying.

Model Transformation in UnQL+

(Compositional and Functional)

Model Transformation in UnQL+

(Compositional and Functional)

UnCAL Graph Algebra

(Structural Recursion)

UnCAL Graph Algebra

(Structural Recursion)

UnQL+ to UnCALTranslation

UnQL+ to UnCALTranslation

Source/Target ModelsSource/Target Models

Bidirectional

Interpreter

Bidirectional

InterpreterOptimizerOptimizer

Transformation

Verifier

Transformation

Verifier

Graph

Verifier

Graph

Verifier

Update

Checker

Update

Checker

Backend Engine for Bidirectional UnCAL

UnCAL GraphsUnCAL Graphs

Bidirectional Graph Contraction

Bidirectional Graph Contraction

Frontend of Bidirectional UnCAL

Fig. 6 GRoundTram implementation on bidirectional Un-CAL engine.

(template) T ::= {L : T, . . . , L : T } | T ∪ T | $g| if BC then T else T| select T where B, . . . , B| replace Rp→ $G by T in T where B, . . . , B| extend Rp→ $G with T in T where B, . . . , B| delete Rp→ $G in T where B, . . . , B| let sfun fname(L : $G) = . . . in fname(T )

(binding) B ::= Gp in $G | BC(condition) BC ::= not BC | BC and BC | BC or BC

| isEmpty($G) | L = L | L � L | L < L | L ≤ L(label) L ::= $l | a(label pattern) Lp ::= $l | Rp(graph pattern) Gp ::= $G | {Lp : Gp, . . . , Lp : Gp}(regular path pattern) Rp ::= a | | Rp.Rp | (Rp|Rp) | Rp? | Rp∗ | Rp+

Fig. 7 Syntax of UnQL+.

Figure 7 gives the core syntax of UnQL+. A graphtransformation is described by a template expression toconstruct a graph from graphs that are bound by graphvariables. The expression {l1 : t1, . . . , ln : tn} creates anew node having n outgoing edges labeled li and point-ing to the root of the graph computed from ti. The uniong1∪g2 constructs a graph with a root sharing the roots ofg1 and g2. The variable expression $g returns the graphthat is bound by $g in the environment (i.e., a mappingfrom variables to graphs). The conditional expressionhas the usual meaning, i.e., choosing different branchaccording to the (binding) condition B.

Like other query languages, UnQL+ has a convenienttemplate expression select t where bs, which is used toselect the subgraphs satisfying the a sequence of condi-tions bs, binds them to variables, and construct a resultaccording to the template expression t. For instance, thefollowing query extracts all persistent classes from theclass model in Figure 4, which is assumed to be boundby $db.

select $class where{Association.(src|dest).Class : $class} in $db,{is persistent : {Boolean : true}} in $class

This query returns all bindings of the variable $classsatisfying the two conditions in the where clause. Thefirst condition is to find bindings of $class by matchingthe regular path pattern Association.(src|dest).Classwith the graph bound by $db, while the second con-dition is to ensure that the class is persistent.

In model transformations, one often wants to replacea subgraph satisfying a certain condition by anothergraph, and it is onerous to describe such transforma-tions using select-where because some context structuremust be copied and propagated. To this end, we intro-duce three new template expressions, namely, replace-

Page 8: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

138 Progress in Informatics, No. 10, pp.131–148, (2013)

where, extend-where, and delete-where.

• The replace-where expression replaces a subgraphwith a new graph. For the following replace-whereexpression,

replace r → $v by e1 in e2 where b1, . . . , bn

the semantics of this expression are that, startingfrom the root node of e2, it traverses every pathand replaces the node $v, which is on each paththat matches r and satisfies b1...bn, by e1. Considerthe class model again, prefixing every name of theclass by “class ” can be done as follows. Note that”ˆ” is a built-in function for string concatenation.

replace ∗ .Class.name.string→ $u

by {(”class ”ˆ$name) : {}} in $db

where {$name : {}} in $u

• The delete-where expression is used to describethe deletion of part of the graph.

For the following delete-where expression,

delete r → $v in e where bs

the semantics of this expression are that, startingfrom the root node of e, it traverses every pathand deletes the node $v, which is on each path thatmatches r and satisfies bs. For instance, we mayeliminate all persistent classes by

delete Association.(src|dest).Class → $c

in $db

where {is persistent.Boolean : true}in $c

where the subgraph matching $c will be deletedfrom its original graph $db.

• The extend-where expression describes the exten-sion of a graph with another graph.

For the following extend-where expression,

extend r → $v with e1 in e2 where bs

the semantics of this expression are that, startingfrom the root node of e2, it traverses every pathand extends the node $v, which is on each path thatmatches r and satisfies bs, with e1. For example,we write the following transformation to add dateinformation to each class.

extend ∗ .class→ $c

with {date : ”2008/8/4”}in $db

These three new template expressions can be auto-matically translated to structural recursions in UnCAL(see Section 4.3).

Unlike most rule-based model transformation lan-guages, where model transformation composition is notstraightforwardly supported [15], UnQL+ is functionaland compositional; smaller model transformations canbe composed to form bigger ones (see Section 2 andSection 5).

4.2 Bidirectional graph contractionAs explained in Section 3, our graph model is based

on bisimulation equivalence, which means bisimilargraphs cannot be distinguished. Moreover, since Un-CAL is based on bisimulation, a transformation may in-troduce redundant nodes that are bisimilar to each other.Therefore, after a transformation such redundancy hasto be eliminated in a normalization phase.

Fortunately, for any set of graphs that are bisimilarto each other, there exists a unique normal form up toisomorphism and we can obtain the normal form af-ter a transformation by using the partition refinementalgorithm of Paige and Tarjan [41]. The algorithm’scomplexity is O(|E| log |V |), where |E| and |V | are thenumbers of edges and nodes, respectively, and we con-sider that this level of complexity would be acceptablein practice. Although this algorithm works on node-labeled graphs, we lift the algorithm to our edge-labeledgraph model by converting edges labeled by l into twounlabeled edges and a node between them labeled by l,as described in [10]. Any bisimilar subgraphs are thencontracted to one subgraph, in which no pairs of nodesare bisimilar to each other. In particular, leaf nodes(nodes that have no outgoing edges) are bisimilar toeach other, so they all shrink to one node.

We carefully design our contraction algorithm sothat it forms a well-behaved bidirectional transforma-tion that has the (GETPUT) and (WPUTGET) proper-ties explained in Section 3.3, in the sense that no mod-ification on the contracted graph results in no mod-ification on the uncontracted graph, while the mod-ified uncontracted graph can be obtained again afterre-uncontracting the graph obtained by contracting themodified uncontracted graph. For example, suppose theset of nodes V1 = {v11 , . . . , v1M } are contracted to v1,and the set of nodes V2 = {v21 , . . . , v2N } are contractedto v2. Further, suppose an edge (v1, l, v2) is inserted inthe contracted graph. As a result, edges labeled l are in-serted between V1 and V2 in the uncontracted graph. IfM > 1 and N > 1, then edges labeled l are inserted onlybetween pairs of nodes that were originally connectedin the uncontracted graph, although all-to-all connec-tions from V1 to V2 are also well-behaved. If no pair ofnodes were originally connected, then the above all-to-

Page 9: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 139

all connection is used.It is worth noting that (WPUTGET) law (instead

of PURGET) here is not caused by the duplicationof forward transformation. Violation of (PUTGET)law occurrs when the modification of the target makesnon-bisimilar nodes bisimilar. For example, sup-pose source graph {a:{b:{}}, a:{c:{}}}. Contraction willproduce {a:{b:{}}, a:{c:{}}}. And suppose the labelc is modified to b in the contracted graph. Thenbackward transformation will produce {a:{b:{}}, {b:{}}}.Next foward transformation (contraction) will produce{a:{b:{}}}, which is not isomorphic to previous target{a:{b:{}}, {b:{}}}, although they are bisimilar. Since con-traction transforms bisimilar graphs to its normal formup to isomorphism, the non-isomorphic targets shouldbe considered different, so only (WPUTGET) law issatisfied.

4.3 Translating UnQL+ to UnCALUnQL+ is different from UnCAL in that it uses four

important template expressions, namely select, replace,extend, and delete, to describe graph transformationsrather than using structural recursion. In this section,we show that all these template expressions can betranslated into structural recursions in UnCAL.

The select expression, which is inherited fromUnQL, can be translated into structural recursion in[10] (the explanation is omitted). According to the se-mantics described in Section 4.1, the delete and extendexpressions can be defined in terms of the replace ex-pression as:

delete Rp→ $v in e1 where bs⇒ replace Rp→ $v by {} in e1 where bs

extend Rp→ $v with e1 in e2 where bs⇒ replace Rp→ $v by $v ∪ e1 in e2

where bs

Therefore, what we need to show is how the replaceexpression is translated into a structural recursion.

Our idea for this translation is to use structural recur-sion to simulate the behavior of a deterministic finiteautomaton (DFA) for finding the nodes in the graphwhere the replace operation is to be applied. For theselect expression in UnQL, NFA is used to define thestructural recursion for finding the nodes in graph to beselected [10]. The reason we use a DFA instead of anNFA is to keep the context correct. The detailed expla-nation is provided at the end of this section.

Now, consider the following general form of the re-place expression.

replace Rp→ $v by e1 in e2 where bs

First, we translate the regular path pattern Rp into a

DFA (Q,Σ$l, δ, q0, F), where Q = {q0, . . . , qN} is a finiteset of states, Σ$l = Σ ∪ {$l} (where Σ = {l0, . . . , lK}) isa finite set of labels used in Rp, δ : Q × Σ → Q is thetransition function, q0 ∈ Q is the start state, and F ⊆ Qis a set of accept states. We use the special label $l todenote a label other than those used in Rp.

Next, we introduce N + 1 functions hq0 , . . . , hqN ,where hqi corresponds to state qi, and define each hqi

as a structural recursion in the following way. For eachlabel l ∈ Σ$l, we define

hqi({l : $v}) = ei j

and construct a graph with ei j by considering two cases.Note that j ranges over transitions from qi. If δ(qi, l) �F (i.e., transition from qi through l does not reach to anaccept state), we keep the context by propagating l andcontinuing the recursive computation by defining

ei j = {l : hδ(qi ,l)($v)}.Otherwise, we check whether $v satisfies the conditionbs. If it does, we replace the graph with the query resultof e1 satisfying bs:

ei j = if isEmpty (select {“found”} where bs)

then {l : hδ(qi ,l)($v)}else {l : (select e1 where bs)}.

The condition isEmpty(...) in the if-expression checkswhether the condition bs holds. Note that since e1

might be evaluated to {}, the checking expressionshould not be select e1 where bs.

By applying the function associated with the initialstate to e2, we get a UnQL expression having bothstructural recursions and select expressions. Finally,since the select expressions can be translated into struc-tural recursions by using the existing method, we canget structural recursions in UnCAL.

Example 1. Our algorithm maps the replace expres-sion shown in Figure 8(a) to the structural recursion inFigure 8(c) via the DFA obtained from ∗.(a|c) in Fig-ure 8(b).

This example also demonstrates the user-friendlinessof the replace syntax, since without this extension, wehave to directly code the mutually recursive functionin Figure 8(c), after manually constructing the corre-sponding DFA in Figure 8(b). This manual codingwould be error-prone and much more verbose than thereplace syntax.

Now, let us show the correctness of the above trans-lation from UnQL+ to UnCAL. As described in Sec-tion 4.1, we interpret the expression

replace r → $v by e1 in e2 where bs

Page 10: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

140 Progress in Informatics, No. 10, pp.131–148, (2013)

replace ∗ .(a|c)− > $vby $v′

in $dbwhere {g : $u} in $v,

{ ∗ .d : $v′} in $v(a) A replace expression

s1

ac

s0

$lc

a

$l

(b) DFA for ∗ .(a|c)

let sfun hs0({a : $v}) = if isEmpty(e1)then {a : hs1($v)}else {a : e2}

| hs0({c : $v}) = if isEmpty(e1)then {c : hs1($v)}else {c : e2}

| hs0({$l : $v}) = {$l : hs0($v)}sfun hs1({a : $v}) = if isEmpty(e1)

then {a : hs1($v)}else {a : e2}

| hs1({c : $v}) = if isEmpty(e1)then {c : hs1($v)}else {c : e2}

| hs1({$l : $v}) = {$l : hs0($v)}in hs0($db)where e1 ≡ select {“found” : {}}

where ({g : $u} in $v), ({ ∗ .d : $v′} in $v)e2 ≡ select $v′

where ({g : $u} in $v), ({ ∗ .d : $v′} in $v)(c) Translated structural recursion

Fig. 8 A translation example.

so that, starting from the root node of e2, it traverses ev-ery path and replaces the node $v, which is on each paththat simultaneously matches r and satisfies bs, by e1

(actually select e1 where bs should be used instead ofe1 to obtain the bindings from bs). More formally, it isintended to work equivalently to the following pseudocode.

let sfun f ({$l : $v}) =if MATCH[r, bs]($v)then {$l : select e1 where bs}else {$l : f ($v)}

in f (e2)

where MATCH[r, bs] is a pseudo predicate that is eval-uated to be true if and only if $v is the first nodeon the path from the root that matches r and satis-fies bs. All branches in our desugaring have eitherthe form {$l : select e1 where bs} or {$l : f ($v)}.Thus, what we have to prove is that the MATCH[r, bs]pseudo predicate is correctly encoded in the mutual re-cursion of structural recursive functions. First, whetherthe node $v matches r is encoded in the mutual re-cursion, which simulates the behavior of the determin-istic finite automaton (DFA). This is a standard tech-

(a) A source graph (b) A target graph

Fig. 9 Source graph and and its transformation by replaceexpression in Figure 8(a).

nique to represent regular patterns. Next, whether thenode $v satisfies bs is encoded in a if-expression havingisEmpty(select {“found”} where bs) as its condition.This condition holds if and only if bs does not hold,since isEmpty(e) holds if and only if e is evaluated into{}. Thus, this if-expression results in select e1 where bswhen bs holds. Otherwise, it results in keeping the in-put label as $l, together with calling the function as-sociated with the next state in the DFA. Therefore, theMATCH[r, bs] pseudo predicate is correctly encoded inour desugaring code.

Example 2. Figure 9(b) shows the result of usingthe replace expression in Figure 8(a) to transform thecyclic graph in Figure 9(a). This example illustrateswhat happens if a pattern matches the middle of a cycle.Since the replace expression captures the first matchalong the path, node 4 in Figure 9(a) matches for re-placement. Note that DFA in Figure 8(b) only corre-sponds to a path in the replace clause, but the whereclause also works to specify the matching node. There-fore, even though node 5 also matches by virtue of theDFA, it does not actually match since it does not sat-isfy the where clause. The obtained binding of $v′ is asubgraph under node 0, bound by the regular path pat-tern ∗.d The subgraph under node 8 in Figure 9(b) isa copy of the subgraph under node 0. The entire corre-

Page 11: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 141

spondence of the source nodes to target nodes is

7→ {0}6→ {10, 7}5→ {9, 6}4→ {5}3→ {4}2→ {3}1→ {2}0→ {8, 1}

The ’first match’ semantics correspond to a translationalgorithm which uses select to generate subgraphs inthe by clause, since the select construct itself does notconduct recursive replacement as replace can.

Necessity of DFA in the translation of UnQL+We give a detailed explanation of why DFA is nec-

essary for translation of replace/delete/extend con-structs.

Automata created for replace/delete/extend play arole that is different from those created for select.

For select, a regular path pattern (RPP) representsthe paths from a node to target nodes reached by thepaths and all the subgraphs below the target nodes areunified by graph union ∪ and returned as a result. Mul-tiple matches from a given node through identical la-bels are encoded in an automaton by transitions (non-deterministic branches) to different sub-automata thatencodes different subsequent patterns. This is imple-mented in sfun that calls different sfuns associated withthe target states and unify the graphs returned by thosecalled sfuns by graph union ∪. If, during the traver-sal, no further match is possible for the RPP, then nofurther transition in the automata is possible (i.e., deadstate is reached) and correspondingly the sfun returnsempty ({}). Note that there is no semantic problem ifthe NFA for select is determinized. It is just unneces-sary to determinize in order to preserve semantics. Alsonote that by dead sates, we mean states with no transi-tions, not useless states like those unreachable from theinitial state.

Instead, extend uses RPP to specify target nodes andunify the subgraphs below each of these nodes with agiven subgraph by ∪, while the rest of the input graphis kept intact. It is implemented by traversing from thetop as select does, copying the traversed path, instead ofdiscarding the traversed path in case of select. Beforereaching the target node during the traversal, if no morematch is possible, then the original subgraph should justbe returned. This situation is also represented by a spe-cial dead state in the automata encoding RPP, and cor-responding sfun just returns the subgraph. On the otherhand, if transitions with an identical label have multi-ple matches, NFA based encoding would utilize differ-

ent sub-automata for the targets of these transitions andcorresponding sfun unifies the results by ∪. Supposeinput graph $db = {a : {b : {x : {}}}} and transformation

extend (a.b)|(a.c)→ $v with {y : {}} in $db

The NFA approach would generate an automaton inwhich target sub-automata from the initial state viatransition by a would be different, each encoding therest of the patterns b and c. So corresponding sfunwould call two sfuns for input a and unify them.Then, the former sub-automaton would copy b andthen produce matching result by unifying {x : {}}and given graph {y : {}}, thus, {b:{x:{}, y:{}}}. Onthe other and, the latter sub-automaton would producenon-matching result after copying b the original sub-graph, thus, {b:{x:{}}}. So the unified result would be{a:{b:{x:{}, y:{}}}, a:{b:{x:{}}}}. However, semantics ofextend should return {a:{b:{x:{}, y:{}}}} instead. Al-though they are trace equivalent, they are not bisimi-lar. On the contrary, DFA approach produces DFA withonly one target state from the transition by label a fromthe initial state. The target sub-automaton is only one.Therefore, corresponding sfun produces linear preced-ing paths before reaching target node of the RPP, i.e.,{a : {b : }}. Similar arguments apply for replaceand delete. Therefore, DFA is essential to implementextend/replace/delete correctly. It is true that exponen-tial blowup might occur during determinization, how-ever, if the RPP is not complex, i.e., it is not largeand corresponding NFA does not include many nonde-terministic branches, the number of states will remainmoderate. Note that the need of DFA does not comedirectly from the dead states, but from the problem ofunifying the result of subautomaton which might be-have differently (some of which might reach dead stateand the other reach matching state, as in the examplegiven above).

5 Evaluation and applicationsHere, we demonstrate the power (expressiveness and

efficiency) of the GRoundTram system through the de-velopment of a known nontrivial (bidirectional) modeltransformation between UML class diagrams and rela-tional databases models, and highlight its usefulness inpractice by giving a list of important applications de-veloped by other groups using it.

5.1 Developing bidirectional Class2RDBClass2RDB is a model transformation proposed by

Bezivin et al. [7] as a common benchmark examplefor all the participants of the Model Transformation inPractice workshop for comparing and contrasting var-ious approaches to model transformation. Class2RDBmaps Class models to RDB models. For instance, it can

Page 12: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

142 Progress in Informatics, No. 10, pp.131–148, (2013)

Fig. 10 An RDB model.

be used to transform the Class model in Figure 3 intothe RDB model in Figure 10. Class2RDB maps eachpersistent class in a Class model to a table in the RDBmodel. All attributes of the class and its subclasses aremapped to columns in the corresponding table. If a pri-mary attribute belongs to the class, a pkey referencefrom the table model element pointing the correspond-ing column model element is established. If an attributebelongs to its subclass which is persistent, a referencedescribing foreign key to the corresponding table modelelement is established.

We show that UnQL+ is powerful enough to (com-positionally) describe the forward transformation (fromclass diagrams to relational database models), whilegetting the backward transformation for free in ourframework. Figure 11 shows the whole transformationin UnQL+. Let us briefly explain how this UnQL+ pro-gram was developed by splitting the transformation intotwo steps. In the first step (denoted by the binding of$tables_step1), every persistent class is mappedto a subgraph representing table, which is connected tosubgraphs that correspond to columns originated fromattributes of the class and its subclasses. All subclassesare collected by using regular path patterns as shown inSection 4.1. If necessary, references pkey and fkeysare added by an extend construct in UnQL+, providedthat the references refs of Fkey do not point to thereferring table because the table may not have been con-structed yet. They point to the name of the referringtable instead. In the second step (denoted by the bind-ing of $tables_step2), each name pointed to byrefs is replaced by the corresponding table by using areplace construct.

5.2 Optimization and efficiencyNext, we show that the forward and backward trans-

formations can be run efficiently in a scalable manner,while the inefficiency due to composition can be au-tomatically removed through our fusion optimization.The fusion operation was originally designed to mergetwo successive applications of structural recursions intoone [10]. It was later enhanced in [28], [29].

Table 1 summarizes the performance of bidirectional

Table 1 Summary of experiments (running time is in CPUseconds).

direction no rewriting rewriting

Class2RDBforward 1.18 0.68

backward 14.5 7.90

PIM2PSMforward 0.08 0.07 (13)

backward 1.62 0.75

C2Oselforward 0.04 0.05 (11)

backward 0.26 0.27

C2Osel’forward 0.05 0.04 (11)

backward 2.53 1.26

Ex1forward 0.036 0.007 (1)

backward 0.83 0.69

transformations on various compositional transforma-tions. The test used a MacOSX on a 17 inch Mac-BookPro, with a 3.06 GHz Intel Core 2 Duo CPU. Anedge-renaming algorithm was used in the measurement,and no modification was actually made, since it doesnot significantly affect the running time. The right-most column shows the running time with rewriting op-timization. The number of nodes and edges of the graph(Figure 4) that encoded the Class model (Figure 3) inClass2RDB were respectively 70 and 73. The sizesof the source models in the other transformations weresimilar. (See the analysis at the end of this subsectionfor the performance with respect to the size of the in-put graph.) In the table, PIM2PSM stands for PlatformIndependent Model to Platform Specific Model trans-formation, C2Osel for transformation of a customeroriented database into an order oriented database, fol-lowed by a simple selection, and Ex1 for the examplefrom our previous paper [25], which in tern was bor-rowed from [10]. Ex1 is a composition of two structuralrecursions. The numbers in parentheses show how of-ten the fusion transformation happened. Our rewritesled to performance improvements in both directions.As the run-time optimization, unreachable parts wereremoved after every application of the UnCAL struc-tural recursion operator. This run-time optimization iseffective when the composed transformation has highselectivity (generates small output from large input),whereas fusion is effective when the selectivity is low.Note that this optimization was turned off for C2Osel’.The slowdown in C2Osel after rewriting accounts forthis trade-off. For the principles of this rewriting opti-mization, please refer to our papers [28], [29]. You cantest other optimizations, like, e.g., subgraph computa-tion optimization, at our project’s website [2].

To account for the slowdown of the backward trans-formation compared with the forward transformation,we took a sample execution profile. The backward

Page 13: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 143

select $tables_step2 where$tables_step1 in(select $tables where

{Class:$class} in (select $assoc where {Association.(src|dest):$assoc} in $db),{is_persistent.Boolean:true} in $class,$dests in (select {Class:$dest} where {(src_of.Association.dest.Class)+:$dest} in $class),$related in ({Class:$class} U $dests),$cols in (select {cols:{Column:{name:$n,type:$t}}}

where {Class.attrs.Attribute:{name:$n,type:$t}} in $related),$tables in (select {Table:{name:$cname} U $cols} where {name:$cname} in $class),$tables in (extend Table -> $table with $pkeys U $fkeys in $tables where

{cols:$cols} in $table,{Column.name.String:{$cname:{}}} in $cols,$pkeys in (select {pkey:$cols} where

{attrs.Attribute: {is_primary.Boolean:true, name.String:{$pname:{}}}} in $class,$cname = $pname),

$fkeys in (select {fkeys:{Fkey:{cols:$cols, ref:$ref}}} where{Class:{is_persistent.Boolean:true,

attrs.Attribute.name.String:{$aname:{}}, name:$ref}} in $dests,$cname = $aname))),

$tables_step2 in (replace Table.fkeys.Fkey.ref -> $ref by {Table:$table} in $tables where{Table:$table} in $tables_step1,{String:{$rname:{}}} in $ref,{name.String:{$tname:{}}} in $table,$tname = $rname)

Fig. 11 Class2RDB in UnQL+.

0.001

0.01

0.1

1

10

100

1000

100 1000 10000

Exe

cutio

n C

PU

tim

e[se

c]

No. of Nodes in the Source Graph

a2d_xc(bwd)5.93e-7*x**2.65

a2d_xc(fwd)9.29e-7*x**2.23

Fig. 12 Transformation time v.s. source graph size.

transformation decomposes a graph using reachablesubgraph extraction computation. In addition, the struc-tural recursion let sfun . . . eb . . . in ea involves restoringthe input of the argument expression ea, which in turnrequires examining environment produced by the back-ward transformation of the structural recursion and su-perposing the resultant graphs in order to restore theentire graph as the updated target of the argument ex-pression. The backward transformation of PIM2PSM(after rewriting) uses 15 times more node id compari-son operations compared with the forward transforma-tion. The node comparisons are a result of adding orlooking up nodes or edges in sets or maps that are im-plemented by using balanced binary trees in the OCamlstandard library.

Figure 12 shows how the size of the source modelaffects time to execute the a2d xc transformation de-

scribed in Section 3, in both directions. Lattice-likeregularly shaped strongly connected graphs are used asthe source. These execution times match the complex-ity of PTIME mentioned in Section 4.1 for relativelylarge (several thousand nodes) graphs.

5.3 Other applicationsThe GRoundTram website [2] has a bunch of exam-

ples, big and small, and all the examples presentedin this paper can be tried through the demo website.In addition, we would like to give the reader a roughidea about the current status of GRoundTram uses bylisting applications that have been or are being devel-oped by other groups: they include bidirectional featuremodel transformation [48] (Peking University), bidirec-tional transformation between VDM (Vienna Devel-opment Method) specifications and Java implementa-tion [34] (another group at National Institute of Infor-matics), bidirectional transformation between Simulinkdiagrams and UML diagrams [47] (Waseda Univer-sity), bidirectionalizing ATL (ATLAS TransformationLanguage) with GRoundTram [42] (Shibaura Instituteof Technology), and co-evolution of Java models andcodes [51] (Open University & Shanghai Jiao TongUniversity). Moreover, Chen [11] at Shanghai JiaoTong University identifies GRoundTram as a potentialmeans to synchronize the behavior model of concur-rent systems. All these activities indicate the promiseof GRoundTram as a practical tool.

As an example of our own experience in [51], we ex-tensively used the UnQL+ syntax as an internal rep-

Page 14: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

144 Progress in Informatics, No. 10, pp.131–148, (2013)

resentation that was automatically generated by theblinkit∗4 tool. Although it was not directly used byusers, it was a concise way of describing the userediting operations to Java code, and also for exploit-ing high-level optimization opportunities at this syntaxlevel.

6 Related workBesides the related work in the introduction, we

highlight some others related to graph-based modeltransformation and linguistic approach to bidirectionaltransformation.

Our work is much related to research on model trans-formation based on graph transformation. AGG [46] isa rule-based visual tool that supports typed (attributed)graph transformations, including type inheritance andmultiplicities. Triple Graph Grammars (TGG) [21],[37] is intended as a declarative specification of model-to-model integration rules. MOFLON [4] implementsTGG and adopts the visual notation of QVT Rela-tional, the OMG standard bidirectional model transfor-mation language. Giese and Hildebrandt [20] proposeda model synchronization algorithm based on TGG thatcan synchronize large-scale models. Guerra et al. [23]proposed more general notion called “inter-modelling”,where a specification can be compiled into differentoperational mechanisms not only for model-to-modeltransformation but also for model matching and modeltraceability. To perform forward and backward trans-formations, a pattern specification is compiled intoTriple Graph Grammar (TGG) operational rules.

Different from these rule-based approaches, ours is afunctional one that supports model transformation com-position and its automatic optimization. As far as weare aware, this is the first nontrivial functional and al-gebraic framework for model transformation.

This study was inspired by the recent linguistic ap-proach to bidirectionalization of the tree transforma-tion [9], [17], [18], [32], [39] for tree data synchroniza-tion. One important feature of this approach is clearbidirectional semantics, something that is missing frommost of the existing bidirectional model transformationsystems [43]. Although some attempts at using the lin-guistic approach have been made [6], [50], it remains achallenge to provide a general bidirectional frameworkfor graphs which are more complicated than trees, andour work is a big step in this direction.

GRoundTram has grown out of our two-year effortto realize the emergent idea presented in our short pa-per [26]. UnQL+ is based on the graph query languageUnQL [10] but it is significantly extended with a pow-erful language construct replace that can handle trans-

∗4 http://computing-research.open.ac.uk/linkit/

formation context. It is also worth noting that a simplereplace expression was studied in [25] but it can nei-ther deal with regular path expressions nor treat multi-ple graph databases.

7 ConclusionsWe proposed a novel algebraic framework called

GRoundTram to support systematic development ofbidirectional model transformation. Different frommany rule-based frameworks, our framework is func-tional and algebraic, and based on a graph algebraand structural recursion. Our new framework supportssystematic development of model transformations in acompositional manner, has a clear semantics for bidi-rectional model transformation, and can be efficientlyimplemented.

This is our first step towards bidirectional model pro-gramming, a linguistic framework to support system-atic development of model transformation programs. Inthe future, we will look more into relation between therule-based approach and the algebraic and functionalapproach, and see how to integrate them into a morepowerful framework for bidirectional model transfor-mation. One initial attempt has already been made byintegrating GRoundTram with ATL [42], and we planto continue this line of research by collaborating withthe AtlanMod [1] team. In such an integration of modeltransformation frameworks, we need to automate thegraph encoding of UML-like generic diagrams that arenot yet fully automated. Several attempts towards au-tomation had been made [52], and we plan to deal withEclipse Modeling Framework (EMF) models as well.Another direction towards integration is the approachby Wider [49]. In this approach, asymmetric lens wasimplemented as an internal DSL in Scala. Although itis not graph-based, the Java-friendliness of the host lan-guage may make it easier to integrate with the modeldriven engineering framework.

Last but not least, we currently do not have any ex-plicit control over update policy in backward trans-formations. The only property we have is well-behavedness described by the (GETPUT) and the(WPUTGET). Even if multiple source models may bepossible as a result of backward transformation, pro-grammer do not have a way to choose them. Control-ling the choice is one of our important future work.

AcknowledgmentsWe would like to thank the anonymous reviewers

for their thorough comments and constructive sugges-tions to improve the paper. The anonymous ASE’11reviewers for the prior version of this paper also madehelpful suggestions. We also thank Kazutaka Matsuda,Kazuyuki Asada, and Isano Sasano for their valuable

Page 15: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 145

discussions with us. The research was supported in partby the Grand-Challenging Project on the “LinguisticFoundation for Bidirectional Model Transformation”of the National Institute of Informatics, and a Grant-in-Aid for Scientific Research for Encouragement ofYoung Scientists (B) No. 20700035, and a Grant-in-Aidfor Scientific Research (B) No. 22300012.

References[1] The AtlanMod team web site: http://www.emn.fr/x-

info/atlanmod/[2] The BiG project web site: http://www.biglab.org/[3] S. M. Abramov and R. Gluck, “Principles of inverse

computation and the universal resolving algorithm,” InThe Essence of Computation, pp.269–295, 2002.

[4] C. Amelunxen, A. Konigs, T. Rotschke, and A. Schurr,MOFLON, “A Standard-Compliant Metamodel-ing Framework with Graph Transformations,” InA. Rensink and J. Warmer, editors, Model DrivenArchitecture - Foundations and Applications: SecondEuropean Conference, vol.4066 of Lecture Notes inComputer Science (LNCS), pp.361–375, Heidelberg,Springer Verlag, 2006.

[5] M. Antkiewicz and K. Czarnecki, “Framework-specificmodeling languages with round-trip engineering,” InMoDELS 2006: Proceedings of the 9th InternationalConference on Model Driven Engineering Languagesand Systems, pp.692–706, Springer-Verlag, 2006.

[6] M. Antkiewicz and K. Czarnecki, “Design space ofheterogeneous synchronization,” In GTTSE ’07: Pro-ceedings of the 2nd Summer School on Generative andTransformational Techniques in Software Engineering,2007.

[7] J. Bezivin, B. Rumpe, A. Schurr, and L. Tratt, “Modeltransformation in practice workshop announcement,”In Satellite Events at the MoDELS 2005 Conference,pp.120–127, Springer-Verlag, 2005.

[8] A. Bohannon, B. C. Pierce, and J. A. Vaughan, “Re-lational lenses: a language for updatable views,” In S.Vansummeren, editor, PODS, pp.338–347, ACM, 2006.

[9] A. Bohannon, J. N. Foster, B. C. Pierce, A. Pilkiewicz,and A. Schmitt, “Boomerang: resourceful lenses forstring data,” In G. C. Necula and P. Wadler, editors,POPL ’08: ACM SIGPLAN–SIGACT Symposium onPrinciples of Programming Languages, pp.407–419.ACM, 2008.

[10] P. Buneman, M. F. Fernandez, and D. Suciu, “UnQL:a query language and algebra for semistructured databased on structural recursion,” VLDB Journal: VeryLarge Data Bases, vol.9, no.1, pp.76–110, 2000.

[11] Yuting Chen, “A bidirectional graph transformation ap-proach to analysis of concurrent software models,” InSoftware Engineering and Service Sciences (ICSESS),2010 IEEE International Conference on, pp.339–343,july 2010. doi: 10.1109/ICSESS.2010.5552447.

[12] K. Czarnecki, J. N. Foster, Z. Hu, R. Lammel, A. Schurr,and J. F. Terwilliger, “Bidirectional transformations: Across-discipline perspective,” In International Confer-ence on Model Transformation (ICMT 2009), pp.260–283, LNCS 5563, Springer, 2009.

[13] Z. Diskin, Y. Xiong, and K. Czarnecki, “From state-to delta-based bidirectional model transformations:the asymmetric case,” Journal of Object Technology,vol.10, no.6, pp.1–25, 2011.

[14] H. Ehrig, K. Ehrig, C. Ermel, F. Hermann, and G.Taentzer, “Information preserving bidirectional modeltransformations,” In Proceedings of the 10th interna-tional conference on Fundamental approaches to soft-ware engineering, FASE’07, pp.72–86, Berlin, Heidel-berg, 2007. Springer-Verlag. ISBN 978-3-540-71288-6.

[15] K. Ehrig, E. Guerra, J. de Lara, L. Lengyel, T. Leven-dovszky, U. Prange, G. Taentzer, D. Varro, and S. Varro-Gyapay, “Model transformation by graph transforma-tion: A comparative study,” Presented at MTiP 2005.http://www.inf.mit.bme.hu/FTSRG/Publications/varro/2005/mtip05.pdf, 2005.

[16] J. Ellson, E. R. Gansner, E. Koutsofios, S. C. North,and G. Woodhull, “Graphviz and dynagraph - static anddynamic graph drawing tools,” In GRAPH DRAWINGSOFTWARE, pp.127–148, Springer-Verlag, 2003.

[17] J. N. Foster, M. B. Greenwald, J. T. Moore, B. C. Pierce,and A. Schmitt, “Combinators for bi-directional treetransformations: a linguistic approach to the view up-date problem,” In POPL ’05: ACM SIGPLAN–SIGACTSymposium on Principles of Programming Languages,pp.233–246, 2005.

[18] J. N. Foster, M. B. Greenwald, J. T. Moore, B. C.Pierce, and A. Schmitt, “Combinators for bidirectionaltree transformations: A linguistic approach to the view-update problem,” ACM Trans. Program. Lang. Syst.,vol.29, no.3, 2007.

[19] M. Garcia, “Bidirectional synchronization of multipleviews of software models,” In Proceedings of DSML-2008, vol.324 of CEUR-WS, pp.7–19, 2008.

[20] H. Giese and S. Hildebrandt, “Efficient model synchro-nization of large-scale models,” Technical Report 28,Hasso Plattner Institute at the University of Potsdam,2009.

[21] H. Giese and R. Wagner, “Incremental model syn-chronization with triple graph grammars,” In MoDELS2006: Proceedings of the 9th nternational Conferenceon Model Driven Engineering Languages and Systems,pp.543–557, Springer Verlag, 2006.

[22] J. Grundy, J. Hosking, and W. B. Mugridge, “Inconsis-tency management for multiple-view software develop-ment environments,” IEEE Trans. Softw. Eng., vol.24,no.11, pp.960–981, 1998.

[23] E. Guerra, J. Lara, and F. Orejas, “Inter-modellingwith patterns,” Software & Systems Modeling, pp.1–

Page 16: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

146 Progress in Informatics, No. 10, pp.131–148, (2013)

30, 2011. ISSN 1619-1366. doi: 10.1007/s10270-011-0192-1.

[24] F. Hermann, H. Ehrig, F. Orejas, K. Czarnecki, Z.Diskin, and Y. Xiong, “Correctness of model syn-chronization based on triple graph grammars,” In Lec-ture Notes in Computer Science, vol.6981, pp.668–682,Springer, 2011. ISBN 978-3-642-24484-1.

[25] S. Hidaka, Z. Hu, H. Kato, and K. Nakano, “Towardsa compositional approach to model transformation forsoftware development,” In SAC’09: Proceedings of the2009 ACM symposium on Applied Computing, pp.468–475, ACM, 2009.

[26] S. Hidaka, Z. Hu, H. Kato, and K. Nakano, “A composi-tional approach to bidirectional model transformation,”In ICSE Companion, pp.235–238, IEEE, 2009.

[27] S. Hidaka, Z. Hu, K. Inaba, H. Kato, K. Matsuda, andK. Nakano, “Bidirectionalizing graph transformations,”In ACM SIGPLAN International Conference on Func-tional Programming, pp.205–216, ACM, 2010.

[28] S. Hidaka, Z. Hu, K. Inaba, H. Kato, K. Matsuda, K.Nakano, and I. Sasano, “Marker-directed Optimizationof UnCAL Graph Transformations,” In Proceediingsof 21st International Symposium on Logic-Based Pro-gram Synthesis and Transformation (LOPSTR 2011),vol.7225 of LNCS, pp.123–138, Odense, Denmark,2011.

[29] S. Hidaka, Z. Hu, K. Inaba, H. Kato, K. Matsuda, K.Nakano, and I. Sasano, “Marker-directed Optimizationof UnCAL Graph Transformations (revised version),”Technical Report GRACE-TR-2011-06, GRACE Center,National Institute of Informatics, Nov. 2011.

[30] S. Hidaka, Z. Hu, K. Inaba, H. Kato, and K. Nakano,“GRoundTram: An integrated framework for develop-ing well-behaved bidirectional model transformations(short paper),” In 26th IEEE/ACM International Confer-ence On Automated Software Engineering, pp.480–483,IEEE, 2011.

[31] Z. Hu, H. Iwasaki, M. Takeichi, and A. Takano, “Tu-pling calculation eliminates multiple data traversals,”In ACM SIGPLAN International Conference on Func-tional Programming (ICFP’97), pp.164–175, Amster-dam, The Netherlands, ACM Press, June 1997.

[32] Z. Hu, S.-C. Mu, and M. Takeichi, “A programmable ed-itor for developing structured documents based on bidi-rectional transformations,” Higher-Order and SymbolicComputation, vol.21, no.1-2, pp.89–118, 2008.

[33] K. Inaba, S. Hidaka, Z. Hu, H. Kato, and K. Nakano,“Graph-transformation verification using monadicsecond-order logic,” In P. Schneider-Kamp and MichaelHanus, editors, PPDP, pp.17–28, ACM, 2011.

[34] F. Ishikawa, “Towards customizable and bi-directionally traceable transformation between vdm++and java,” In The 9th Overture/VDM Workshop, June2011.

[35] F. Jouault and J. Bezivin, “KM3: A DSL for metamodelspecification,” In Formal Methods for Open Object-Based Distributed Systems, pp.171–185, LNCS 4037,Springer, 2006.

[36] F. Klar, A. Konigs, and A. Schurr, “Model transforma-tion in the large,” In I. Crnkovic and A. Bertolino, edi-tors, ESEC/SIGSOFT FSE, pp.285–294, ACM, 2007.

[37] A. Konigs and A. Schurr, “Tool integration with triplegraph grammars - a survey,” Electronic Notes in The-oretical Computer Science, vol.148, no.1, pp.113–150,Feb. 2006.

[38] R. Lammel, “Coupled Software Transformations (Ex-tended Abstract),” In First International Workshop onSoftware Evolution Transformations, Nov. 2004.

[39] K. Matsuda, Z. Hu, K. Nakano, M. Hamana, andM. Takeichi, “Bidirectionalization transformation basedon automatic derivation of view complement func-tions,” In 12th ACM SIGPLAN International Confer-ence on Functional Programming (ICFP 2007), pp.47–58, ACM Press, Oct. 2007.

[40] K. Nakano, S. Hidaka, Z. Hu, K. Inaba, and H. Kato,“Simulation-based graph schema for view updatabilitychecking of graph queries,” Technical Report GRACE-TR11-01, GRACE Center, National Institute of Infor-matics, May 2011.

[41] R. Paige and R. Tarjan, “Three partition refine-ment algorithms,” SIAM Journal of Computing,vol.16, no.6, pp.973–988, 1987. DOI: http://dx.doi.org/10.1137/0216062.

[42] I. Sasano, Z. Hu, S. Hidaka, K. Inaba, H. Kato, andK. Nakano, “Toward bidirectionalization of ATL withGRoundTram,” In Theory and Practice of Model Trans-formations, Fourth International Conference, ICMT2011, vol.6707 of LNCS, pp.138–151, Springer, June2011.

[43] P. Stevens, “Bidirectional model transformations inQVT: Semantic issues and open questions,” In G. En-gels, B. Opdyke, D. C. Schmidt, and F. Weil, editors,Proc. 10th MoDELS, vol.4735 of Lecture Notes in Com-puter Science, pp.1–15, Springer, 2007.

[44] P. Stevens, “A landscape of bidirectional model trans-formations,” In R. Lammel, J. Visser, and J. Saraiva,editors, Generative and Transformational Techniques inSoftware Engineering II, pp.408–424, Springer-Verlag,Berlin, Heidelberg, 2008. ISBN 978-3-540-88642-6.

[45] P. Stevens, “Bidirectional model transformations in qvt:semantic issues and open questions,” Software and Sys-tem Modeling, vol.9, no.1, pp.7–20, 2010.

[46] G. Taentzer, “AGG: A graph transformation environ-ment for modeling and validation of software,” In J.L. Pfaltz, M. Nagl, and B. Bohlen, editors, AGTIVE,vol.3062 of LNCS, pp.446–453, Springer, 2003.

[47] T. Kozawa, “Bidirectionaltransformation with UMLmodel for Simulink model maintainability improve-ment (in Japanese),” http://www.washi.cs.waseda.ac.

Page 17: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

GRoundTram: An integrated framework for developing well-behaved bidirectional model transformations 147

jp/papers/2011/submission/1w070119.pdf, Feb. 2011.Summary of the bachelor’s thesis at the Department ofConputer Science, Waseda University.

[48] B. Wang, Z. Hu, Q. Sun, H. Zhao, Y. Xiong, and H. Mei,“Supporting feature model refinement with updatableview,” Technical Report GRACE-TR-2010-05, GRACECenter, National Institute of Informatics, May 2010.

[49] A. Wider, “Towards combinators for bidirectionalmodel transformations in scala,” In A. M. Sloane andU. Aßmann, editors, SLE, vol.6940 of Lecture Notes inComputer Science, pp.367–377, Springer, 2011. ISBN978-3-642-28829-6.

[50] Y. Xiong, D. Liu, Z. Hu, H. Zhao, M. Takeichi, and H.Mei, “Towards automatic model synchronization frommodel transformations,” In 22nd IEEE/ACM Interna-tional Conference on Automated Software Engineering(ASE 2007), pp.164–173, ACM Press, Nov. 2007.

[51] Y. Yu, Y. Lin, Z. Hu, S. Hidaka, H. Kato, and L.Montrieux, “Blinkit: Maintaining Invariant Traceabilitythrough Bidirectional Transformations,” In Proceedi-ings of the 34th International Conference on SoftwareEngineering (ICSE 2012), Zurich, Switzerland, pp.540–550, June 2012.

[52] Y. Zhu, T. Zan, S. Hidaka, and Z. Hu, “iGRT: A genericinterface for GRoundTram,” Technical Report GRACE-TR-2012-06, GRACE Center, National Institute of In-formatics, 2012.

Soichiro HIDAKASoichiro Hidaka is an assistant pro-fessor at the National Institute of In-formatics and The Graduate Univer-sity for Advanced Studies in Japan.He received his bachelor’s degree andPh. D in Engineering from The Uni-

versity of Tokyo in 1994 and 1999 respectively. He hadinvolved in research projects such as parallel program-ming language implementation, micro-kernel based op-erating system and document processing system. Hisresearch interests include infrastructure software sys-tems, and database programming languages in particu-lar. Recently he has been conducting research on bidi-rectional graph transformations that are intended to fa-cilitate bidirectional model transformations. He is amember of ACM, IPSJ, IEICE and JSSST.

Zhenjiang HUZhenjiang Hu is Professor of Na-tional Institute of Informatics (NII)and The Graduate University for Ad-vanced Studies in Japan. He receivedhis BS and MS from Shanghai JiaoTong University in 1988 and 1991 re-

spectively, and PhD degree from University of Tokyoin 1996. He was a lecture (1997-1999) and an associateprofessor (2000-2007) in University of Tokyo, beforejoining NII as a full professor in 2008. His main interestis in programming languages and software engineeringin general, and functional programming, parallel pro-gramming and bidirectional model-driven software de-velopment in particular. He is now serving on the steer-ing committees of ACM ICFP, APLAS and FLOPS,and is the academic committee chair of the NII ShonanMeetings.

Kazuhiro INABAKazuhiro Inaba is a software engi-neer of Google Inc. He received PhDdegree from University of Tokyo in2009. He was a researcher in Na-tional Institute of Informatics from2009 to 2011. His main interest is in

formal languages, in particualr in the complexity of au-tomata and transducers over strings and trees.

Page 18: Research Paper GRoundTram: An integrated framework for ... · 1 Introduction Bidirectional model transformation[6],[12],[14], [44],[45] is an enhancement of model transforma-

06-006

148 Progress in Informatics, No. 10, pp.131–148, (2013)

Hiroyuki KATOHiroyuki Kato is Assistant Professorof National Institute of Informatics(NII) and The Graduate Universityfor Advanced Studies in Japan. Hereceived BS from Tokyo Universityof Science in 1990, and MS and PhD

degree from Nara Institute of Science and Technologyin 1996 and 1999 respectively. He joined National Cen-ter for Science Information Systems (NACSIS) from1999 as a research associate. His research interests in-clude semistructured databases, database programminglanguages and query optimization by program transfor-mation.

Keisuke NAKANOKeisuke Nakano is an associate pro-fessor at the University of Electro-Communications, Japan. He re-ceived his Ph.D. degree from Gradu-ate School of Science, Kyoto Univer-sity. He was a postdoctoral researcher

at the University of Tokyo from 2003 to 2008. He hasassumed his current post since April 2012 after workingthere as an assistant professor from 2008. His researchinterests include formal language theory, programminglanguage theory, functional programming, and theoremproving. He is a member of JSSST, IPSJ, and ACM.