Embedded systems soon > 50 % of market ! With more and more - - PowerPoint PPT Presentation

embedded systems soon 50 of market
SMART_READER_LITE
LIVE PREVIEW

Embedded systems soon > 50 % of market ! With more and more - - PowerPoint PPT Presentation

Real time system modeling with UML : current status and some prospects Franois Terrier, Sbastien Grard LETI (CEA - Technologies Avances) DEIN CEA/Saclay F-91191 Gif sur Yvette Cedex France Phone: +33 1 69 08 62 59 ; Fax: +33 1 69 08 83


slide-1
SLIDE 1

Real time system modeling with UML: current status and some prospects

François Terrier, Sébastien Gérard

LETI (CEA - Technologies Avancées) DEIN CEA/Saclay F-91191 Gif sur Yvette Cedex France Phone: +33 1 69 08 62 59 ; Fax: +33 1 69 08 83 95 Francois.Terrier@cea.fr ; Sebastien.Gerard@cea.fr

slide-2
SLIDE 2
  • ! With more and more importance of software

Embedded systems soon > 50 % of market

"

slide-3
SLIDE 3
  • Use of a « universal » modeling standard

" We must go from artisanal practices to industrial production solutions

# high level modeling and component based development

# Idea integration of complementary/concurrent modeling notations proposed for OO methods

ROOM Classe-Relation Fusion HOOD etc... OMT Booch OOSE

Fin 1990

slide-4
SLIDE 4
  • Use of a « universal » modeling standard

" We must go from artisanal practices to industrial production solutions

# high level modeling and component based development

# Idea integration of complementary/concurrent modeling notations proposed for OO methods

OOSE

(Jacobson et al.)

UML 0.9 UML 0.9

1996

etc. ROOM Catalysis

OMG OMG

UML 1.1 UML 1.1

  • Nov. 1997
  • Nov. 1997

UML 1.3 UML 1.3 UML 1.4 UML 1.4 UML 2.0 UML 2.0

Jun June e 1999 1999 End of End of 2000 2000 … … OMT

(Rumbaugh et al.)

Booch

Unified Method Unified Method

0.8

1995

Rational Rational

slide-5
SLIDE 5
  • But what about real-time systems ?

" Importance of dynamic in such system requires the specialization of the modeling language " Solutions have been developed to integrate current practices into the UML OO framework:

! More or less advanced levels of integration of real time and object paradigms

" Variability of the practices of real time domain depending on the context: small embedded system or installation

control and command, production automaton, distributed systems, safety critical systems, telecom, high performance computing…

# Low level of automatic integration of the « good practices »

slide-6
SLIDE 6
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • Menu
slide-7
SLIDE 7
  • UML 1.3: essential models

"

  • #
  • "
  • #
  • "
  • #
  • "
  • #
  • "
  • #
slide-8
SLIDE 8
  • Speed Regulator

use case

regulate speed start regulating stop regulating

« include »

actor

Regulator On/Off Motor SpeedSensor

environment system system border relation

slide-9
SLIDE 9
  • generalization

Regulator_S RegulatingLaw Speed Regulator

class role

regLaw

arity

0..*

association aggregation

sp 0..*

Regulator Speed

Active objects Active objects

slide-10
SLIDE 10
  • "
  • Memory space
  • anActiveObject

Messages

Attributes

  • perations

code Messages ?

"

  • ?

? ? ?

#

slide-11
SLIDE 11
  • Sequence

diagram

: :RegulatorScreen RegulatorScreen :Regulator :Regulator : :RegulatoingLaw RegulatoingLaw

  • time

calculate() dtorque maintainSpeed() update(info)

Asynchronous message Synchronous message response instance Life line

slide-12
SLIDE 12
  • "
  • #
  • $
  • "
  • #
  • $
  • #
  • $
  • "
slide-13
SLIDE 13
  • Off

Off

start [vitesse>30] / startRegulating() stop/

  • state

final state Initial state Trigger event State machine action expression transition guard

slide-14
SLIDE 14
  • Off

Off

start [vitesse>30] / startRegulating() stop/

  • state

final state Initial state Trigger event State machine action expression transition guard group transition composite state Running Suspended

/maintainSpeed() suspend resume

On

slide-15
SLIDE 15
  • "
  • #
  • $
  • $
  • $
  • $
  • UML state machines

messages

"

  • #
  • "
  • #
  • #
slide-16
SLIDE 16
  • after(10 ms) / ‘action-list’

S1 S2 S2 S1

"

  • #
  • UML 1.3 timing specifications

%

  • %
  • #
  • < 1 sec.

{b.receiveTime – a.sendTime < 1sec.} 01 02 a : m

1

b : m2 03 c : m3

propagation delay

  • f the message

after(10 ms)

A timer is set to fire 10ms later 10ms later, if no state change

/ ‘action-list’

slide-17
SLIDE 17
  • Meta Meta Model (M3)

Model (M1) Objects (M0) Meta Model (M2) MOF UML

instanceOf instanceOf instanceOf instanceOf instanceOf instanceOf instanceOf instanceOf

myCar Car

