Views are key concepts of domain-specific modeling in order to provide specific focus of the designers by abstracting from unnecessary details of the underlying abstract model. Usually, these views are represented as models themselves (view models), computed from the source model. However, the efficient maintenance of views when the source model changes is challenging, as recalculation from scratch has to be avoided to achieve scalability.
In the talk, we propose an approach to define view models in a highly automated way, based on declarative model queries. The views are automatically populated in accordance with the lifecycle of regular model elements - however, their existence is entirely bound to the underlying abstract model. This means that view models are automatically and incrementally maintained. Our contribution can also be interpreted as extending the concepts of derived features to derived objects, specified and maintained by incremental queries.
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Query-Driven Incremental Synchronization of View Models
1. Budapest University of Technology and Economics
Department of Measurement and Information Systems
Query-driven incremental
synchronization of view models
Csaba Debreceni, Ákos Horváth, Ábel
Hegedüs, Zoltán Ujhelyi, István Ráth and
Dániel Varró
(varro@mit.bme.hu)
2. Motivating project
Avionics research project
o Model-driven toolchain
o Allocate SWs onto HWs
o Platform: ARINC 653
Functional
Architecture
Platform
description
Component
database
Allocation
Integrated
System
Model
3. Motivating scenario
Avionics research project
o Model-driven toolchain
o Allocate SWs onto HWs
Simplified Example
3
FAM_PilotControl
: Function
FAM_Navigation
: Function
FAM_FMS
: Function
FAM_EMS
: Function
nav2ems
:InformationLink
provider
consumer
subFunctions
provider
consumer
PilotControl
SubS1
Navigation
FMS
SubS2
EMS
tag: func
tag: func
tag: func
tag: func
EMS: Engine Management System
FMS: Flight Management SystemInPort/OutPort
nav2fms
:InformationLink
Simulink FAM
Id
Id Other SubSystem without tag
Function SubSystem with "func" tag)
Port Blocks
id:Function id:InformationLink
View
Maintanence
• Incrementally
• Immediately
Maintenance:
• Incrementally
• Immediately
4. Underlying technology: EMF-IncQuery
EMF-IncQuery
o Incremental model query engine
o Pattern language with annotations
4
Query Model
Updated results Result deltas
Evaluator
Model change
Efficient change
propagation
Always up-to-date results
without model re-traversal
Track changes of your
model in terms of queries
5. Definition of view models
Derivation rules
o Graph patterns with annotations
• Precondition: a pattern match
• Execution rule: defined in annotations
o Query Based Object / Feature
5
function(ss)
@TraceLookup(src = ss, trg = f)
@QBO(eClass = Function)
@QBF(src = f, trg = id, f = id)
functionIdentifier(ss, id)
@TraceLookup(src = ssys, trg = s)
@QBF(src = p, trg = s, f =subFunctions)
subFunction(psys, ssys)
function(psys)
B:psys B:ssys
function(ssys)
...
subBlock+
@TraceLookup(src = psys, trg = p)
6. More matches can appear at the same time
o Ordered execution schema (priority for rules)
Internal traceability for created objects
o Explicit definition
Execution of motivating example
11
FAM_PilotControl
: Function
FAM_Navigation
: Function
FAM_FMS
: Function
subFunctions
consumer
PilotControl
SubS1
Navigation
FMS
tag: func
tag: func
tag: func
Simulink FAM
subFunctions
Query results Traceability
function
f_1
f_2
f_3
Trace
Trace
Trace
a 2 3appear create add
Query results
functionIdentifier
f_1 i_1
f_2 i_2
f_3 i_3
subFunction
f_1 i_1
f_2 i_2
b appear 4 set
7. Viewers related annotations
Special annotations
o Uses a specific target metamodel (notation)
o Simplifies the tracing of (notation) model elements
o Enables faster implementation on user side
7
item(func)
@TraceLookup(src = s, trg = sub)
@Item(label = "$func.id")
@ContainsItem(src = par, trg = sub)
containment(p, s)
@TraceLookup(src = c, trg = consumer)
@Edge(src = provider, trg = consumer)
subFunction(p, c) @TraceLookup(src = p, trg = provider)
@TraceLookup(src = p, trg = par)
8. Chaining of view models
FAM_PilotControl
: Function
FAM_Navigation
: Function
FAM_FMS
: Function
provider
subFunctions
consumer
nav2fms
:InformationLink
FAM
subFunctions
Traceability
Trace
Trace
Trace
Query results
item
edge
c_1p_1
containment
p_1 s_1
p_2 s_2
f_1
f_2
f_3
Notation
Item
Item
Item
Containment
Contaimnent
Edge
Trace
Trace
Trace
target
source
target
source
target
source
1 2 3appear create add
Source model Target model
Traceability model
View model
…
QBO
QBF
Target metamodel
View
model
Render
Module
QBO: Query Based Object
QBF: Query Based Feature
Zest
JFace
yFiles
9. Updating view models
Initial setup of derivation rules
o EClassifiers, EStructuralFeatures
Query result deltas
o Delta = (Found, Lost)
Intergration architecture
9
Source model
Derivation rules
Query engine
View
synchronization
View model
Change notifications Match set delta
Application
Model manipulation Configuration
Model manipulation
1
2
3
4
10. TrainBechmark
o 6 different size examples
o Source: 6.000 – 180.000 | View models: 150 – 4.500
o Wide variety of patterns such as transitive closure
Evaluation
10
11. Summary and Future work
Summary
o Deriving and synchronizing view models
• Incrementally and live
• Derivation rules
– Annotation over graph queries
– Explicit tracing mechanism
Future plans
o Extending domain specific language
• Life-cycle management capabilities
o Kleisli category based model transformations
o Integration with Sirius framework (ongoing)
11