<!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>
      <journal-title-group>
        <journal-title>Toulouse, France, September</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Scalable Models Using Model Transformation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Thomas Huining Feng</string-name>
          <email>tfeng@eecs.berkeley.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Edward A. Lee</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Center for Hybrid and Embedded Software Systems EECS, University of California, Berkeley Berkeley</institution>
          ,
          <addr-line>CA 94720</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2008</year>
      </pub-date>
      <volume>29</volume>
      <issue>2008</issue>
      <fpage>71</fpage>
      <lpage>85</lpage>
      <abstract>
        <p>Higher-order model composition can be employed as a mechanism for scalable model construction. By creating a description that manipulates model fragments as first-class objects, designers' work of model creation and maintenance can be greatly simplified. In this paper, we present our approach to higher-order model composition based on model transformation. We define basic transformation rules to operate on the graph structures of actor models. The composition of basic transformation rules with heterogeneous models of computation form complex transformation systems, which we use to construct large models. We argue that our approach is more visual than the traditional approaches using textual model descriptions. It also has the advantage of allowing to dynamically modify models and to execute them on the fly. Our arguments are supported by a concrete example of constructing a distributed model of arbitrary size.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>(a) Top level of the MapReduce model
(b) Internal design of the Split actor
(c) Internal design of the Map actor
(d) Internal design of the Reduce actor
(e) Internal design of the WaitingStop actor</p>
      <p>Fig. 1. MapReduce model with 2 Map machines and 3 Reduce machines</p>
      <p>
        In recent practice we have seen large-scale models containing thousands or