instanceOf instanceOf

Entity

instanceOf

Class

instanceOf Standard profiles (M2) Specific user profiles (M2)

SDL? Real Time? SPE UML-RT

Application model Application implantation

slide-18
SLIDE 18
  • UML 1.3: specialization mechanisms

"

  • "
  • "
  • !
  • !
  • !
slide-19
SLIDE 19
  • UML 1.3: specialization mechanisms

"

  • "
  • "
  • Organisation

Organisation needs needs ! ! ! ! ! ! ! ! notion of Profile in UML 1.3 notion of Profile in UML 1.3

Set of tagged values and of constraints specializing an element of the meta-model

slide-20
SLIDE 20
  • "Objective

Specialization of a standard meta-model (e.g., UML) into a specific meta-model dedicated to a given application domain.

UML profile definition

slide-21
SLIDE 21
  • ! Selected elements of the reference meta-model

" A profile can contain:

Fundamental meta-classes on which is based the profile

UML profile definition

slide-22
SLIDE 22
  • ! Selected elements of the reference meta-model

! Extension mechanisms

" A profile can contain: UML profile definition

Stereotypes, tagged values, constraints added to the profile

slide-23
SLIDE 23
  • ! Selected elements of the reference meta-model

! Extension mechanisms ! Descriptions of the profile semantics

" A profile can contain: UML profile definition

Clarification of « Semantics Variation Points »

  • r UML ambiguities
slide-24
SLIDE 24
  • ! Selected elements of the reference meta-model

! Extension mechanisms ! Descriptions of the profile semantics ! Additional notations

" A profile can contain: UML profile definition

e.g.:

Mr Dupont

« driver »

Mr Dupont

slide-25
SLIDE 25
  • ! Selected elements of the reference meta-model

! Extension mechanisms ! Descriptions of the profile semantics ! Additional notations ! Rules for model translation, validation, presentation

" A profile can contain: UML profile definition

Système Train Control Circuit

?

e.g.:

slide-26
SLIDE 26
  • UML 1.3: lacks, ongoing works at the OMG

"

  • #
  • $
  • $
  • $
  • #
  • $
  • &

& & &

  • #
slide-27
SLIDE 27
  • #
  • ARTiSAN: two orthogonal models, weak integration

"

  • "
  • "
  • #

An implementing stage (assignment of the objects to tasks)

"

  • #

A classical task model called the concurrent model

Actuator control Motor Actuator Control calculation Speedmeter control Channel1 Speedmeter PMH

# A classical UML modeling facilities

::Commande update read ::RegulatingLaw calculate * pRegLaw regLaw:Commande update() read() Actuator control Motor Actuator Control calculation Speedmeter control Channel1 Speedmeter PMH

slide-28
SLIDE 28
  • RT-UML: two « orthogonal » but « integrated » models

"

  • !

Rhapsody tool

ActuatorControl « reactive » RegControl SensorControl pRC 1 pAC 1 RegulatingLaw pAC 1

SpeedRegulator_Behavior

On

stopRegulating() / updateScreen(OFF);

Off

startRegulating()

/

targetSpeed = returnValue;

#

slide-29
SLIDE 29
  • RT-UML: two « orthogonal » but « integrated » models

"

  • !

Rhapsody tool

ActuatorControl « reactive » RegControl SensorControl pRC 1 pAC 1 RegulatingLaw pAC 1 RegControlTask RegControl ActControlTask ActuatorControl

SpeedRegulator_Behavior

On

stopRegulating() / updateScreen(OFF);

Off

startRegulating()

/

targetSpeed = returnValue;

SpeedRegulator_Behavior

On

stopRegulating() / updateScreen(OFF);

Off

startRegulating()

/

targetSpeed = returnValue;

#

  • #
  • #
  • SensorControl
slide-30
SLIDE 30
  • RT-UML: non homogenous features

"

  • #
  • #
  • $
  • $
  • #
  • #
  • "
  • &
  • "
slide-31
SLIDE 31
  • UML/SDL: association of UML analysis and SDL design

"

  • #
  • #
  • &
  • #
  • &
  • ActuatorControl

RegControl

[cmd]

C1 SensorControl

[speed]

C2 ActuatorControl RegControl SensorControl pRC 1 pAC 1 RegulatingLaw pAC 1

Newtype RegulatingLaw Operators calculate : Speed, Speed -> TorqueVariation endnewtype:;

slide-32
SLIDE 32
  • UML/SDL: association of UML analysis and SDL design

"

  • #
  • #
  • &
  • #
  • &
  • ActuatorControl

RegControl

[cmd]

C1 SensorControl

[speed]

C2 ActuatorControl RegControl SensorControl pRC 1 pAC 1 RegulatingLaw pAC 1

Newtype RegulatingLaw Operators calculate : Speed, Speed -> TorqueVariation endnewtype:;

SpeedRegulator_Behavior

On

stopRegulating() / updateScreen(OFF);

Off

startRegulating()

/ targetSpeed = returnValue;

Stopped Running Stopped Running stopRegulating updateScreen(OFF) startRegulating targetSpeed = returnvalue

