Title: Eliminating Crosscutting Constraints from Visual Model Transformation
1 Eliminating Crosscutting Constraints from
Visual Model Transformation
Budapest University of Technology and
Economics Department of Automation and Applied
Informatics Applied Computer Science Group
- László Lengyel, Tihamér Levendovszky
- and Hassan Charaf
2Outline
- Case Study
- Visual Modeling and Transformation System
- Crosscutting constraints
- Aspect-Oriented Constraints
- Global Constraint Weaver
- Summary
3Case Study
- The case study is a variation of the class model
to RDBMS transformation (also referred to as
object-relational mapping)
4Case Study Input and Output
5Graph Rewriting
6Model Transformation in VMTS
- Graph Rewriting (LHS ? RHS)
- Metamodel-Based Rewriting
- An instantiation of LHS must be found in the
graph the rule being applied to instead of the
isomorphic subgraph of the LHS - Precondition and postcondition of the rewriting
rules - OCL expressions in LHS and in RHS
7Metamodel-Based Rewriting
- An instantiation of LHS must be found in the
graph the rule being applied to instead of the
isomorphic subgraph of the LHS
8Visual Modeling and Transformation System (VMTS)
9The Transformation of the Case Study
10Crosscutting Constraints
- The constraint appears 30 times in 11
transformation steps - The constraint appears 16 times in 6
transformation steps
-- Persistent class context Class inv
PersistentClass self.is_persistent 1
-- Nonpersistent class context Class inv
NonPersistentClass self.is_persistent 0
11Crosscutting Constraints 2
- Modification and deletion of the constraints is
not consistent - It is difficult to maintain and reason about the
effects and purpose of constraints when they are
scattered - We need a mechanism to separate these concerns
- After we separated the constraints from the
pattern rule nodes we need a weaver method
12Problem Statement
- Precondition and postcondition of the rewriting
rules - OCL expressions in LHS and in RHS - Case study
- Crosscutting constraints in metamodel-based
rewriting rules - Solution - aspect-oriented constraint management
13Remove Crosscutting Constraints
14Global Constraint Weaver
15Aspect-Oriented Constraints
- VMTS manages constraints using AO-techniques
- Benefits of the AO constraints
- It is beneficial to describe a common constraint
in a modular manner and designate the places
where it is to be applied. - Consistent constraint modification
- The rewriting rules do not contain numerous
constraints which make more tangled the already
complex rewriting rules - Reasoning about the whole transformation
16The correspondence between the AOP and AO
Constraint handling concepts
AOP AO Step Constraints
Join-point Pattern Rule Node (PRN)
Pointcut (name-based, property-based) Context of the OCL Constraint (type-based), Weaving Constraint (property-based)
Advice (before, after) Pre- and postconditions
Aspect AO Constraint
17Summary
- The metamodel-based specification of the
rewriting rules allows assigning OCL constraints
to pattern rule nodes - We have introduced a mechanism how to separate
crosscutting constraints - Aspect-Oriented Constraints
- Type-based weaving with constraints
- GCW
18Questions