Visible to the public File preview

OMG Modeling “Standards” for Model-Based Engineering
Bran Selić Malina Software Corp., Canada Simula Research Labs, Norway Zeligsoft (2009) Ltd., Canada University of Toronto, Canada Carleton University, Canada University of Sydney, Australia bselic@simula.no selic@acm.org

About Simula Research Labs
 Research institute created by the Norwegian

Ministry of Education and Research

 Objectives:

o Basic and long-term research in networks, distributed

systems, scientific computing, and software engineering private sectors doctoral levels

o Promote the application of research in public and
o Educate students at master’s, doctoral, and post Various research domains

o Software estimation, cardiac modeling, biomedical o Certus centre: software V&V

computing, computational geoscience, networks, media

1

CERTUS
 Purpose: o Develop new and improved methods and tools for
modeling, certifying, and testing of critical software systems

 Supported by: o The Research Council of Norway and its Centre for
Research-Based Innovation

 Established in September 2011 o 8-year mandate (2011-2019) o ~10 MNOK/year (~US$ 1.75M/year) o 7 permanent scientists, 7 PhD students, 4 adjunct
researchers

 Initiated by Prof. Lionel Briand (U. of

Luxembourg) and led by Dr. Arnaud Gotlieb
2

CERTUS Industry Partners
 All research projects are industry driven:

o o o o o

CISCO Systems Norway ESITO

FMC Technologies
KONGSBERG Maritime TOLL customs and excises

3

CERTUS Technical Strategy
 Use of model-based engineering (MBE) methods,

tools, and standards

 Current focus on

o Certification and verification of real-time and
embedded software families

o Modeling, configuring, and testing of complex product
o Automated testing of data-intensive software systems
 OMG industry standards used:

o Unified Modeling Language (UML) o Modeling and Analysis of Real-time and Embedded
Systems (MARTE) – a UML profile

o Systems Modeling Language (SysML)
4

WHAT IS MODEL-BASED ENGINEERING (MBE)?

Models in Engineering
 Descriptive models
 To help us understand (i.e., reason about) complex systems  To communicate understanding and design intent to others  To predict the interesting characteristics of systems and system designs (e.g., safety, performance)

 Prescriptive models
 To specify systems (blueprints)  …and, in some cases, even to implement systems

The Essence of Modern MBE
 An approach to system and software development in which

computer-based models play an indispensable role

 Based on two time-proven ideas:
(1) ABSTRACTION
S1
e3/action3

(2) AUTOMATION
S1
e3/action3

S3
e1/action1 e1/action1 e2/action2

S3 S2
e2/action2

S2

switch (state) { case‘1:action1; newState(‘2’); break; case‘2:action2; newState(‘3’); break; case’3:action3; newState(‘1’); break;}

switch (state) { case‘1:action1; newState(‘2’); break; case‘2:action2; newState(‘3’); break; case’3:action3; newState(‘1’); break;}

7

OMG’s Model-Driven Architecture (MDA)™
 In recognition of the increasing importance of MBE,

the Object Management Group (OMG) is developing a set of supporting industrial standards
(1) ABSTRACTION (2) AUTOMATION

(3) INDUSTRY STANDARDS • UML 2
• • • • • OCL MOF SysML SPEM …etc.

Be wary of the notion of “platform independent model” (PIM)!

OMG Modeling Standards
 Software Modeling Language: UML
 Real-Time Software: MARTE  Modeling Language: SysML  Metamodel: Meta Object Facility (MOF)  Model Exchange Format: XMI  Constraint Language: OCL  Transformation/Mapping Language: QVT  Representation Model: Diagram Definition  Model Management Service: MOF Versioning  Mapping Specification: SysML-Modelica Transformation  Mapping Specification: Ontology Definition Metamodel (ODM)  Architecture Framework Modeling Language: UPDM  Business Modeling Language: BPMN

THE UNIFIED MODELING LANGUAGE (UML 2)

The Unified Modeling Language
 Originally conceived as a descriptive language

o Adopted by the OMG in 1996
 Quickly became the most widely-used software

modeling language o Supported by numerous commercial and open source
tools

