Dtsi/Sol/L-LSP
Sébastien Gérard 1 11/18/2003
UML2 & Real-Time
UML2 et ses profils pour le temps-réel
ÉCOLE D'ÉTÉ TEMPS RÉEL 2005 GdR ARP – Thème StrQdS Nancy, 13 - 16 Septembre 2005 Sébastien Gérard CEA-LIST – Saclay
Sebastien.Gerard@cea.fr
UML2 et ses profils pour le temps-rel COLE D'T TEMPS REL 2005 GdR - - PowerPoint PPT Presentation
UML2 & Real-Time UML2 et ses profils pour le temps-rel COLE D'T TEMPS REL 2005 GdR ARP Thme StrQdS Nancy, 13 - 16 Septembre 2005 Sbastien Grard CEA-LIST Saclay Sebastien.Gerard@cea.fr Dtsi/Sol/L-LSP Sbastien
Sébastien Gérard 1 11/18/2003
Sebastien.Gerard@cea.fr
Sébastien Gérard 2 11/18/2003
Sébastien Gérard 3 11/18/2003
Extracted from B. Selic presentation during Summer School MDD For DRES 2004 (Brest, September 2004)
Sébastien Gérard 4 11/18/2003
Separation of concerns (e.g. “Aspect Oriented Modeling”)
Sébastien Gérard 5 11/18/2003
Extracted from B. Selic presentation during Summer School MDD For DRES 2004 (Brest, September 2004)
Sébastien Gérard 6 11/18/2003
Sébastien Gérard 7 11/18/2003
OOSE
(Jacobson et al.)
UML 0.9 UML 0.9
etc. ROOM Catalysis
UML 1.1 UML 1.1
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 200 2001 1 … …
ROOM Classe-Relation Fusion HOOD etc... OMT Booch OOSE
> 150 End of 1990 OMT
(Rumbaugh et al.)
Booch
Unified Method Unified Method
0.8
Sébastien Gérard 8 11/18/2003
Sébastien Gérard 9 11/18/2003
Sébastien Gérard 10 11/18/2003
UML 2.0 MOF 2.0 I nfrastructureLibrary
Specialisation of the existing UML meta-model
New meta-models related to the UML
Sébastien Gérard 11 11/18/2003
Classes, Actions, …
Defines the syntax in a notation independent way
Informal description Attributes & Associations Semantics (using natural language) Semantic Variation Points* Notation Presentation Options* Style Guidelines*, Examples*, Rationale, Changes from UML 1.4
* Optional parts
Sébastien Gérard 12 11/18/2003
Sébastien Gérard 13 11/18/2003
Sébastien Gérard 14 11/18/2003
Formal contract of the services available for clients.
Requirements from other components or services in the system.
Sébastien Gérard 15 11/18/2003
Sébastien Gérard 16 11/18/2003
Specifies a physical piece of information E.g. model files, source files, binary, …
Model physical computational resource with processing capability May support artifacts deployment for execution May consist of other devices
Implements a standard set of services that Components require at execution E.g. «OS», «workflow engine», «database system»
General mechanism to parameterize a Deployment relationship
Sébastien Gérard 17 11/18/2003
Sébastien Gérard 18 11/18/2003
Sébastien Gérard 19 11/18/2003
Dependency level
Sébastien Gérard 20 11/18/2003
Sébastien Gérard 21 11/18/2003
Sébastien Gérard 22 11/18/2003
Sébastien Gérard 23 11/18/2003
Sébastien Gérard 24 11/18/2003
Sébastien Gérard 25 11/18/2003
«import»
Actions operating in the context of activities and structured nodes.
«import»
ReplyAction, …
«import»
Sébastien Gérard 26 11/18/2003
Do not provide any concrete (or surface) language mapping with this proposed semantics! For depicting executable UML models, need to be defined!
Necessary to choose/create a notation (textual or/and graphical)
Notation is also called the concrete syntax of the language or surface action language.
Necessary to define the mapping with elements of the abstract syntax defined in the various elements of the Action sub-packages Would encompass both primitive actions and the control mechanisms provided by behaviors (Statemachine, Activity, …). May define higher-level constructs to the basic actions of the standard.
e.g. creating an object
CreateObjectAction » Creates an object that conforms to a statically specified classifier and puts it on an output pin at runtime. » The action has no other effect (no behaviors are executed, no initial expressions are evaluated, …) The new object has no structural feature values and participates in no links. » It is equivalent to the default constructor of C++ for example. Possible definition of a higher-level construct providing object creation with initialization as a single unit as a shorthand for several actions.
Sébastien Gérard 27 11/18/2003
e.g. CreateObjectAction, CallAction, …
Sébastien Gérard 28 11/18/2003
Synchronous call
The caller waits for completion of the invoked behavior. Possibility to manage exceptions that may be generated by the invoked behavior.
Asynchronous call
The caller proceeds immediately and does not expect a return value.
Operation call to a target object, where it may cause the invocation of associated behavior.
Invokes a behavior directly rather than invoking a behavioral feature that, in turn, results in the invocation of that behavior. Argument values of the action are available for the invoked behavior execution.
Either fire a state machine transition Or execute an activity.
Sébastien Gérard 29 11/18/2003
Sébastien Gérard 30 11/18/2003
sequential flow charts modeling but without concurrency.
and streaming.
loops and conditionals.
Sébastien Gérard 31 11/18/2003
Sébastien Gérard 32 11/18/2003
Tokens flow along edges. Tokens are operated by nodes.
Transform input control/data values into output control/data values for other actions.
Route control/data values through the graph.
e.g. Fork, Join, …
Store temporarily object/data values.
Synchronize the target action starting with the completion of the source action. Support only control values.
Support for data value passing between actions. Support only data values.
Sébastien Gérard 33 11/18/2003
nodes, and such dependencies are represented by edges in the activity diagram.
When specified conditions on the input tokens of a node are satisfied.
Conditions depend on the kind of node.
When a node begins execution, tokens are accepted from some or all of its input edges and a token is placed on the node.
A token is removed from the node and tokens are offered to some or all of its
Nodes linked by edges execute sequentially. Two actions not directly or indirectly ordered by flow relationships execute concurrently.
Sébastien Gérard 34 11/18/2003
Sébastien Gérard 35 11/18/2003
Sébastien Gérard 36 11/18/2003
Sébastien Gérard 37 11/18/2003
A B X C Z Y
A B X C Z Y
A B X C Z Y
A Z Y X C B
Sébastien Gérard 38 11/18/2003
calculateTorque in newSpeed : Speed = 0 return Integer Activity name Parameter list of the activity <DirectionKind> <paramName> : <Type> = <DefaultValue> Parameter «Precondition» newSpeed > 50 «Postcondition» return > 0 «singleExecution»
ActivityEdge ActivityNode «activity» calculateTorque
WCET: Integer getStartTime():Integer getStopTime(): Integer
Activity class notation for depicting reflexive features of activity.
activity calculateTorque (in newSpeed : Speed = 0): Integer
Usage of a frame representation for activity
Sébastien Gérard 39 11/18/2003
Sébastien Gérard 40 11/18/2003
i.e. owns a source and a target ActivityNode.
myEdge
Souce node Target node Regular activity edge Name of the edge (optional) «weight = 3» Edge weight: Integer or * C1 C1 Edge with connector
Sébastien Gérard 41 11/18/2003
e.g. » Violation detection at runtime or compile time? » Violation triggers error, warning… ?
Sébastien Gérard 42 11/18/2003
«localPrecondition» <ConstraintDescription> «localPostcondition» <ConstraintDescription>
Action name or a sentence that describes the action. Constraint description (pre/post-condition) or action label may be described using:
formal and executable modelling. self.calculateTorque(in cSpeed: Integer, out newTq: Integer); «localPrecondition» cSpeed > 50 «localPostcondition» newTq > 0
Sébastien Gérard 43 11/18/2003
Sébastien Gérard 44 11/18/2003
Sébastien Gérard 45 11/18/2003
Sébastien Gérard 46 11/18/2003
startRegulating mySRM :SpeedRegulationManager Start Stop start stop {t..t+3} 0 1 2 3 ... {d..d+1} startRegulating mySRM :SpeedRegulationManager Start 0 1 2 3 ... {d..d+1} Stop Stop
Sébastien Gérard 47 11/18/2003
Sébastien Gérard 48 11/18/2003
Sébastien Gérard 49 11/18/2003
Sébastien Gérard 50 11/18/2003
Handle Handle Event Event Initialize Initialize Object Object Terminate Terminate Object Object Wait for Wait for Event Event
Sébastien Gérard 51 11/18/2003
Processor => Consumes selected event
Dispatcher => Selects and dequeues an event
a b a
Queue => Saves incoming events
b
Sébastien Gérard 52 11/18/2003
Sébastien Gérard 53 11/18/2003
Handle Request Handle Handle Request Request Initialize Object Initialize Initialize Object Object Terminate Object Terminate Terminate Object Object Wait for Request Wait for Wait for Request Request Handle Request Handle Handle Request Request Initialize Object Initialize Initialize Object Object Terminate Object Terminate Terminate Object Object Wait for Request Wait for Wait for Request Request
Sébastien Gérard 54 11/18/2003
Active1 Active1 Active1 Active2 Active2 Active2
hi hi lo
Sébastien Gérard 55 11/18/2003
Off On
OnOff [speed>30] / startRegulating(); ++speed;
state final state Initial state Trigger:
root state Activity transition guard
/maintainSpeed() suspend resume
On
OnOff
Sébastien Gérard 56 11/18/2003
Off
OnOff [speed>30] / startRegulating(); ++speed;
On no-developed composite state pseudo-state => Choice compound transition concurrent state concurrent states ( regions)
OnOff
[error] OK damaged scan reset [¬ error]
Sébastien Gérard 57 11/18/2003
Off On start / defer start() all
«EPSM» SpeedRegulator
start() stop() abort() regulate() SpeedRegulator regulate()
“all” means for AnyReceivEvent In this case, either stop or abort event receipt may trigger the transition
Sébastien Gérard 58 11/18/2003
A timer is set to fire 10ms later 10ms later, if no state change
Sébastien Gérard 59 11/18/2003
1()
2()
1()
2()
Sébastien Gérard 60 11/18/2003
Sébastien Gérard 61 11/18/2003
[currentSpeed > 30] start() [currentSpeed > 30] regulate() /[currentSpeed > 30] stop()
Post-condition Pre-condition
Sébastien Gérard 62 11/18/2003
Sébastien Gérard 63 11/18/2003
executing and writes the obtained value to the given structural feature
executing and writes this value to the given structural feature
Examples
startRegulating « interface » rs:SpeedRegStarter mySRM :SpeedRegulationManager ssm :SpeedSensorManager start getSpeed currentSpeed upDateSpeedTarget (currentSpeed) d =duration t = now
t is assigned with the current time value when the getSpeed message is received. d = difference of time between reception and posting of the start message.
Sébastien Gérard 64 11/18/2003
readable language) put under brackets
e.g. OCL is often used for constraint description
startRegulating « interface » rs:SpeedRegStarter mySRM :SpeedRegulationManager ssm :SpeedSensorManager start getSpeed currentSpeed upDateSpeedTarget (currentSpeed) d1=duration t1 = now {d1..d1-d2} {t1..t1+3} d2=duration
The duration of this activity has to be between d1 and d1-d2 The return value currentSpeed has to be received between t1 and t1+3
Sébastien Gérard 65 11/18/2003
Sébastien Gérard 66 11/18/2003
Sébastien Gérard 67 11/18/2003
Infrastructure Models «modelLibrary» RealTimeCORBAModel General Resource Modeling Framework «profile» RTresourceModeling «profile» RTconcurrencyModeling «import» «import» «profile» RTtimeModeling Analysis Models «profile» PAprofile «import» «profile» RSAprofile «import» «profile» SAProfile «import» «import»
Sébastien Gérard 68 11/18/2003
Sébastien Gérard 69 11/18/2003
Stimulus generated by caller objects Stimulus received by called objects » Trigger a set of actions called scenario » Action executions may then generate stimulus…
Structural relationships between clients and resources
Scenario (i.e. set of actions) following the predecessor-successor model with possibly multiple and concurrent pred./succ.
Sébastien Gérard 70 11/18/2003
Sébastien Gérard 71 11/18/2003
Sébastien Gérard 72 11/18/2003
Sébastien Gérard 73 11/18/2003
Sébastien Gérard 74 11/18/2003
Sébastien Gérard 75 11/18/2003
Infrastructure Models «modelLibrary» RealTimeCORBAModel General Resource Modeling Framework «profile» RTresourceModeling «profile» RTconcurrencyModeling «import» «import» «profile» RTtimeModeling Analysis Models «profile» PAprofile «import» «profile» RSAprofile «import» «profile» SAProfile «import» «import»
Sébastien Gérard 76 11/18/2003
Sébastien Gérard 77 11/18/2003
Sébastien Gérard 78 11/18/2003
Sébastien Gérard 79 11/18/2003
Sébastien Gérard 80 11/18/2003
Sébastien Gérard 81 11/18/2003