Budapest University of Technology and Economics Department of Measurement and Information Incremental Model Queries for Model Driven Software Engineering Ákos Horváth Based on Dániel Varró’s slides Budapest University of Technology and Economics Fault Tolerant Systems Research Group IncQuery Labs Ltd
29
Embed
Incremental Model Queries for Model-Dirven Software Engineering
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Budapest University of Technology and EconomicsDepartment of Measurement and Information Systems
Incremental Model Queries for Model Driven Software Engineering
Ákos Horváth Based on Dániel Varró’s slides
Budapest University of Technology and EconomicsFault Tolerant Systems Research Group
IncQuery Labs Ltd
Outline of the TalkMotivation of model queries and transformation:• Critical system development
The EMF-IncQuery framework• Language and Execution
Code Generation by Model Transformations• Batch vs. Incremental
Main Contributors o István Rátho Ákos Horvátho Gábor Bergmanno Ábel Hegedüso Zoltán Ujhelyio Benedek Izsóo Gábor Szárnyaso Csaba Debrecenio Dénes Harmatho József Makaio Dániel Steino …
MODEL TRANSFORMATIONS IN CRITICAL SYSTEMS DEVELOPMENT
Development Process for Critical SystemsUnique Development Process
(Traditional V-Model)
Critical Systems Design requires a certification process to develop justified evidence that the system is free of flaws
Software Tool Qualification obtain certification credit for a software tool used in critical system design
Qualified Tool Certified Output
DO-178BIEC 61508
Innovative Tool Better System
Model-Driven Engineering of Critical Systems
Traditional V-Model Model-Driven Engineering
Main ideas of MDE• early validation of system models • automatic source code generation quality++ tools ++ development cost--
• DO-178B/C: Software Considerations in Airborne Systems and Equipment Certification (RTCA, EUROCAE) • Steven P. Miller: Certification Issues in Model Based Development (Rockwell Collins)
INCREMENTAL MODEL QUERIES: THE EMF-INCQUERY PROJECT
Motivation: Early validation of design rulesSystemSignalGroup design rule (from AUTOSAR)
o A SystemSignal and its group must be in the same IPduo Challenge: find violations quickly in large modelso New difficulties• reverse
navigation• complex
manualsolution
AUTOSAR: • standardized SW architecture of the automotive industry• now supported by modern modeling toolsDesign Rule/Well-formedness constraint: • each valid car architecture needs to respect• designers are immediately notified if violatedChallenge: • >500 design rules in AUTOSAR tools• >1 million elements in AUTOSAR models• models constantly evolve by designers
IQ: declarative query languageo Attribute constraints o Local + global querieso Compositionality+Reusabilility o Recursion, Negation, o Transitive Closureo Syntax: DATALOG style
Query(A,B) ∧condi(Ai,Bi) • all tuples of model elements a,b• satisfying the query condition• along the match A=a and B=b• parameters A,B can be input/ output
EMF-INCQUERY Architecture
Transaction
In-memory EMF model
Rete net
Indexer layer
EMF-INCQUERY
Indexing
In-memory storage
Production network• Stores intermediate query results• Propagates changes
Fill the input nodesFill the worker nodesRead the result setModify the modelPropagate the changesRead the changes in the result set (deltas)
Poor Man’s Generator: Java over EMF APIDefined by Java code
1. Traversal by code2. Manual model building3. No traceability
- High Maintenance- Low Reusability+ Easy to start
Concrete Syntax
Abstract Syntax
while (i <= input){ i++;}
:WhileStatement
:Block
:Increment
:VariableRefname = "i"
:ConditionTestconditionblock
:Relationop="<="
:VarRefname = "i"
:VarRefname = "input"
:Location
:Edge :Edge
:Guardexp="!(i<=input)"
:Location
:Edge :Edge
trg src
src trg
:Guardexp="!(i<=input)"
:Updateexp="i++"
srctrg
Transformation codeLocation transform(WhileStatement w) { for(Statement s: w.block.statements) { /* map the inner states */} for(Location l : locations) { /* Link the locations to a circle */} // Map the condition // Set the guards of the outgoing edges}