the impreciseness of uml and implications for modelicaml · eoolt, paphos 2008 -07 -08 jörn guy s...

20
EOOLT, Paphos EOOLT, Paphos 2008 2008 - - 07 07 - - 08 08 J J ö ö rn Guy S rn Guy S ü ü ss, Peter ss, Peter Fritzson, Adrian Pop Fritzson, Adrian Pop Presentation by Peter Fritzson Presentation by Peter Fritzson The Impreciseness of UML and The Impreciseness of UML and Implications for ModelicaML Implications for ModelicaML

Upload: hahuong

Post on 11-Nov-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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?