Main Page/Resources/Wires*/QuickGuide

From Atenea

Jump to: navigation, search

Contents

Introduction to the Wires* Language

Wires* is a graphical executable language for orchestrating ATL transformations. Basically, Wires* assumes a dataflow process, in which a set of input models (conforming to their corresponding metamodels) are processed by a chain of ATL transformations until a set of output models is produced. The chain is composed of transformations, which act as processing nodes. Parameters represent the consumed and produced data by transformations. Transformations are wired together by directed connectors (called Dataflows or, simply, Wires) that indicate how the outputs of the transformations are linked to the inputs of the next ones.

The following sections describe the main concepts of the language and the graphical editor with more detail.

Palette Types

This palette shows all the types that you can use to specify a Wires* model. The type definition allows you to reuse the type later, defining more than one instance conforming to the type.

Image:paleta.gif

Palette Elements

This palette shows all the elements that you can use to specify a Wires* model. Normally, one element conforms to one type.

Image:paletaElements.gif

Creating a Model Type (Metamodel)

The two following figures show how specify a metamodel. First, draw a model type using the types palette, secondly, edit the properties using the properties view, giving a name and the metamodel path or the metamodel uri to the model type.

Image:Metamodel.gif

Image:Mproperties.gif



Creating a Model

The following figures show how to specify a model. First, draw a model using the types palette, secondly, edit the model properties using the properties view giving a name, a path and the type of the model (metamodel which it conforms to). If the model you want to specify is an input model, then select the model file, filling the path property, else if the model is an output model manually fill the path property typing the workspace relative path where the model will be created.

Image:Model.gif

Image:modelProperties.gif

Creating an AtomicModelTransfType and QueryType

The next figures show how to specify an AtomicModelTransfType and a QueryType. An AtomicModelTransfType represents an ATL transformation and a QueryType represents an ATL query. The fist step is to draw the Type using the types palette, later in the properties view give a name to the type and select the ATL file where the transformation (or the query) is stored. Normally the Wires* tool will create the input and the output formal parameters when you select the ATL transformation file, however check that all the parameters properties were filled in the right way. You also can define the formal parameters manually using the types palette and filling the Name, TypeEl and TypeName properties in the properties view. In the TypeEl property select the ModelType which the input (or output) model should conforms to.

Image:TransfDivtype.gif

Image:divideType.gif

Image:inDivType.gif

Image:outDivType.gif

Creating an AtomicModelTransf and Query

The next figures show how to specify an AtomicModelTransf or a Query element. First, draw the element using the elements palette, later in the properties view give a name and select the type (AtomicModelTransfType or QueryType). The actual parameters are automatically created when the type property is selected.

Image:Transformacion.gif

Image:transformacionPropiedades.gif

Image:transfIn.gif

Image:transfOut.gif

Creating a BasicData

To create a BasicData, draw the basic data using the elements palette and give a name, a path and a type to the element using the properties view. A BasicData represents a typed basic data. The allowed types are Integer, Boolean and String. The BasicData element is used to store a query output in a text file.

Image:BasicDataType.gif

Image:BasicDataTypeProperties.gif

Creating a DecisionNode

A DecisionNode is an element whose input parameters are the outputs of Queries (i.e., primitive data types), and that contains an OCL expression that will be evaluated to decide which one of its two branches (trueBranch or falseBranch) is enabled. In Wires* every transformation can be connected to a DecisionNode using trueBranch or a falseBranch. If unconnected, the transformation will always be enabled. When connected to a DecisionNode, the transformation will be enabled only if the corresponding branch is activated after evaluating the DecisionNode expression.

To create a DecisionNode, draw it using the element palette filling the expression property in the properties view. The DecisionNode expression could use the DecisionNode input parameters names as variables.

Image:decisionNode.gif

Image:decisionNodeProperties.gif

Image:inX.gif

Creating an IdentityTransformation

To create an IdentityTransformation you can use the elements palette. An IdentityTransformation is normally used to stop the data flow if a condition is not satisfied. It's possible to connect a trueBranch or a flaseBranch from a DecisionNode to the identity transformation being able to control the transformation chain data flow. An IdentityTransformation does nothing, just let the data flows, joining its input with its output parameters. To join one input with one ouput parameter just keep them with the same name.

Image:identity.gif

Image:identityProperties.gif

Image:inId.gif

Creating a Data Flow

The DataFlow element joins the Wires* elements together specifying the transformation chain.

Image:dataflow.JPG


Creating a GenericTransformation

Generic transformation are those used to load and execute ATL transformations produced by high-order transformations (those whose output is another transformation). They have a special input parameter (typeParam) that should conforms to the ATL metamodel.

To create a generic transformation use the elements palette and give a name and a type (AtomicModelTransformationType) to the transformation. The Wires* engine will extract the ATL code from the input ATL model in the TypeParam creating the ATL file in the path property from the genericTransformation type.

Image:generic.gif

Image:properties.gif

Creating a Library

To create a library use the types palette, give a name to the library, and select the library path. Sometimes libraries includes other libraries, to model that specify a library ref filling the name property and selecting the refered library in the properties view. For those transformations whose use libraries you can also define LibraryRef pins.

Image:library.gif

Image:libraryProperties.gif

Image:libraryRefProperties.gif

Creating a CompositeTransfType

Composite transformations represent chains of transformations which can be later used as a single (atomic) transformation, i.e., as building blocks to specify further transformations.

To create a CompositeTransfType use the types palette and draw inside a transformation chain. Also define input and output formal parameters. Image:composite.JPG

Creating a CompositeTransf

Draw a CompositeTransf and select the CompositeTransfType as its type. Now you can use the defined transformation chain as a single transformation.


Image:comptransf.JPG

Personal tools