Model transformations (MT) play a key role in the Model Driven Engineering (MDE) paradigm, leading to the standardization of the Query/View/Transformation (QVT) model transformation language by the Object Management Group (OMG). Until now, however, this language did not attract the same interest as the Unified Modeling Language (UML), because of the lack of adequate debugging facilities which are necessary regarding the following three problem areas: First, declarative languages like QVT Relations (QVT-R) hides the operational semantics of transformations. Only the information provided by the interpreter, as well as the tendered inputs and returned outputs are available for tracking the progress of transformations. Furthermore, the ordering of transformation application is hidden by the MT engines providing only a black-boxes view to the users. This can lead to the problem of impedance mismatches between design and runtime. These characteristics of QVT-R are assets for developing, but are handicaps for debugging. Second, QVT-R code is specified on higher abstraction level than its execution and state-of-the-art debugging. This deteriorates the ability to deduce causes from produced results. Third, the information content responsible for operating MTs is spread over several artifacts including the input model, a resulting target model and the QVT-R code. As a consequence, the reasons for a particular outcome are hard to be derived from the involved artifacts. This severely harms the ease of debugging.
Therefore, this master thesis tackles the mentioned problems by visualizing QVT-R as Transformations Nets, using the MT framework “Transformations On Petri Nets In Color” (TROPIC) based on Colored Petri Nets (CPN). This can be seen as explicit definition of operational semantics on a high abstraction level providing a white-box view for debugging QVT-R. This thesis proposes a procedure model formulated in a conceptual approach and in a prototypic implementation striving for bridging the existing gap between these two different paradigms by mapping the concepts of QVT Relations to such nets. In this thesis three particular contributions are provided: (i) a solution approach for unidirectional mappings producing target models from an existing source model, (ii) the support for model inheritance, (iii) and synchronization approaches for timely and version-based incremental changes.
Table of Contents
1. Introduction
1.1. Motivation
1.2. Problem Statement
1.3. Solution
1.4. Structure of the Thesis
2. Model Transformation Fundamentals
2.1. Model Driven Engineering
2.2. Model Transformation
3. Model Transformation Technologies
3.1. Query/View/Transformations (QVT)
3.1.1. QVT Relations (QVT-R)
3.2. Transformation On Petri Nets In Color (TROPIC)
3.2.1. Core concepts of TROPIC
3.3. Comparison of QVT Relations and TROPIC at a glance
4. Transforming QVT Relations to TROPIC
4.1. Overview
4.1.1. Execution Semantics of QVT-R
4.2. Types
4.2.1. Domains
4.2.2. Primitive Domains
4.2.3. Primitive types
4.2.4. Complex types
4.3. Relationships
4.4. Dependencies
4.4.1. Where- and When-Clauses
4.4.2. Hierarchical Data Passing
4.5. Finding Correspondence of Source and Target Objects
4.5.1. Heavyweight Approach
4.5.2. Lightweight Approach
4.6. Realization of Correspondences
4.6.1. Transition “Owners”
4.6.2. Relationships
4.6.3. Referred Relations
4.7. Complexity and Effort
5. Supporting Advanced Features of QVT Relations
5.1. Inheritance
5.2. Incremental Changes
5.2.1. Introduction
5.2.2. Model Synchronization
5.3. Summary
6. Realization
6.1. Environments
6.1.1. Eclipse and its Plugins
6.1.2. QVT-R Parser
6.2. Implementation Specifics
6.2.1. Data Types
6.2.2. Information Encapsulation
6.2.3. Class Structure
6.3. Execution Process
6.3.1. Course of Execution
6.3.2. Managing Flow Information
6.3.3. Managing colours in TROPIC
6.3.4. Adding Model Information
6.3.5. Element Arrangement
6.4. Summary
7. Evaluation
7.1. Capability of Erroneous Code Recognition
7.1.1. Pitfall Detection
7.2. Visualization
7.2.1. Performance
7.2.2. Unavailable Language Elements
7.2.3. Effort Increase Analysis for Transformation Net Creations
7.3. Model Synchronization
7.4. Summary
8. Related Work
8.1. Testing
8.1.1. Trial & Error
8.1.2. Test-Driven-Development
8.2. Debugging
8.2.1. Model-based Debugging
8.2.2. QVT-R Debuggers
8.2.3. Forensic Debugging Techniques
8.2.4. Backwards Debugging
8.3. Verification
8.3.1. Verification by Translation
8.3.2. Verification of Graph Transformations
8.3.3. Verification based on CPN
8.4. Summary
9. Conclusion
9.1. Summary
9.2. Future Work
Objectives and Research Themes
This thesis aims to improve the quality and ease of debugging for the declarative model transformation language QVT Relations (QVT-R). By mapping QVT-R concepts to "Transformations On Petri Nets In Color" (TROPIC), the research provides a white-box visualization of transformation logic to address the inherent opacity of declarative model transformations.
- Visualizing QVT-R operational semantics using Transformation Nets based on Colored Petri Nets.
- Developing a procedural model to bridge the abstraction gap between QVT-R code and execution.
- Proposing solutions for unidirectional mappings, model inheritance, and incremental model synchronization.
- Implementing a prototypical "Grade" tool to demonstrate the practical application of these concepts within an Eclipse-based environment.
- Evaluating the approach by identifying common QVT-R development pitfalls through visual debugging.
Excerpt from the Book
4.1. Overview
In this section the conceptual approach based on the ideas defined by building the Grade application is presented. Some further implementation specific ideas are presented in a following section.
To identify the desired result of this section see Figure 4.1. On the left side a typical QVT-R code is placed that is visualized in TROPIC on the right side. This example is used in hereinafter sections to explain how this functionality can be achieved and why it needs to be displayed as it is done in this figure. Several more specific cases are added by additional examples.
The desired integration of Grade in the model transformation process is visualized in Figure 4.2. First, syntactically correct QVT-R code has to be written and a certain input model needs to be defined. These pieces of information are forwarded to Grade (the grey box in the background of Figure 4.2) and transformed to a TROPIC Net in order to visualize the operational semantics. This Net can be analyzed in the Debugging View by stepwise proceeding the transformation. By identifying an error, changes are undertaken at the QVT-R code. On the left side the QVT engine is placed that consumes the QVT-R Code – holding the knowledge about the involved source model, source metamodel, and the target metamodel – and produces the target model conforming to the target metamodel. The QVT engine itself is not part of Grade.
Summary of Chapters
1. Introduction: Outlines the motivation behind Model Driven Engineering and defines the problem of inadequate debugging facilities for QVT Relations, proposing TROPIC-based visualization as a solution.
2. Model Transformation Fundamentals: Provides the theoretical grounding in Model Driven Engineering and explores different categorization criteria for transformation languages.
3. Model Transformation Technologies: Introduces QVT Relations and the TROPIC framework, establishing a mapping between these two technologies as a basis for the subsequent approach.
4. Transforming QVT Relations to TROPIC: Details the conceptual approach for mapping QVT-R to TROPIC, covering execution semantics, handling of types and relationships, and the complexity involved.
5. Supporting Advanced Features of QVT Relations: Discusses the extension of the approach to handle complex features like class inheritance and model synchronization for incremental changes.
6. Realization: Describes the technical implementation of the "Grade" prototype, including the use of Eclipse, the QVT-R parser, and the internal class structure.
7. Evaluation: Assesses the effectiveness of the Grade approach by testing it against common QVT-R pitfalls and analyzing the performance and scalability of the generated Transformation Nets.
8. Related Work: Reviews existing literature on testing, debugging, and verification techniques for model transformations, comparing them with the approach presented in this thesis.
9. Conclusion: Summarizes the thesis results and provides an outlook on future research directions for improving the visualization and handling of OCL expressions.
Keywords
Model Driven Engineering, QVT Relations, Model Transformation, TROPIC, Colored Petri Nets, Graphical Debugging, Visual Debugging, Operational Semantics, Transformation Nets, Model Synchronization, Eclipse, Meta Modeling, Debugger, Software Lifecycle, Traceability
Frequently Asked Questions
What is the primary focus of this research?
The research focuses on creating a graphical debugging environment for the declarative language QVT Relations by visualizing its operational semantics using Transformation Nets based on Colored Petri Nets.
Why are standard debugging facilities for QVT-R insufficient?
Standard tools often provide a "black-box" view, failing to make the operational semantics and the internal transformation steps of declarative QVT-R rules explicit to the developer.
What is the role of the TROPIC framework in this thesis?
TROPIC acts as the visualization engine. It represents metamodel elements as places and transformation logic as transitions, allowing developers to trace tokens and understand the transformation flow step-by-step.
How does the "Grade" tool handle transformation errors?
Grade visualizes the transformation state. By identifying where tokens end up or why transitions fail to fire, developers can visually detect pitfalls like "too many" or "too few" elements in target places.
Does the approach support all QVT-R features?
The thesis covers the core aspects and advanced features like inheritance and incremental changes, but notes that complex OCL queries remain an area for future work due to their complexity in visualization.
What is the significance of the "TracePlace" concept?
TracePlaces are used to handle dependencies between relations, specifically allowing data from a parent relation to be passed to a child relation while maintaining visibility of the execution flow.
How is the scalability of the generated nets managed?
Scalability is addressed through a custom layout provider that arranges modules to optimize visibility, though the thesis acknowledges that highly nested models can still result in complex, human-unreadable nets.
What is the "Heavyweight Approach" mentioned in section 4.5.1?
It refers to a strategy of correspondence identification between source and target objects by iteratively parsing and analyzing variable linkages within Where- and When-Clauses to resolve structural equivalencies.
- Quote paper
- Patrick Zwickl (Author), 2009, Graphical Debugging of QVT Relations using Transformation Nets, Munich, GRIN Verlag, https://www.grin.com/document/141732