The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S...
Transcript of The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S...
![Page 1: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/1.jpg)
EOOLT, Paphos EOOLT, Paphos
20082008--0707--0808
JJöörn Guy Srn Guy Süüss, Peterss, Peter Fritzson, Adrian PopFritzson, Adrian Pop
Presentation by Peter FritzsonPresentation by Peter Fritzson
The Impreciseness of UML and The Impreciseness of UML and
Implications for ModelicaMLImplications for ModelicaML
class x {
public
int a;
float b;
int func (int a,int b);
Asa asad
Asda ad
Asd ad cc
Aac sdscfcc c a
Ascccv ca
Ascc cac
}
class x {
public
int a;
float b;
int func (int a,int b);
Asa asad
Asda ad
Asd ad cc
Aac sdscfcc c a
Ascccv ca
Ascc cac
}
class x {
public
int a;
float b;
int func (int a,int b);
Asa asad
Asda ad
Asd ad cc
Aac sdscfcc c a
Ascccv ca
Ascc cac
}
class x {
public
int a;
float b;
int func (int a,int b);
Asa asad
Asda ad
Asd ad cc
Aac sdscfcc c a
Ascccv ca
Ascc cac
}
![Page 2: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/2.jpg)
pelab2 © Peter Fritzson
OutlineOutline
• Whole Product Modelling (Software/Hardware)
implies Tool Integration
• Why UML is Bad (for Integration)
• Meta-Models and Frameworks
• An Example of Whole Product Modelling
![Page 3: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/3.jpg)
pelab3 © Peter Fritzson
Notations for WholeNotations for Whole--Product ModelingProduct Modeling
• UML is widely adopted as a software modeling
notation
• Modelica is very useful for hardware modeling
• Problem: Size and imprecise semantics of UML
• Possibility: Eclipse offers a minimal and well
defined UML-like base platform:
EMF (Eclipse Modeling Framework)
![Page 4: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/4.jpg)
pelab4 © Peter Fritzson
UML SuitabilityUML Suitability ProblemsProblems
• Model Exchangeability
• Specification Size
• Semantics
• Sub-Languages (OCL, Action Language)
• Incompatible Children (SysML, xtUML)
![Page 5: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/5.jpg)
pelab5 © Peter Fritzson
UML is not ExchangeableUML is not Exchangeable
![Page 6: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/6.jpg)
pelab6 © Peter Fritzson
UML UML Specification GrowthSpecification Growth (Pages)(Pages)
136 171
413492
566
736
957
0
200
400
600
800
1000
1200
1400
V0.8 V0.91 V1.1 V1.3 V1.4 V1.5 V2.0
![Page 7: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/7.jpg)
pelab7 © Peter Fritzson
What is Metamodelling?What is Metamodelling?
A Software Engineering approach
to cheaply build interactive editors
for engineering languages that are
described in the form of class diagrams
using diagrams to specify/code compilers.
![Page 8: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/8.jpg)
pelab8 © Peter Fritzson
UML (MetaUML (Meta--Object Facility) MOF PyramidObject Facility) MOF Pyramid
[UML1.4.2]
![Page 9: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/9.jpg)
pelab9 © Peter Fritzson
Structure and Consistency Based on MOFStructure and Consistency Based on MOF
• Classes
• Attributes
• References
• Multiplicities
• Well-formedness Rules
• Eclipse EcoreMOF Model Instance
![Page 10: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/10.jpg)
pelab10 © Peter Fritzson
MOF AdvantagesMOF Advantages
• High-level Semantics (Boxes and Lines)
• Less (visible) technology
• Easier to understand for client
• Generic Builder Tools (Graphical Editors)
• Large Provided Infrastructure / Framework
• Reduced cost to build solution
• Simplified integration between solutions
• Report Generators
• Produce Work Items
• Produce Documentation
![Page 11: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/11.jpg)
pelab11 © Peter Fritzson
[MOF1.4]
Defining the MOF Language in MOFDefining the MOF Language in MOF
![Page 12: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/12.jpg)
pelab12 © Peter Fritzson
MOF Translation ProcessMOF Translation Process
Save and LoadModel
Undo / RedoEdit
User InterfacePlugin
MOF
Graphical Editor
MOF
Textual Editor
TestExtend to
Validate
Manipulation
API (Java, C..)
MOF Model
![Page 13: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/13.jpg)
pelab13 © Peter Fritzson
MOF Framework OfferingsMOF Framework Offerings
Save and LoadModel
Undo / RedoEdit
User InterfacePlugin
TestExtend to
Validate
Manipulation
API (Java, C..)
OMG MOF Standard
Netbeans Metadata Repository (MDR): MOF 1.4
Eclipse Modeling Framework (EMF): Ecore
![Page 14: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/14.jpg)
pelab14 © Peter Fritzson
Ongoing Work:Ongoing Work:
ModelicaML ModelicaML –– UMLUML Profile for ModelicaProfile for Modelica
• Extension of SysML subset
• Features:
• Supports Modelica constructs
• Modelica generic class modeling
• Modelica syntax in definitions
• Equation-based modeling
• Simulation modeling
![Page 15: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/15.jpg)
pelab15 © Peter Fritzson
ModelicaML ModelicaML Diagrams Diagrams –– Overview Overview
![Page 16: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/16.jpg)
pelab16 © Peter Fritzson
ModelicaMLModelicaML Class Internal DiagramClass Internal Diagram
• Modelica Connectiondiagram• Better visual comprehension
• Predefined connector locations
• Class Internal diagram• Nested models
• Top-model parameters and
variables
• Flow direction
• Other ModelicaML elements
![Page 17: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/17.jpg)
pelab17 © Peter Fritzson
Simulation Simulation DiagramDiagram
Introduced by ModelicaMLIntroduced by ModelicaML
![Page 18: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/18.jpg)
pelab18 © Peter Fritzson
[SAAB BOFORS]
Saab Bofors Example ApplicationSaab Bofors Example Application
![Page 19: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/19.jpg)
pelab19 © Peter Fritzson
xtUML of
Control Program
Control Program
(Ada)
ModelicaML of
Environment
Environment
Simulator (C)
Micro Controller
Link-Model
Micro Controller
Environment
Connector (?)
Bridgepoint UML ToolModelica Developer
Tooling (MDT)
SB Link
Future Tool Integration Example Future Tool Integration Example (Saab(Saab--Bofors application)Bofors application)
![Page 20: The Impreciseness of UML and Implications for ModelicaML · EOOLT, Paphos 2008 -07 -08 Jörn Guy S üss, Peter Fritzson, Adrian Pop Presentation by Peter Fritzson The Impreciseness](https://reader031.fdocuments.in/reader031/viewer/2022031303/5be8052a09d3f2db738d60d6/html5/thumbnails/20.jpg)
pelab20 © Peter Fritzson
Outlook for ModelicaMLOutlook for ModelicaML
• Continue using Eclipse Modeling Framework as a basis• Based on Ecore meta-meta-model
• Make ModelicaML smaller with more well defined semantics • Only include semantically well-defined diagrams
• Remove some UML/SysML constructs with fuzzy semantics
• Full compilation to Modelica
• Use algorithmic Modelica as (UML) action language?