Glossary
- Abstract Syntax
- Abstraction
- Behavioral Modeling
- Blended Modeling
- Code Generation
- Concrete Syntax
- Constraints
- Domain-Specific Language (DSL)
- EMF/Ecore
- Executable Model
- Executable UML (xUML)
- Flexible Modeling
- Metamodel
- Meta Object Facility (MOF)
- Metamodeling Language
- Model-Driven Architecture (MDA)
- Model Transformation
- Model Validation
- Model Simulation
- Multi-view Modeling
- Platform-Independent Model (PIM)
- Platform-Specific Model (PSM)
- Positional Notation
- Projectional Editing
- Refactoring
- Refinement
- Round-Trip Engineering
- Syntactic Sugar
- Topological Notation
- Traceability
- Transformation Language
- Unified Modeling Language (UML)
- Viewpoint
- Workbench
- Team & Partners
- Video Tutorials
- Privacy Policy
- Cookie Policy
- Single Page (eg Policy)
- Teaching
- User Guide
- Cloud & Reactiveness
- What’s new
- Higher Visual Capabilities
- Real-time Collaboration
- LSP/GLSP vs. Jjodel
- EMF vs. Jjolde
- Jjodel Cookbool
- Co-Evolution Capabilities in Jjodel, EMF/Sirius, and MetaEdit+
- Where Jjodel is adopted?
- Student Survey
- Roadmap
- JSX for Model Navigation
- Abstract Syntax
- Abstraction
- Behavioral Modeling
- Blended Modeling
- Code Generation
- Concrete Syntax
- Constraints
- Domain-Specific Language (DSL)
- EMF/Ecore
- Executable Model
- Executable UML (xUML)
- Flexible Modeling
- Metamodel
- Meta Object Facility (MOF)
- Metamodeling Language
- Model-Driven Architecture (MDA)
- Model Transformation
- Model Validation
- Model Simulation
- Multi-view Modeling
- Platform-Independent Model (PIM)
- Platform-Specific Model (PSM)
- Positional Notation
- Projectional Editing
- Refactoring
- Refinement
- Round-Trip Engineering
- Syntactic Sugar
- Topological Notation
- Traceability
- Transformation Language
- Unified Modeling Language (UML)
- Viewpoint
- Workbench
- Team & Partners
- Video Tutorials
- Privacy Policy
- Cookie Policy
- Single Page (eg Policy)
- Teaching
- User Guide
- Cloud & Reactiveness
- What’s new
- Higher Visual Capabilities
- Real-time Collaboration
- LSP/GLSP vs. Jjodel
- EMF vs. Jjolde
- Jjodel Cookbool
- Co-Evolution Capabilities in Jjodel, EMF/Sirius, and MetaEdit+
- Where Jjodel is adopted?
- Student Survey
- Roadmap
- JSX for Model Navigation
Transformation Languages
Transformation languages are specialized programming languages or tools used in Model-Driven Engineering (MDE) to define and execute transformations that convert one model into another or transform models into code. They facilitate the automated conversion of models at different abstraction levels, adapting models for various stages of development or different platforms. Transformation languages play a central role in MDE by enabling efficient model evolution, consistency, and adaptability across multiple domains and stages of system development.
Types of Model Transformations
- Model-to-Model (M2M) Transformations: Convert a source model into a target model, often moving between abstraction levels or adapting a model for a specific platform. For example, a high-level Platform-Independent Model (PIM) can be transformed into a Platform-Specific Model (PSM) that incorporates platform details.
- Model-to-Text (M2T) Transformations: Generate textual artifacts from models, such as source code, documentation, or configuration files. This process is often used to generate executable code from models automatically.
Popular Transformation Languages
- QVT (Query/View/Transformation): A standardized set of languages defined by the Object Management Group (OMG) specifically for M2M transformations. QVT includes different dialects:
-
- QVT Core: A low-level language suitable for more detailed transformations.
- QVT Relations: A high-level, declarative language ideal for defining relationships between elements in source and target models.
- QVT Operational: An imperative approach within QVT for more complex, sequential transformations.
- ATL (Atlas Transformation Language): An open-source, model-to-model transformation language developed within the Eclipse ecosystem. ATL is primarily used with the Eclipse Modeling Framework (EMF) and offers a mix of declarative and imperative constructs, making it flexible for complex transformations.
- ETL (Epsilon Transformation Language): Part of the Epsilon platform, ETL is a general-purpose M2M transformation language that supports both declarative and imperative styles. It is known for its flexibility and extensibility in supporting transformations between heterogeneous modeling languages.
- Acceleo: A popular model-to-text transformation language based on the MOFM2T (Model-to-Text) standard by OMG. Acceleo is used to generate source code or documentation from models, often within the EMF environment.
- Xtend: A language that supports M2T transformations within the Java ecosystem. Xtend provides a concise syntax and powerful templating capabilities for generating Java code from models.
- Graph Transformation Languages: For domains that focus heavily on graph-based models, graph transformation languages (e.g., AGG or Groove) are used to define transformations as graph rewriting rules, especially useful for domains like network modeling or circuit design.
Characteristics of Transformation Languages
- Declarative vs. Imperative:
-
- Declarative Transformation Languages: Define “what” should be transformed without specifying “how.” Declarative languages (like QVT Relations and ATL’s declarative features) are generally more concise and suited to simpler, rule-based transformations.
Imperative Transformation Languages: Specify the exact steps of the transformation process, allowing more complex transformations. Imperative languages (like QVT Operational or ATL’s imperative features) provide finer control over the transformation process.
- Declarative Transformation Languages: Define “what” should be transformed without specifying “how.” Declarative languages (like QVT Relations and ATL’s declarative features) are generally more concise and suited to simpler, rule-based transformations.
- Rule-Based: Most transformation languages are rule-based, meaning that they use transformation rules to map elements in the source model to elements in the target model. Each rule specifies conditions and patterns that dictate how transformations are applied.
- Execution Control: Many transformation languages offer constructs for controlling the order and flow of transformations, such as loops, conditional execution, and sequencing, especially in imperative languages.
- Metamodel Awareness: Transformation languages are metamodel-aware, meaning they rely on the metamodels of the source and target models to understand the structure, syntax, and constraints, ensuring transformations produce valid models.
Applications of Transformation Languages in MDE
- Platform Adaptation: Transformation languages convert high-level, platform-independent models into platform-specific models by adding platform details, such as specific libraries or configurations, thus preparing models for deployment.
- Code Generation: M2T transformation languages like Acceleo generate executable code from high-level models. This supports rapid application development, as developers can focus on modeling rather than hand-coding each detail.
- Model Refinement: Refinement transformations allow iterative development by progressively adding detail to models. For example, an abstract workflow model can be refined into a more detailed operational model as requirements evolve.
- Consistency and Synchronization: In multi-view modeling environments, transformations synchronize models that represent different views or perspectives, ensuring consistency across models.
- Reverse Engineering: Some transformation languages support reverse transformations, where source code or low-level models are transformed back into higher-level models, making it easier to understand or refactor legacy systems.
Example of Using a Transformation Language
Suppose a team is working on an automotive application and begins with a UML-based high-level model of the vehicle control system. Using ATL (Atlas Transformation Language), they define rules to transform this UML model into a platform-specific model for a specific embedded platform. The transformation rules map UML classes to embedded C++ classes, converting UML associations into pointer references as per the embedded platform’s requirements. This PSM can then be transformed into actual C++ code using a model-to-text language like Acceleo.
Tools Supporting Transformation Languages
Several tools provide environments for working with transformation languages:
- Eclipse Modeling Framework (EMF): A core platform for model transformations in MDE, compatible with ATL, Acceleo, and other Eclipse-based tools.
- Modelio: A modeling tool that supports MDA transformations and allows for customization of transformations via QVT.
- MagicDraw and Cameo: Often used for UML-based modeling with QVT and other transformation plugins.
- Epsilon Platform: An Eclipse-based platform that includes ETL and a suite of related languages for model management and transformation.
Summary
Transformation languages are essential tools in Model-Driven Engineering, allowing for the automated conversion and adaptation of models across different levels of abstraction, platforms, or representations. By enabling Model-to-Model (M2M) and Model-to-Text (M2T) transformations, these languages streamline development processes, ensure model consistency, and support automation throughout the software lifecycle.