o Taught in most software/computer university curricula
 Evolved into a descriptive+prescriptive language

o 2001: UML Action Semantics – semantic foundation o 2003: UML 2 – refactored metamodel + ADL features
+ improved and extended profile mechanism

o 2010: Executable UML Foundation (fUML) o 2011: Action Language (ALF) – a prescriptive UML
12

The “New” UML Semantics
 Executable UML Foundation specification

o A precise formal specification of the dynamic semantics
of a core subset of UML (Foundational UML = fUML)

 Enables:

o Model execution/simulation o Formal (mathematical and/or programmatic) of fUML
models

 http://www.omg.org/spec/FUML/

OMG Approach to Specifying UML Semantics
Higher-level behavioral formalisms (with SVPs)
Higher-level UML action semantics UML statechart semantics UML activities semantics UML interactions semantics UML Action Language(s)

Map (compile) to
Foundational UML (fUML) action semantics (action executions, token flows, etc.) Act on (create, destroy, read, write, etc.)

Generic UML VM (with SVPs)

Core structural elements (objects, links, etc.)
SVP = Semantic Variation Point

Foundational UML (fUML) and Basic UML (bUML)
 A subset of fUML actions is used as a core

language (Basic UML) that is used to describe fUML itself
Foundational UML (fUML) action semantics (action executions, token flows, etc.)
Basic UML action semantics (bUML)
Maps to (Operational Specification)

Maps to (Axiomatic Specification)

Formal mathematical model (Process Specification Language - PSL)

Basis for a formalization of UML

THE UML PROFILE FOR MODELING AND ANALYSIS OF REAL-TIME AND EMBEDDED SYSTEMS (MARTE)

Background on UML with Profiles
 Allows domain-specific interpretations of UML

models

 …which are compatible with general (standard)

UML! o Implies the ability to reuse UML tools, expertise, etc.
UML Language (metamodel)

UML for Real Time

UML for Systems Engineering

UML for Business Modeling

. . . etc.

UML Profiles Types
 Language profiles

o Define a domain-specific modeling language for
• E.g., an SDL profile of UML (ITU standard Z.109)

specifying systems

 Casting (analysis) profiles

o For representing concern-specific interpretations and refinements of existing models o Used for analysis and prediction
• E.g., performance, security, availability, safety

 MARTE provides both types of profiles

Casting Profiles
 A profile can be dynamically applied or unapplied to a

given model o Without changing the underlying base model o Allows a model to be interpreted from the perspective of a
specific domain

 Example: viewing a UML model as a queueing network
arrivalRate = . . . «client» unapply profile

user1
DBase user2
apply profile

user1

«server»

DBase
«client»

user2
serviceRate = . . .
arrivalRate = . . .

Example: Automated Model Analysis
 Transform a UML model into a queueing network

model for performance analysis and prediction
M2M Transform
Model Editing Tool 4 3.1 5

Xform Xform

Performance Analysis Tool

2.5

m

MARTE (QoS) annotations

Inverse M2M Transform

20

Core MARTE Concept: Resource
 Resource:

o A facility or mechanism with limited capacity required
to attain some functional objective (e.g., perform a service)

 The limited nature of resources is due to the

finite nature of the underlying hardware platform(s) o Contention for shared resources is the primary source
of complexity related to platforms

 Resources can be viewed as providers of services

o E.g., computing power, memory storage, concurrency
management, communications paths

21

Core MARTE Concept: QoS
 Quality of Service:

o the degree of effectiveness in the provision of a
service

o e.g. throughput, capacity, response time
 The two sides of QoS:

o offered QoS: the QoS that is available (supply side) o required QoS: the QoS that is required (demand side)

Engineering Analyses


“An idea that unifies all engineering is the concept of failure. Virtually every calculation an engineer performs…is a failure calculation…to provide the limits than cannot be exceeded”
-- Henry Petroski Key analysis question: Does a resource have the capacity to support its clients?
o i.e., does supply meet demand?
Required QoS 2 ms
readDB()



Offered QoS
1 ms
readDB()

Resource

Client
(e.g., data base user)