even millions of actors. One concrete example is the model for distributed
wordcounting created using the MapReduce programming paradigm as described by
Dean and Ghemawat in Google [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The model is designed to utilize hundreds
of computers available in a large cluster to count the occurrences of each word
in a huge number of web documents. We have created a simplified demo using
5 worker machines in the Ptolemy II modeling and simulation environment [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
as shown in Fig. 1. Two of the machines (modeled by actors) provide the Map
functionality and three provide Reduce. The Split actor, located either on a
central computer or on any of the worker machines, distributes the key-document
pairs received at its input port to the Map machines. The Map machines map
words in the input documents onto word-number pairs. In this case, the numbers
in those pairs are always 1, each denoting a single occurrence of a word. Those
pairs are then sent to the Reduce machines designated by the hash code of the
words. Therefore, pairs containing the same word are always delivered to the
same Reduce machine. The Reduce machines then count the pairs for each word
that they receive, and send the result to the Merge actor for output. When all
input documents are processed, the WaitingStop actor receives a true-valued
input, and terminates the execution.
      </p>
      <p>It is hard to imagine manually constructing one such model for a large number
of worker machines. The complexity of the work grows sharply as the number
of actors increases. Even if the model can be constructed manually, it is still
extremely difficult to modify or maintain the design. We are thus motivated to
explore an approach to automated model construction and modification.</p>
      <p>
        In our prior work, we have developed Ptalon as a declarative language for
higher-order model composition [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Textual model descriptions can be written by
designers to manipulate model fragments as first-class objects, and to compose
them to generate large models. As an example, the same MapReduce model is
constructed with Ptalon [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. It is shown that the size of the Ptalon description
does not grow with the increase of worker machines used by the model. This is
because the number of worker machines is defined as an integer parameter that
can be set by the user.
      </p>
      <p>In our recent effort on higher-order model composition, we aim to provide
a more straightforward and user-friendly mechanism for constructing models.
We view models as attributed graphs, and employ graph transformation
technique. We have implemented a tool that supports a visual language for specifying
transformations. The visual language is very close to the language that model
designers use to manually create models. This removes the need for requiring
model designers to learn new languages.</p>
      <p>We envision a variety of applications for our technique. In this paper, we
present an example for automated model construction and execution. Other
applications include model optimization, refactoring, structural parametrization,
and workflow automation.</p>
      <p>(AFRL), the State of California Micro Program, and the following companies:
Agilent, Bosch, HSBC, Lockheed-Martin, National Instruments, and Toyota.</p>
      <p>Top</p>
      <p>C
A</p>
      <p>B
(a) An example of a hierarchical model
(b) Attributed graph representation
1. Models are constructed with graph transformation rules that have a visual
representation, whereas in Ptalon, textual descriptions are used.
2. Transformations can be applied to existing models as incremental
modifications statically or dynamically.
3. A hierarchical heterogeneous model can be used to control the application
of multiple transformations.</p>
      <p>The following sections are organized as follows. In Section 2, we present
models as graphs and define basic transformations. In Section 3, we discuss using
a model to control basic transformations to form a complex transformation. We
construct a MapReduce model with transformation as an example in Section 4.
We study the related work in Section 5, and conclude our discussion in Section 6.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Model Transformation Based on Graph Transformation</title>
      <p>(a) Pattern
(b) Replacement</p>
      <sec id="sec-2-1">
        <title>Pattern Replacement 1 Map Map 2 Reduce Reduce (c) Correspondence</title>
        <p>which is similar to a rewrite rule in a context-free grammar. It can be used
to match a subgraph in a given graph, and to replace that subgraph with a
replacement graph. We specify a transformation rule with three components: a
pattern, a replacement, and the correspondence between objects in those two.</p>
        <p>Fig. 3 shows a transformation rule designed for our MapReduce example,
which we will further discussed in Section 4. This rule creates connections
between the output ports of a Map actor and the input ports of a Reduce actor.
Repeatedly applying the rule results in having all the Map actors and Reduce
actors connected in this way. In the pattern, two matchers aim to match two
distinct actors in the given model. The names of the matchers are insignificant
and need not be the same as those of the matched actors. Without
considering the constraint, the two matchers in the pattern match any two such actors:
one with output ports named “outputKeys” and “outputValues,” and the other
with input ports “inputKeys” and “inputValues.” The constraint requires that
the ports of the two actors not be connected before the transformation is applied.
This avoids creating excessive connections between the same pairs of ports.</p>
        <p>In the replacement, the two matchers are preserved, meaning that the matched
actors should be kept after transformation. Two connections are to be created
between their ports, because those connections (along with the hidden relations
on them) do not exist in the pattern. In general, designers of transformation
rules can specify adding or deleting objects by editing the replacement as they
wish. Note that the names of the matchers in the replacement need not be the
same as those in the pattern, because the third component, the correspondence
table, establishes the relations between the two graphs. In this case, the
correspondence table states that the “Map” object in the pattern corresponds to
the “Map” object in the replacement, and the “Reduce” object in the pattern
corresponds to the “Reduce” object in the replacement. For brevity, we do not
show correspondence relations between other types of vertices such as ports and
relations.
2.2</p>
        <sec id="sec-2-1-1">
          <title>Formal Definition of Graph Transformation</title>
          <p>
            Our graph transformation is defined as a modified version of the double-pushout
approach introduced in [
            <xref ref-type="bibr" rid="ref8">8</xref>
            ] and reviewed in [
            <xref ref-type="bibr" rid="ref9">9</xref>
            ]. For completeness, we first review
that approach here.
          </p>
          <p>A graph G is a tuple hVG, EGi, where VG is the set of vertices in G and
EG ⊆ VG × VG is the set of edges. Graph G is a subgraph of graph H if VG ⊆ VH
and EG ⊆ EH .</p>
          <p>A graph morphism, or simply morphism, from graph G to H is a total
function m : VG → VH , such that for any v1, v2 ∈ VG, if (v1, v2) ∈ EG, then
m
m(v1), m(v2) ∈ EH . We denote this morphism with G −→ H. For any vertex
v ∈ VG, we say v matches v′ in m if m(v) = v′. For any edge (v1, v2) ∈ EG,
we say (v1, v2) matches (v1′, v2′) in m if m(v1) = v1′ and m(v2) = v2′. If m is an
injective function, then we say G is isomorphic to a subgraph of H, or G matches
a subgraph of H.</p>
          <p>The composition of G −→ H with H −n→ I is G n−◦→m I, where n◦m : VG → VI
m
is the composition of function m : VG → VH and n : VH → VI .</p>
          <p>G
n
I
m
m0
y</p>
          <p>H
n0</p>
          <p>J
z
x</p>
          <p>K
m n
Given graphs G, H, I, and morphisms G −→ H and G −→ I as depicted
′ n′
in Fig. 4, a pushout is a tuple hJ, I −m→ J, H −→ Ji, in which J is a graph and
′ n′
morphisms I −m→ J and H −→ J satisfy the following conditions:
1. n′ ◦ m = m′ ◦ n, and
x y
2. For any graph K with morphisms H −→ K and I −→ K satisfying x ◦ m =
z
y ◦ n, there exists a unique J −→ K satisfying z ◦ n′ = x and z ◦ m′ = y.
m n
A transformation rule T , denoted by hP ←− K −→ Ri, consists of graphs
m n
P , K and R, and injective morphisms K −→ P and K −→ R. P is called the
pattern graph (or left-hand side). R is the replacement graph (or right-hand side).
K is the correspondence graph (or glue graph) that relates the vertices and edges
in the pattern and those in the replacement.</p>
          <p>P
p
I
m
In order to transform models using graph transformation, it is necessary to
categorize vertices and edges of different types. (Recall that three types of vertices
and two types of edges are used in Fig. 2.) It is also necessary to take into account
other attributes that further differentiate vertices, such as the ones that decide
whether a port is input port or output port. Therefore, we let A be a globally
defined attribute set, and extend the definition of graph G to be hVG, EG, AGi,
where AG : (VG ∪ EG) → 2A is a total function that returns a (possibly empty)
set of attributes for each vertex and edge.</p>
          <p>Our other definitions in the previous subsection remain unchanged, except
that the definition of graph morphism is enhanced next to take into consideration
the attributes.
We define a subset of attributes U ⊆ A to be unchecked attributes. It contains
attributes that need not be directly checked in the extended graph morphisms to
be defined below. A subset of unchecked attributes, C ⊆ U , is called criteria. Let
B be an auxiliary set that equals 2A × 2A. We require any criterion c ∈ C to be
an element in 2B. Given two vertices or edges x ∈ VG ∪EG and y ∈ VH ∪EH ,
we say that criterion c is satisfied by x matching y if AG(x), AH (y) ∈ c.</p>
          <p>We now extend the definition of graph morphism discussed in Sec. 2.2 to
become the following. An attributed graph morphism from graph G to H is a
graph morphism m : VG → VH satisfying the following additional conditions:
1. for any v ∈ VG,</p>
          <p>(a) ∀a ∈ AG(v) \ U . a ∈ AH (m(v))
(b) ∀c ∈ AG(v) ∩ C . AG(v), AH (m(v)) ∈ c
2. for any (v1, v2) ∈ EG,
(a) ∀a ∈ AG((v1, v2)) \ U . a ∈ AH ((m(v1), m(v2)))
(b) ∀c ∈ AG((v1, v2)) ∩ C . AG((v1, v2)), AH ((m(v1), m(v2))) ∈ c
Case (a) of the two conditions requires that all attributes belonging to a
vertex or edge in G, except the unchecked ones, be associated with the matched
vertex or edge in H. Therefore, the unchecked attributes of the latter form a
superset of those of the former. Case (b) of the two conditions ensures that the
criteria associated any vertex or edge in G be satisfied by the matching.</p>
          <p>Practically, for a transformation depicted in Fig. 5, only the graphs P and
R contain vertices and edges with criteria attributes. In particular, we call the
criteria in the replacement graph R operations, since they essentially enforce
restrictions on the output graph that may be satisfied by performing additional
attribute adding or removal operations. (In this discussion, we assume that those
criteria in R can be satisfied by adding or removing attributes in the output
graph O.)</p>
          <p>Notice that because of the criteria in P and R, it may not be possible to
apply transformation rule T to input graph I even if it is applicable in the sense
that the pattern P matches a subgraph of I.
2.5</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Basic Model Transformation</title>
          <p>The example in Fig. 2 shows a way to represent a model with an attributed graph.
In the attributed graph, three special attributes are assigned to the vertices to
distinguish their types: Actor (visually represented by big circles), Port (small
hollow circles) and Relation (filled dots). Two additional attributes identify the
types of the edges: Containment (dashed lines) and Connection (solid lines). The
names of the vertices are unchecked attributes that are unique at each level of
the hierarchy of a transformation rule. Names at different levels may be identical.</p>
          <p>Input Model
Transformation</p>
          <p>Rule</p>
          <p>Model-to-graph</p>
          <p>Conversion
Model-to-graph</p>
          <p>Conversion</p>
          <p>Graph
Transformation</p>
          <p>Graph-to-model</p>
          <p>Conversion</p>
          <p>Output Model</p>
          <p>Using the graph representation, we establish a basic model transformation
process as shown in Fig. 6. The inputs to the process consist of an input model
and a transformation rule, both specified in the modeling language. (Fig. 1 and
Fig. 3 provide examples of both in this language.) The two inputs are then
converted into attributed graphs. To convert a model into an attributed graph,
a vertex is created for each actor, port or relation, and an edge is created for
each connection or containment relation. (We use two reversed edges with the
same attributes to simulate an undirected edge in Fig. 2.)</p>
          <p>The transformation rule is converted into multiple graphs. Its pattern and
replacement contain model fragments and are converted into the P graph and the
R graph in Fig. 5. The correspondence table simplifies the specification of the K
graph. Its “Pattern” column shows the names of the actors in the pattern. (For
clearer presentation, we hide the vertices corresponding to ports and relations as
well as all edges.) For a hierarchical transformation rule, the names may contain
parts separated by dots, referring to the unique identifiers at different levels.
The “Replacement” column shows the names of the corresponding actors in the
replacement. There is a one-to-one relationship between entries in both columns.
Conceptually the conversion process computes a subgraph of P as K, such that
K contains only vertices listed in the “Pattern” column. The one-to-one nature
ensures that a subgraph exists in R that is isomorphic to this selection of K.</p>
          <p>After the conversion, graph transformation can be applied. The
transformation result is converted back into a model for output.
3</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Model-Based Transformation</title>
      <p>Basic transformations are limited in expressiveness. To locate a match in the
input model, a subgraph isomorphic problem needs to be solved, which is known
to be NP-hard. This complexity restricts the size of patterns that can be used
in practice. Furthermore, because a basic transformation is context-free, it can
only operate on a subgraph matched by the pattern each time, regardless of the
rest of the graph.</p>
      <p>To enhance expressiveness, a common practice is to employ an additional
mechanism to control multiple applications of basic transformations. In our work,
we leverage the heterogeneous models of computation provided by Ptolemy. We
allow transformation designers to create higher-order models as compositions
of basic transformations. Those basic transformations in the higher-order model
operate on models that are considered as first-class objects. The output of a basic
transformation can be passed to the next one via its output port. The
communication is governed by the model of computation used. We call such a higher-order
model a model-based transformation, as opposed to basic transformations that
do no involve any control mechanism.
3.1</p>
      <sec id="sec-3-1">
        <title>TransformationRule Actor</title>
        <p>We consider any basic transformation T as a function FT : G → G, where G is
the set of all graph representations of models. For any input graph I ∈ G, if T
is applicable to I, FT returns the output graph obtained by applying T to I;
otherwise, FT simply returns I. We then define the TransformationRule actor
as a pure functional actor that computes FT . It has a single input port and
two output ports. The input port accepts actor tokens, which contain models to
be transformed. Its first output port sends the transformation results obtained
by applying FT to the inputs. Its second output port (visually shown at the
bottom of the actor’s icon) produces true or false values, which signify whether
the transformation was applicable for those inputs.</p>
        <p>When the TransformationRule actor is opened in the Ptolemy II GUI
(Graphical User Interface), an interface appears to allow the designer to edit the basic
transformation that this actor contains. This interface has a tab for each of
the three components, as is shown in Fig. 3. (For better usability, the
correspondence table is automatically maintained by the tool unless the designers
explicitly specify it.)
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>A Library of Actors for Model-Based Transformation</title>
        <p>In addition to TransformationRule, we have created other actors in an actor
library for model-based transformation.</p>
        <p>ModelGenerator is used to generate initial actor tokens. It has different
usages. If an input string containing the description of a model in the Modeling
Markup Language (MoML) is provided, it parses the string and sends the model
via its output port. If only a model name is provided, it creates an empty model
with the given name.</p>
        <p>ModelCombine accepts multiple input models at each time. It merges those
models and outputs a combined model. Suppose the n input models are
represented with graphs G1, G2, · · · , Gn, then the output model can be represented
with G = hVG, EG, AGi, where VG, EG and AG are the disjoint unions of the
vertex sets, edge sets and attribute functions (considered as sets of argument-value
pairs) of the input graphs. We take an extra step after the merging to update
the name attributes so that they are unique at each level of the resulting model.</p>
        <p>ModelView displays the input models in a separate window. It updates the
window when a new actor token is received. After displaying the model in the
actor token, it sends the token to downstream actors via its output port.</p>
        <p>ModelExecutor executes the input models to completion. Inputs can be
provided to the models being executed via user-customized input ports of
ModelExecutor. The tokens available at those input ports are automatically
transmitted to the input ports with the same names of the executed models that
have the same names. Outputs from the models are also transmitted to the
user-customized output ports.</p>
        <p>MoMLGenerator exports the input models in the Modeling Markup
Language (MoML). The exported strings can be written into files by FileWriter.
3.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Applications</title>
        <p>
          There is a large variety of applications for model-based transformation. We
sketch some of them here. A concrete example of the model construction
application will be discussed in the next section.
– Model construction. ModelGenerator can be used to generate empty
models, which are first-class objects manipulated by a higher-order model (the
one that contains the ModelGenerator). Arbitrary models can thus be
constructed by modifying empty models with transformations. The constructed
models can be executed by ModelExecutor on the fly, or be stored in files
by MoMLGenerator and FileWriter.
– Model optimization. When appropriate information about model behavior
is provided, model transformation can be used to optimize existing models
while preserving their behavior. One example is to partially evaluate a given
model by eliminating the parts of computation logic that output signals that
can be computed statically. The validity is based on the information about
whether the actors’ outputs are constant, or how actors’ outputs depend on
their inputs. This information may be provided in the actors’ behavioral
interface [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], or be obtained with a static analysis of the code that implements
the actors.
– Design refactoring. Refactoring also preserves model behavior. It usually
aims to improve model designs for better understandability or easier
maintenance. Take hierarchy flattening as an example. For some models, hierarchy
may be eliminated by moving actors to higher levels. An opposite operation
is to introduce extra levels to the hierarchy by encapsulating actors, which
helps clarify the design and protect the encapsulated parts.
– Structural parametrization. Models can be parametrized with placeholders
defined in their structures. Model transformations can be used to
configure those placeholders to form complete models. Compared to value-based
parametrization, structural parametrization is a generalization that
provides more design flexibility and reuse opportunity. Furthermore, one can
construct a class hierarchy for models, where models at each level (except
the root level) are variants obtained from structurally parametrizing some
models at a higher level. Formal checking, using for example interface
automata [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], can be incorporated to guarantee behavioral properties. This
leads to an actor-oriented subclassing mechanism that generalizes the work
in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
– Execution parallelization. Using a model of computation that provides
concurrency, multiple models can be executed in parallel with ModelExecutors.
Those models can communicate with each other via the user-customized
input ports and output ports of the ModelExecutors. This makes it possible
to simulate a distributed system, where the models are executed on separate
computers and communicate with each other.
– Workflow automation. Model-based transformation can also be used to
automate tasks in the model development workflow. Those tasks include
component configuration and composition, version control, and regression testing.
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>MapReduce Example</title>
      <p>In this section we discuss a parametrized higher-order model that generates a
MapReduce model and executes it. Fig. 7 shows part of the hierarchy of this
higher-order model. A parameter at the top level, numberOfMachines, defines
the preferred number of worker machines, which can be set by the user. For
simulation, we use a FileReader to read the documents from disk and to output
them in tokens via the upper output port. The lower output port produces true
when all documents are sent, or false otherwise. When it outputs false, the
document tokens are queued in the buffer for the ModelExecutor’s upper-left input
port. When it outputs true, the Switch sends a token to the CreateMapReduce
actor, triggering it to generate a MapReduce model in an actor token. (Fig. 1
shows the MapReduce model generated when numberOfMachines equals 5.) The
model is then sent to the ModelExecutor for immediate execution. The buffered
documents are provided to the model as inputs at its “document” input port,
and its outputs to the “result” output port are automatically transmitted to the
Display actor connected to the ModelExecutor’s output port.
(a) Pattern (empty)</p>
      <p>(b) Replacement
1</p>
      <sec id="sec-4-1">
        <title>Pattern Replacement (empty) (c) Correspondence</title>
        <p>The CreateMapReduce actor contains an SDF (Synchronous Dataflow) model
that controls several TransformationRule actors (each represented with a
yolklike icon surrounded by a box). mapCount is defined to be the number of Map
machines, and reduceCount is the number of Reduce machines. Fig. 8 shows
the transformation rules in the CreateSplit actor. It creates a Split actor and a
Merge actor, together with the input ports and output port of the MapReduce
model. Its pattern is deliberately made empty so that the transformation rule is
applicable to the empty model generated by the ModelGenerator. In Fig. 3, we
have shown the transformation rule in the LinkMapAndReduce actor. It
connects the ports of an arbitrary Map actor and an arbitrary Reduce actor, with
a constraint to make sure that no duplicated connections are made in
multiple applications of the same transformation rule. We set a special parameter,
which is not shown in the interface, so that the transformation is applied
exactly (mapCount × reduceCount) times for each input model, so that all the Map
actors and Reduce actors in it are interconnected.</p>
        <p>This example shows how we use model transformation as a tool to construct
a complex model. The size of the dynamically generated model is parametrizable
with an integer parameter, and has no impact on the size of the higher-order
model that the designer manually creates. Each TransformationRule actor can
be separately designed, documented and maintained. It can also be parametrized
and reused to construct other models.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Related Work</title>
      <p>
        Model transformation has been under active research in recent years. In
recognition of the public interest, the OMG (Object Management Group) has issued
a request for proposal (RFP) on MOF (Meta-Object Facility) QVT (Query /
Views / Transformations) to seek a standardized approach to model
transformation [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        Besides our model transformation tool developed in the Ptolemy II
framework, existing tools include AGG [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], PROGRES [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], AToM3 [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], FUJABA [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ],
VIATRA2 [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], and GReAT [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. Among those, our tool is the only one that
supports a large and extensible collection of MoCs for controlling basic
transformations. By carefully choosing MoCs, sequential transformation and parallel
transformation can be achieved, as well as a mixture of both. This control
mechanism is more flexible than the priority-based control provided by AGG and
AToM3, the imperative program control implemented in PROGRES, and the
restricted selection of MoCs that the other tools offer. Furthermore, our model
transformation tool provides a user-friendly language for transformation
specification. It employs the same visual language as that used for manually creating
models. This frees designers from learning another language for specifying
transformations (such as a textual language and UML class diagrams), understanding
the meta-models of their models, and describing their transformations in terms of
the meta-models. Higher-order model composition for embedded system design
is proposed in [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] and [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Compared to other related approaches in this field,
such as Ptalon [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and higher-order Petri nets [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ], our model-based
transformation approach allows designers to visually describe pieces of model structures and
to transform them step by step. Besides, our model descriptions are themselves
hierarchical heterogeneous models, which can be divided into parametrized
components for reuse. Therefore, not only the models constructed by the descriptions
can easily scale to large sizes, the descriptions themselves are also scalable.
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>We present our approach to higher-order model composition based on model
transformation. We provide a formal definition of graph transformation, which
serves as the basis of our model transformation technique. We show that basic
transformations can be used as actors in a hierarchical heterogeneous models.
Our approach makes it easy to create complex transformations as composition
of basic ones. We provide a word-counting model designed using the MapReduce
programming pattern as a concrete example.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Goderis</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brooks</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Altintas</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>E.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Goble</surname>
            ,
            <given-names>C.A.</given-names>
          </string-name>
          :
          <article-title>Composing different models of computation in Kepler and Ptolemy II</article-title>
          .
          <source>In: International Conference on Computational Science (ICCS)</source>
          , Beijing, China (
          <year>2007</year>
          )
          <fpage>182</fpage>
          -
          <lpage>190</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Dean</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghemawat</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>MapReduce: Simplified data processing on large clusters</article-title>
          .
          <source>In: Operating Systems Design and Implementation</source>
          (OSDI), San Francisco, California, USA (
          <year>2004</year>
          )
          <fpage>137</fpage>
          -
          <lpage>150</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Eker</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Janneck</surname>
            ,
            <given-names>J.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>E.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ludvig</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neuendorffer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sachs</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Taming heterogeneity - the Ptolemy approach</article-title>
          .
          <source>Proceedings of the IEEE 91(2)</source>
          (
          <year>2003</year>
          )
          <fpage>127</fpage>
          -
          <lpage>144</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Cataldo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cheong</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Feng</surname>
            ,
            <given-names>T.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>E.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mihal</surname>
            ,
            <given-names>A.C.</given-names>
          </string-name>
          :
          <article-title>A formalism for higher-order composition languages that satisfies the Church-Rosser property</article-title>
          .
          <source>Technical Report UCB/EECS-2006-48</source>
          , EECS Department, University of California, Berkeley (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Cataldo</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          :
          <article-title>The Power of Higher-Order Composition Languages in System Design</article-title>
          .
          <source>PhD thesis</source>
          , EECS Department, University of California, Berkeley (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. K¨onigs, A.:
          <article-title>Model transformation with triple graph grammars</article-title>
          .
          <source>In: Model Transformations in Practice Workshop</source>
          . (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. Schu¨rr, A.:
          <article-title>Specification of graph translators with triple graph grammars</article-title>
          .
          <source>In: WG '94: Proceedings of the 20th International Workshop on Graph-Theoretic Concepts in Computer Science</source>
          , Springer-Verlag (
          <year>1994</year>
          )
          <fpage>151</fpage>
          -
          <lpage>163</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Ehrig</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pfender</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schneider</surname>
            ,
            <given-names>H.J.</given-names>
          </string-name>
          :
          <article-title>Graph-grammars: An algebraic approach</article-title>
          .
          <source>In: Annual Symposium on Foundations of Computer Science (FOCS)</source>
          .
          <article-title>(</article-title>
          <year>1973</year>
          )
          <fpage>167</fpage>
          -
          <lpage>180</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Habel</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Mu¨ller, J.,
          <string-name>
            <surname>Plump</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Double-pushout graph transformation revisited</article-title>
          .
          <source>Mathematical. Structures in Comp. Sci</source>
          .
          <volume>11</volume>
          (
          <issue>5</issue>
          ) (
          <year>2001</year>
          )
          <fpage>637</fpage>
          -
          <lpage>688</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>E.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xiong</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>A behavioral type system and its application in Ptolemy II</article-title>
          .
          <source>Formal Aspects of Computing</source>
          <volume>16</volume>
          (
          <issue>3</issue>
          ) (
          <year>2004</year>
          )
          <fpage>210</fpage>
          -
          <lpage>237</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>de Alfaro</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Henzinger</surname>
          </string-name>
          , T.A.:
          <article-title>Interface automata</article-title>
          .
          <source>ACM SIGSOFT Software Engineering Notes</source>
          <volume>26</volume>
          (
          <issue>5</issue>
          ) (
          <year>2001</year>
          )
          <fpage>109</fpage>
          -
          <lpage>120</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>E.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neuendorffer</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Classes and inheritance in actor-oriented design</article-title>
          .
          <source>ACM Transactions on Embedded Computing Systems</source>
          (TECS) to appear (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. Object Management Group (OMG):
          <article-title>Request for proposal: MOF 2</article-title>
          .0 Query / Views / Transformations RFP (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Taentzer</surname>
          </string-name>
          , G.:
          <article-title>AGG: A tool enviroment for algebraic graph transformation</article-title>
          .
          <source>In: Proceedings of Applications of Graph Transformations with Industrial Relevance (AGTIVE)</source>
          , Kerkrade, The
          <string-name>
            <surname>Netherlands</surname>
          </string-name>
          (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. Schu¨rr,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Winter</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.J.</surname>
          </string-name>
          , Zu¨ndorf, A.:
          <article-title>Graph grammar engineering with PROGRES</article-title>
          .
          <source>In: Proceedings of the 5th European Software Engineering Conference</source>
          , Sitges, Spain (
          <year>1995</year>
          )
          <fpage>219</fpage>
          -
          <lpage>234</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Lara</surname>
          </string-name>
          , J.d.,
          <string-name>
            <surname>Vangheluwe</surname>
          </string-name>
          , H.:
          <article-title>AToM3: A tool for multi-formalism and metamodelling</article-title>
          .
          <source>In: FASE '02: Proceedings of the 5th International Conference on Fundamental Approaches</source>
          to Software Engineering, Grenoble, France (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Nickel</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Niere</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Zu¨ndorf, A.:
          <article-title>The FUJABA environment</article-title>
          .
          <source>In: ICSE '00: Proceedings of the 22nd International Conference on Software Engineering</source>
          , Limerick, Ireland (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Balogh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Varr´o,
          <string-name>
            <surname>D.</surname>
          </string-name>
          :
          <article-title>Advanced model transformation language constructs in the VIATRA2 framework</article-title>
          .
          <source>In: SAC '06: Proceedings of the 2006 ACM symposium on Applied computing</source>
          , Esslingen, Germany (
          <year>2006</year>
          )
          <fpage>1280</fpage>
          -
          <lpage>1287</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Agrawal</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Karsai</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>A UML-based graph transformation approach for implementing domain-specific model transformations</article-title>
          .
          <source>International Journal on Software and Systems Modeling</source>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Reekie</surname>
            ,
            <given-names>H.J.: Realtime</given-names>
          </string-name>
          <string-name>
            <surname>Signal Processing - Dataflow</surname>
          </string-name>
          , Visual, and Functional Programming.
          <source>PhD thesis</source>
          , University of Technology at Sydney (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21. Cola¸co,
          <string-name>
            <given-names>J.L.</given-names>
            ,
            <surname>Girault</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Hamon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Pouzet</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Towards a higher-order synchronous data-flow language</article-title>
          .
          <source>In: EMSOFT '04: Proceedings of the 4th ACM international conference on Embedded software</source>
          , New York, NY, USA, ACM Press (
          <year>2004</year>
          )
          <fpage>230</fpage>
          -
          <lpage>239</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Janneck</surname>
            ,
            <given-names>J.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Esser</surname>
          </string-name>
          , R.:
          <article-title>Higher-order Petri net modeling - techniques and applications</article-title>
          . In: Workshop on Software Engineering and
          <string-name>
            <surname>Formal Methods.</surname>
          </string-name>
          (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>