ATL Basic Examples and Patterns
This section provides a set of basic examples and patterns.
Families to Persons
February 2007
This presentation describes a very simple model transformation example, some kind of ATL “hello world”.
ATL concepts encountered: Header section, Helper functions, Matched rules
Additional concepts encountered: Metamodel and conformance relation, ATL IDE (ADT)
Presentation Families to Persons
February 2007
by Freddy Allilaire, Frédéric Jouault (INRIA)Source code Families to Persons
February 2007
by Freddy Allilaire, Frédéric Jouault (INRIA)
Tree to List
July 2007
This transformation presents a basic example where a tree is transformed into a list. This kind of transformation is usually made by an imperative Depth First Traversal algorithm.
ATL concepts encountered: Matched rules (one with a guard), Helper functions (one being recursive), Collection related functions, Enumeration, and ATL resolve algorithm.
Article Tree to List
July 2007
by Cyril Faure (C-S), Freddy Allilaire (INRIA)Source code Tree to List
July 2007 by Cyril Faure (C-S), Freddy Allilaire (INRIA)
List Metamodel Refactoring
December 2007
In this example, we present some basic concepts of ATL through a simple use case. Our working context is the creation of a bridge between two different versions of a List metamodel (A and B). This bridge consists on an ATL transformation from the version A to the version B.
ATL concepts encountered: Automatic traceability support in ATL, Handling collection, and String operation.
Article List Metamodel Refactoring
December 2007
by Cyril Faure (C-S), Freddy Allilaire (INRIA)Source code List Metamodel Refactoring
December 2007
by Cyril Faure (C-S), Freddy Allilaire (INRIA)
Port
January 2008
In this example, we present some basic concepts of ATL through a simple use case. This use case deals with situations where the source element meta type could not be simply matched with the target meta type. The only way to resolve the target meta type is to browse source model.
ATL concepts encountered: Matched rules and lazy (matched) rules, Avoiding some imperative constructs, and Code optimization.
Article Port
January 2008
by Cyril Faure (C-S), Freddy Allilaire (INRIA)Source code Port
January 2008
by Cyril Faure (C-S), Freddy Allilaire (INRIA)
Side Effect
January 2008
This case deals with the way to handle side effects induced while transforming an element. We will start from an imperative algorithm to create a transformation between two metamodels. This algorithm will introduce a side effect problem. After several iteration a solution will be provided following ATL philosophy.
ATL concepts encountered: ATL imperative parts for dealing with complex situation, and Chain of ATL transformations to divide transformation complexity and to avoid imperative parts.
Article Side Effect
January 2008
by Cyril Faure (C-S), Freddy Allilaire (INRIA)Source code Side Effect
January 2008
by Cyril Faure (C-S), Freddy Allilaire (INRIA)