slide-33
SLIDE 33
  • UML/SDL: mapping is under user responsibility

"

  • #
  • &
  • #
  • &
  • #
  • &
  • "
  • "
  • &
slide-34
SLIDE 34
  • UML-RT: attempt to integrate task and object paradigms

"

  • #
  • #
  • !
  • "
  • #
  • « capsule»

anEmitter : Emitter

State 1 State 2 portA.send (s

1) ;

Signal sending Communication port

« protocol » infoProto incoming

S1 Protocol

portA : infoProto portB : infoProto~

capsule link « capsule»

aReceiver : Receiver

Behaviour

slide-35
SLIDE 35
  • UML-RT (ROOM/ObjecTime & ROSE-RT): Synthesis

"

  • #
  • "
  • "
  • "
  • « capsule »

anEmitter : Emitter « capsule » aReceiver : Receiver Etat 1 Etat 2 s1 / msg &reply(s 2 , 5); Etat 1 Etat 2

a : infoProto b : infoProto ~

s1

MyInfo info; pMsgReturn = portA . invoke(s 1) ; info=*(MyInfo*) pMsgReturn.data;

s2

5 « protocol » infoProto incoming

  • utgoing

s1 s2

slide-36
SLIDE 36
  • Synthesis on current offers

" Weak integration of object and real time…

$

Two very different models (e.g., ARTiSAN, UML/SDL)

$

Behavior lies on operation and signal processing but with poor links to the usual object interface

$

Focus is made more on signal than on operations that leads to behavior specification mixing up control action at object level and processing actions at operation level

$

Output parameters often hard to manage

" Poor facilities to express timing constraints

$

Specification of timers or of priorities

$

Implementation of real time constraints kept to the users

$

Sometimes difficulties to map model constraints on RT-OS & model / task priorities with OS priority management policies

slide-37
SLIDE 37
  • Larger market & New users & New needs

" Customers want to specify good RT models

" Notations are not sufficient: method of use is required

# Continuity and “tracability” of the model is mandatory # Availability of Model and application validation is critical

Customers

Providers

The system must…

Specification

Product

Prototype

? ?

# They want also to be able to prototype/develop the systems

slide-38
SLIDE 38
  • ACCORD/UML: introduction of real-time objects

"

  • #
  • #
  • "
  • #
  • #
  • #
  • "
slide-39
SLIDE 39
  • aRealTimeObject
  • peration_1
  • peration_2

... Extern interface

ACCORD/UML: « task » model

"

  • &
  • "
  • perations

code

  • Attributes
slide-40
SLIDE 40
  • aRealTimeObject
  • peration_1
  • peration_2

... Extern interface

Memory space

ACCORD/UML: « task » model

"

  • &
  • "
  • perations

code Attributes

slide-41
SLIDE 41
  • aRealTimeObject
  • peration_1
  • peration_2

... Extern interface

Memory space

ACCORD/UML: « task » model

"

  • &
  • "
  • perations

code

Message processing & attribute access control

Attributes

slide-42
SLIDE 42
  • aRealTimeObject
  • peration_1
  • peration_2

... Extern interface

Memory space

ACCORD/UML: « task » model

"

  • &
  • "
  • perations

code

  • Message processing &

attribute access control

  • Operation calls

Operation calls

Signals

S i g n a l s

Attributes

slide-43
SLIDE 43
  • ACCORD/UML: communication with RTO

"

  • #
  • #
  • $
  • #
  • $
  • &
  • "
  • #
slide-44
SLIDE 44
  • "
  • SpeedRegulator_Behavior

On

stopRegulating()

Of

startRegulating() stopRegulating() [deltaT

  • rque < 0]

/ accelerator - >setPosition(deltaP); WRF_WorldFIP

/ spMeter -> getSpeed(); return (spMeter -> getSpeed) / realSpeed = returnValue;

/ deltaP = k1 * atan (targetSpeed

  • realSpeed);

S1 S2

[deltaTorque >= 0] / brake - >setPosition(deltaP); / updateScreen(“OFF”);

TimeOut(Tc) / targetSpeed = returnValue;

maintainEnd / updateScreen(“OFF”);

ACCORD/UML: two levels of state machines

slide-45
SLIDE 45
  • ACCORD/UML: two levels of state machines

#

  • $
  • stopRegulating()

OnOffReg / startRegulating() / maintain() {RTF=p(500, ms)} [cuSp<50] / stopRegulating() maintain() Stopped Running startRegulating() OnOffReg / stopRegulating()

Begin start_stopRegulating() / display → update(Off);

#

  • $
  • &
  • "
slide-46
SLIDE 46
  • ACCORD/UML: Real-Time implementation

"

  • #
  • #
  • #
  • $
  • "
  • #
  • #
slide-47
SLIDE 47
  • ACCORD/UML: synthesis

"

  • #
  • "
  • #
  • "
  • "
  • #
slide-48
SLIDE 48
  • Some open points

"

  • "
  • #
  • "
  • #
  • #
  • #
  • "
slide-49
SLIDE 49
  • "
  • "
  • "
  • "
  • "
  • "
  • "
  • "