25.3.1. the metamodeling architecture of metacase tool moflon · 2011. 12. 8. · 3 | 15.10.2009 |...
Post on 11-Sep-2020
2 Views
Preview:
TRANSCRIPT
© author(s) of these slides 2009 including research results of the research network ES and TU Darmstadt otherwise as specified at the respective slide
Felix Klar
Felix.Klar@es.tu-darmstadt.de
15.10.2009
ES Real-Time Systems Lab
Prof. Dr. rer. nat. Andy Schürr
Dept. of Electrical Engineering and Information TechnologyDept. of Computer Science (adjunct Professor)
www.es.tu-darmstadt.de
From: 10 Jahre Dresden-OCL – Workshophttp://dresden-ocl.sourceforge.net/
http://dresden-ocl.sourceforge.net/10years.html
25.3.1. The Metamodeling Architecture of
MetaCASE Tool MOFLON
ES – Real-Time Systems Lab2 | 15.10.2009 | Dresden OCL2 in MOFLON
Abstract Syntax
MOF 2.0
Transformation Story Driven Modeling (SDM)
Integration Triple Graph Grammars (TGG)
Constraints
OCL 2.0 (Dresden OCL)
Model
Metamodel Architecture of MOFLON
ES – Real-Time Systems Lab3 | 15.10.2009 | Dresden OCL2 in MOFLON
MOFLON MetaCASE – Main Features
MOF2.0 editor (draw metamodels that comply to MOF2.0 standard) build Domain Specific Languages (DSLs) based on the CASE-tool framework Fujaba possibility to extend MOFLON by own plugins
interoperabilty (import / export) transform metamodel instances with model transformations (SDM, TGG) generate code (JMI-compliant) from DSLs instantiate models of the DSL (= repositories) basic editing support for generated repositories
ES – Real-Time Systems Lab4 | 15.10.2009 | Dresden OCL2 in MOFLON
Einschub: JMI: Transformative TS-Brücke für MOF und Java, Sprache UML
Java Metadata Interchange (JMI) ist eine TS-Halb-Brücke für MOF und EBNF-Space, für die Sprache UML
UML ModelleUML
Modelle
TextuelleRepräsenta-tionen von UML in Java
TextuelleRepräsenta-tionen von UML in Java
UMLUML UMLUML
PrinterPrinter
ParserParser
MOFMOF EBNFEBNF
TS MOF TS Java
M3
M2
M1
JMI
ES – Real-Time Systems Lab5 | 15.10.2009 | Dresden OCL2 in MOFLON
(OCL) Constraints in MOFLON –MOF Editor
MOF allows to add constraints to every MOF element MOFLON has an underlying MOF metamodel repository
MOFLON MOF editor may add constraints to elements
validate constraints
ES – Real-Time Systems Lab6 | 15.10.2009 | Dresden OCL2 in MOFLON
MOFLON generates metamodel-based repositories (Java/JMI) MOFLON uses Dresden OCL to add constraint code
to generated implementations invariants (inv) derived attributes (derive) helper variables/functions (def)
(OCL) Constraints in MOFLON –Generated Implementations
Dresden OCL-codeMOFLON-code
refVerifyConstraint(String name):JmiException
JMI compliant methodrefVerifyConstraints(boolean deepVerify):Collection
<<invokes>>
<<calls>>
<<calls>>
<<queries>>
generated
Repository
Model A
c1:Clazz
ES – Real-Time Systems Lab7 | 15.10.2009 | Dresden OCL2 in MOFLON
ES – Real-Time Systems Lab8 | 15.10.2009 | Dresden OCL2 in MOFLON
ES – Real-Time Systems Lab9 | 15.10.2009 | Dresden OCL2 in MOFLON
XML Interchange
(XMI, GXL)
XML Interchange
(XMI, GXL)import
CASE Tools
(Rational Rose,
etc.)
CASE Tools
(Rational Rose,
etc.)
M O F L O N
Domain Specific Meta Models, Tool Representations
Visual MOF 2.0 EditorVisual MOF 2.0 Editor Visual SDM Editor
Fujaba
Visual SDM Editor
Fujaba
MOFLON – Architecture
Visual TGG EditorVisual TGG Editor
ES – Real-Time Systems Lab10 | 15.10.2009 | Dresden OCL2 in MOFLON
MOF 2.0
Metamodell
MOF 2.0
Metamodell
XML Interchange
(XMI, GXL)
XML Interchange
(XMI, GXL)
Graph Transformation
Fujaba
Graph Transformation
FujabaConstraints
(OCL, Java)
Constraints
(OCL, Java)
instantiate
refine
import
CASE Tools
(Rational Rose,
etc.)
CASE Tools
(Rational Rose,
etc.)
repair
refine
instantiate instantiate instantiate
M O F L O N
Domain Specific Meta Models, Tool Representations
Visual MOF 2.0 EditorVisual MOF 2.0 Editor Visual SDM Editor
Fujaba
Visual SDM Editor
Fujaba
MOFLON – Architecture
Visual TGG EditorVisual TGG Editor
TGGsTGGs
instantiate
generate
ES – Real-Time Systems Lab11 | 15.10.2009 | Dresden OCL2 in MOFLON
MOF 2.0
Metamodell
MOF 2.0
Metamodell
XML Interchange
(XMI, GXL)
XML Interchange
(XMI, GXL)
Graph Transformation
Fujaba
Graph Transformation
FujabaConstraints
(OCL, Java)
Constraints
(OCL, Java)
transform
instantiate
refine
import
CASE Tools
(Rational Rose,
etc.)
CASE Tools
(Rational Rose,
etc.)
XSLT Transformation
MOMoC
XSLT Transformation
MOMoC
repair
refine
transform transform
instantiate instantiate instantiate
M O F L O N
Domain Specific Meta Models, Tool Representations
OCL Compiler
Dresden
OCL Compiler
DresdenVelocity Transformation
Fujaba
Velocity Transformation
Fujaba
Visual MOF 2.0 EditorVisual MOF 2.0 Editor Visual SDM Editor
Fujaba
Visual SDM Editor
Fujaba
MOFLON – Architecture
Visual TGG EditorVisual TGG Editor
TGGsTGGs
instantiate
generate
ES – Real-Time Systems Lab12 | 15.10.2009 | Dresden OCL2 in MOFLON
MOF 2.0
Metamodell
MOF 2.0
Metamodell
XML Interchange
(XMI, GXL)
XML Interchange
(XMI, GXL)
Graph Transformation
Fujaba
Graph Transformation
FujabaConstraints
(OCL, Java)
Constraints
(OCL, Java)
Java Representation
(JMI)
Java Representation
(JMI)
XML Representation
(XMI)
XML Representation
(XMI)Tailored
Interfaces
Tailored
InterfacesReflective
Interfaces
Reflective
Interfaces
generate
transform
instantiate
refine
import
Model Analysis,
Model Transformation,
Model Integration,
etc.
CASE Tools
(Rational Rose,
etc.)
CASE Tools
(Rational Rose,
etc.)
XSLT Transformation
MOMoC
XSLT Transformation
MOMoC
repair
refine
transform transform
instantiate instantiate instantiate
M O F L O N
Domain Specific Meta Models, Tool Representations
OCL Compiler
Dresden
OCL Compiler
DresdenVelocity Transformation
Fujaba
Velocity Transformation
Fujaba
Visual MOF 2.0 EditorVisual MOF 2.0 Editor Visual SDM Editor
Fujaba
Visual SDM Editor
Fujaba
MOF 2.0
Instances
MOF 2.0
InstancesEvent
Notification
Event
NotificationConstraint
Checking
Constraint
CheckingRepair
Transformation
Repair
Transformation
MOFLON – Architecture
Visual TGG EditorVisual TGG Editor
TGGsTGGs
instantiate
generate
ES – Real-Time Systems Lab13 | 15.10.2009 | Dresden OCL2 in MOFLON
26.2 MOFLON Case Study – Statechart Editor (STaX)
+
Editor:• data structure (MOFLON repository)
• GUI (GEF)
MOFLON can be used to build editors,but building editors is not the main goal of MOFLON
MOFLON is mainly used to • integrate existing DSL tools
• generate standard compliant metamodel implementations• specify transformations on instances of the metamodel
ES – Real-Time Systems Lab14 | 15.10.2009 | Dresden OCL2 in MOFLON
Integration Example with TGG –Class diagrams / database schemata
domain specific language,e.g. Class Diagrams
domain specific language,e.g. Database Schemata
ES – Real-Time Systems Lab15 | 15.10.2009 | Dresden OCL2 in MOFLON
(e.g. MagicDraw)
(e.g. MySQL)
Case Study 2: Tool Integration Scenario TiECDDS: (ClassD / DatabaseSchema)
TGGs relate
Class Diagrams Metamodel Database Schemata Metamodel
integration rule code
MOFLON generates
Run-Time Verificationof Constraints
ES – Real-Time Systems Lab16 | 15.10.2009 | Dresden OCL2 in MOFLON
TiE-CDDS – Focus on Constraints in CD (1)Generate Code from MOF model (CD metamodel)
ES – Real-Time Systems Lab17 | 15.10.2009 | Dresden OCL2 in MOFLON
TiE-CDDS – Focus on Constraints in CD (2)Integration Framework
load CD modelload CD metamodel
visualization ofclassdiagrams model(here: source domain)
model violates constraints:• class „Customer“ has two attributes with same name: „name“• attribute in class „Address“ has no name• multiplicity violation: class „Order“ has no attributebut according to CD metamodel every class must have one
ES – Real-Time Systems Lab18 | 15.10.2009 | Dresden OCL2 in MOFLON
TiE-CDDS – Focus on Constraints in CD (3)Model Browser
model is fixedin generic model editor
ES – Real-Time Systems Lab19 | 15.10.2009 | Dresden OCL2 in MOFLON
TiE-CDDS – Focus on Constraints in CD (4)Integration Framework
translation processmay start now…
ES – Real-Time Systems Lab20 | 15.10.2009 | Dresden OCL2 in MOFLON
TiE-CDDS – Focus on Constraints in CD (5)Forward Translation to DB representation
ES – Real-Time Systems Lab21 | 15.10.2009 | Dresden OCL2 in MOFLON
Future Work – OCL
Activate more features of Dresden OCL in MOFLON MOF editor User friendly OCL syntax checking OCL expression completion
MOFLON code generator Initial Values (init)
Queries? …
We bootstrap our MOFLON MOF Metamodel periodically Add more OCL constraints to our MOF Metamodel Regenerate MOFLON MOF implementation Activate constraint checking in MOFLON Model Verification
ES – Real-Time Systems Lab22 | 15.10.2009 | Dresden OCL2 in MOFLON
Model-Driven Software Development at Real-Time Systems Lab (Prof. Schürr)
6. Model-Based &Product Line Testing
6. Model-Based &Product Line Testing
2. Modeling Language &Tool Integration
2. Modeling Language &Tool Integration
1. Meta-Models & ModelTransformations (OMG)
1. Meta-Models & ModelTransformations (OMG)
Application Areas:
Automotive SW
Automation SW
…
Application Areas:
Automotive SW
Automation SW
…
3. Domain-Specific Eng.Languages & Methods
3. Domain-Specific Eng.Languages & Methods
5. Model-DrivenSecurity Engineering
5. Model-DrivenSecurity Engineering
4. P2P Systems &Global SW Eng.
4. P2P Systems &Global SW Eng.
ES – Real-Time Systems Lab23 | 15.10.2009 | Dresden OCL2 in MOFLON
Related Approaches
from Amelunxen, Königs, Rötschke, and Schürr,„MOSL: Composing a Visual Language for a Metamodeling Framework“in IEEE Symposium on Visual Languages and Human-Centric Computing (VLHCC 2006),September, 2006, 81-84
approaches based ongraph-/modeltransformation
classic meta-CASEapproachesstandards
text basedapproaches
ES – Real-Time Systems Lab24 | 15.10.2009 | Dresden OCL2 in MOFLON
Further reading
• A. Königs, A. Schürr: "Tool Integration with Triple Graph Grammars - A Survey", in: R. Heckel (ed.), Proceedings of the SegraVis School on Foundations of Visual Modelling Techniques, Amsterdam: Elsevier Science Publ., 2006; Electronic Notes in Theoretical Computer Science, Vol. 148, 113-150.
• F. Klar, S. Rose, A. Schürr: "TiE - A Tool Integration Environment", Proceedings of the 5th ECMDA Traceability Workshop, 2009; CTIT Workshop Proceedings, Vol. WP09-09, 39-48
• F. Klar, S. Rose, A. Schürr: "A Meta-Model-Driven Tool Integration Development Process", Proceedings of the 2nd International United Information Systems Conference, 2008; Lecture Notes in Business Information Processing, 201-212.
• C. Amelunxen, A. Königs, T. Rötschke, A. Schürr: "MOFLON: A Standard-Compliant Metamodeling Framework with Graph Transformations", in: A. Rensink, J. Warmer (eds.), Model Driven Architecture - Foundations and Applications: Second European Conference, Heidelberg: Springer Verlag, 2006; Lecture Notes in Computer Science (LNCS), Vol. 4066, Springer Verlag, 361-375.
• A. Königs: "Model Integration and Transformation - A Triple Graph Grammar-based QVT Implementation", Technische Universität Darmstadt, Phd Thesis, 2009.
ES – Real-Time Systems Lab25 | 15.10.2009 | Dresden OCL2 in MOFLON
Time for questions and discussion
Thank you for your attention…
http://www.moflon.org
top related