Resource Contract

Service
(e.g., data base)

Key question: (RequiredQoS  OfferedQoS) ?

Main Elements of MARTE
MARTE
Shared abstractions and concepts

Foundations
For precise modeling of RT phenomena
«import» «import»

Support for QoS analyses

Real-Time Domain Modeling Support

Real-Time Domain Analysis Support

Annexes

 Shared abstractions and concepts
(necessary for scenario modeling)
Foundations

MARTE Foundations

o Includes an abstract model of dynamic semantics

Non-Functional Properties Specification (NFP)

Time Modeling Support

Abstract Resources Modeling (GRM)

Allocation Specification

Non-Functional Properties
 Can be qualitative or quantitative
 Qualitative properties are usually enumerations

o E.g., ROM type: {EEPROM, EPROM, flash,
OTP_EPROM,…}

 Quantitative properties involve:

o Quantity: how much/magnitude o Dimension: what is being measured (e.g., length,
volume, duration)

o Unit: the standard used to measure a dimension (e.g.,
meter, litre, second)

 Sometimes it is necessary to add a qualification to

a property o E.g., required or provided, measured or estimated,…

Example
 Provide the ability to specify the execution time

(duration) of a UML action o E.g.:

SendAction

«timedAction»

Supplement the model element with data that specifies the time (duration) it takes to execute it

timeTaken = {5, ms}

«timedAction»

Value Specification Language
 Language to specify values and relationships between

non-functional (QoS) properties o Textual language o Includes literals, variables and expressions o Expressions involving variables can capture functional
relationships between values of different properties

 Examples:

o [1..5] o (2, us)
or

= interval literal
= tuple literal (for structured data)

(value=2, unit=us)

o in $temp : Temperature = 0 = a variable declaration o ((temp>=0) ? ‘positive’ : ‘negative’) = conditional expression

THE SYSTEMS MODELING LANGUAGE (SYSML)

The OMG SysML Specification
 A language for systems engineering

o Supported by INCOSE as well as the OMG
 Current reference document (formal/10-06-01):

o http://www.omg.org/spec/SysML/1.2/PDF/ o http://www.sysmlforum.com
 Not a formal modeling language, but:

o Can be specialized further using the profile mechanism o SysML4Modelica – an OMG standard which overlays a
SysML syntax on Modelica (an executable modeling language)

UML 2 and SysML
 A refinement of UML (UML profile), but

o Some UML concepts excluded, others simplified, and
others specialized for systems engineering

o Possible to combine the excluded concepts

Excluded UML concepts

Reused UML concepts

Extended UML concepts

UML concepts

SysML concepts

SysML Diagram Types
Modified diagrams New di

agrams
Structure Diagram

SysML Diagram

Behavior Diagram

Internal Block Diagram

Block Definition

Activity Diagram

Statechart Diagram

Package Diagram Parametric Diagram
New diagrams diagrams

Sequence Diagram Requirement Diagram

UseCase Diagram

SysML Parametrics Modeling
 Serves two related purposes

o For capturing functional relationships and constraints
• E.g., the mass, acceleration, and force attribute of a physical
element are constrained by Newton’s law

related to various system properties

o For performing various quantitative analyses of

proposed designs and comparing design alternatives

 Similar intent as the MARTE analysis (sub)profiles

o MARTE approach is more versatile and more practical o Work is ongoing to merge the two

Parametric Diagram: Specifying Constraint Usage
par [Block] GolfSwing
«block» ball : GolfBall mass :Mass speed:Velocity m:Mass f:Force «block» club : GolfClub f:Force

n:NewtonsLaw
a:Acceleration

a:Acceleration

i:Integrator (f=a*dt)
v:Velocity

Summary and Conclusions
 The CERTUS experience with using OMG

standards (UML, SysML, and MARTE) for V&V of complex industrial systems has been positive o Including development of custom extensions via the
profile mechanism

o Used in conjunction with other standards (ISO 26262)
 The extensibility and customization capabilities of

the OMG modeling standards have proven useful and provide an opportunity for development of new and adaptation of existing standards for MBE

36