the impreciseness of uml and implications for modelicaml · eoolt, paphos 2008 -07 -08 jörn guy s...
TRANSCRIPT
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
}
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
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)
pelab4 © Peter Fritzson
UML SuitabilityUML Suitability ProblemsProblems
• Model Exchangeability
• Specification Size
• Semantics
• Sub-Languages (OCL, Action Language)
• Incompatible Children (SysML, xtUML)
pelab5 © Peter Fritzson
UML is not ExchangeableUML is not Exchangeable
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
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.
pelab8 © Peter Fritzson
UML (MetaUML (Meta--Object Facility) MOF PyramidObject Facility) MOF Pyramid
[UML1.4.2]
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
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
pelab11 © Peter Fritzson
[MOF1.4]
Defining the MOF Language in MOFDefining the MOF Language in MOF
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
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
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
pelab15 © Peter Fritzson
ModelicaML ModelicaML Diagrams Diagrams –– Overview Overview
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
pelab17 © Peter Fritzson
Simulation Simulation DiagramDiagram
Introduced by ModelicaMLIntroduced by ModelicaML
pelab18 © Peter Fritzson
[SAAB BOFORS]
Saab Bofors Example ApplicationSaab Bofors Example Application
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)
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?