Professional Documents
Culture Documents
Outline
Case Study
Method
Requirements
(Partitioning)
Analysis
Design
Outline
Case Study
Method
Requirements
(Partitioning)
Analysis
Design
Outline
Case Study
Method
Requirements
(Partitioning)
Analysis
Design
Requirement Node
A requirement node identifies a requirement by:
• A unique identifier (so as to achieve tracability)
• A description in plain text
• A type (functional, non functional, performance, security, . . . ).
Stereotype
(UML extension mechanism)
Identifier
Should be unique, explicit,
Unique ID. yet not too long
Useful to store requirements
in table or to trace them
Refinement <<refine>>
<<deriveReqt>>
Derivation
Builds a new requirement from the reuse <<Requirement>>
TechnicalRequirement
of other requirements ID=5
Text="The controller shall ..."
Kind="Functional"
<<Requirement>>
PressureController
ID=0
Text="The system shall protect the crew against high pressure"
Kind="Functional"
<<Requirement>>
<<Requirement>> CrewInformation
HighPressureDetection ID=4 <<Requirement>>
Text="The system shall informe the crew OptionalStoringOfPressureValues
ID=1 when the cabin has a too high pressure"
Text="The system shall check Kind="Functional" ID=7
the cabin against high pressure" Risk="Low" Text="All monitored pressure values shall
Kind="Functional" be stored by the software
(optional requirement)"
<<refine>> <<deriveReqt>>
<<deriveReqt>>
<<Requirement>> <<Requirement>>
PressureThreshold InformWithAlarm <<Requirement>>
ID=2 ID=5 RemovableDisk
Text="The system shall check if Text="The system shall rely on an alarm
the cabin pressure is below to inform the crew about an ID=8
a predefined threshold" over pressure in the cabin" Text="The system shall store recorded
Kind="Functional" Kind="Functional" values in a removable disk"
Kind="Functional"
<<deriveReqt>> <<refine>>
<<Requirement>> <<Requirement>>
UseOfPressureSensor AlarmDuration
ID=3 ID=6
Text="The system shall have a pressure Text="The over pressure alarm shall last
sensor to monitor the pressure 60 seconds after a high pressure has
of the cabin" been detected"
Kind="Functional" Kind="Functional"
<<Requirement>>
PressureControllerSoftware
ID=0
Text="The software shall protect the crew against high pressure"
Kind="Functional"
<<Requirement>> <<Requirement>>
HighPressureDetection CrewInformation <<Requirement>>
ID=1 ID=4 OptionalStoringOfPressureValues
Text="The software shall check Text="The software is expected to inform the crew ID=7
the cabin against high pressure" when the cabin has a too high pressure" Text="All monitored pressure values shall
Kind="Functional" Kind="Functional" be stored by the software
(optional requirement)"
<<deriveReqt>>
<<refine>>
<<deriveReqt>>
<<Requirement>>
<<Requirement>> InformWithAlarm
PressureThreshold ID=5 <<Requirement>>
ID=2 Text="The software shall trigger an external RemovableDisk
Text="The software shall check if alarm to inform the crew about an ID=8
the cabin pressure is below over pressure in the cabin" Text="The software shall store recorded
a predefined threshold" Kind="Functional" values in a removable disk provided
Kind="Functional" with the overall system"
<<refine>>
<<deriveReqt>>
<<Requirement>>
<<Requirement>> AlarmDuration
UseOfPressureSensor
ID=6
ID=3 Text="The over pressure alarm shall last
Text="The software shall rely on an 60 seconds after a high pressure has
external pressure sensor to monitor been detected"
the pressure of the cabin" Kind="Functional"
Kind="Functional"
Outline
Case Study
Method
Requirements
(Partitioning)
Analysis
Design
Design Challenges
Complexity
Very high software complexity
Very high hardware complexity
Problem
How to decide whether a function should
be implemented in SW or in HW, or both?
Solution
Design Space Exploration!
(a.k.a. ”Partitioning”)
Level of Abstraction
Problematic
Designers struggle with the complexity of integrated circuits
(e.g. System-on-chip)
Cost of late re-engineering
• Right decisions should be taken as soon as possible ...
• And quickly (time to market issue), so simulations must be fast
Application Modeling
Architecture Modeling
Mapping
Outline
Case Study
Method
Requirements
(Partitioning)
Analysis
Design
System Analysis
Analysis method
1. System boundary and main functions → Use Case Diagram
2. Relations between main functions → Activity Diagram
3. Communications between main system entities and actors →
Sequence Diagram
<<Actor>>
Use case Actor
Actor
PressureMonitoringSystem
getPressureInformation
Version2
<<include>>
PressureSensor
monitorAlarm
<<extend>> Alarm
savePressureValues
Storage
PressureMonitoringSoftware
getPressureInformation
Version2
<<include>>
PressureSensorDriver
monitorAlarm
<<extend>> AlarmDriver
savePressureValues
StorageDriver
Actors
<<Actor>>
Actor
Actor
Method
An actor identifier is a substantive
An actor must interact with the system
Use Case
Method
A use case is described by a verb
• The verb should describe the point of view of the system,
not the point of view of the actors
A use case diagram must NOT describe a step-by-step
algorithm
• A use case describes a high-level service/function, not an
elementary action of the system
<<include>>
Function SubFunction
Extension
• A function optionally includes another function
Function <<extend>>
OptionalFunction
Extension point
Inheritance
• A ”child” function specializes a ”parent” function
Function SpecializedFunction
CarAssembly
MakeFrame
StuttgartFactory
SettleWheels
BarcelonaFactory
Integrate
...
Shows
functional
flows in
the form of
succession
of actions
readSensorValue(x)
[ else ]
[ x < threshold]
[]
act startAlarm
act waitFor_60s
act stopAlarm
start
readSensorValue(x)
timerValue = 60
[ x>= threshold ]
[] []
[ else ]
[]
start [] act After1Second
start
timerValue = timerValue - 1
[ else ] [ timerValue == 0]
[]
act stopAlarm
readSensorValue(x)
act WriteToDisk_x_currentTime
[ else ]
[ x < threshold]
[]
actstartAlarm
act waitFor_60s
act stopAlarm
readSensorValue(x)
[ else ]
[ x < threshold]
[]
act startAlarm
act WriteToDisk_x_currentTime
act waitFor_60s
act WriteToDisk_x_currentTime
act stopAlarm
timerValue = -1
start
readSensorValue(x) timerValue = 60
[ else ]
[] [] act After1Second
start
start
timerValue = timerValue - 1
[]
act stopAlarm
timerValue = -1
Sequence Diagram
Message_Or_interaction_Name
Sender_name Receiver_name
rendez_vous_message
Sender_name Receiver_name
to_be_queued_message
Method
A sequence diagram depicts one possible execution run, NOT
the entire behavior of the system
NO message between actors
All actors must be defined in the use case diagram
• WARNING: Coherence between diagrams
My system
<<Actor>>
Sensor1 My system Actuator1 Actuator2
Actuator1
<<Actor>>
Function1
Sensor1 m1
<<Actor>>
⇒ m2
Actuator2 m3
Semantics
One global clock (applies to the entire system)
Time uniformly progresses (lifelines are read top-down)
Causal ordering of events on lifelines
• Time information must be explicitly modeled
message1 message1
@ {2..5}
{Tmin..Tmax}
message2 message2
Timers
Sender Receiver
Set timer
{timer=myTimer, duration=10}
request
ack
Reset timer
{timer=myTimer}
{timer=myTimer, duration=5}
Timer
expiration request
{timer=myTimer}
pressure(19)
pressure19
pressure(18)
pressure(21)
startAlarm
{timer=timerAlarm, duration=60}
{timer=timerAlarm}
stopAlarm
pressure(16)
Advanced trace
pressure(19)
pressure19
pressure(18)
pressure(21)
start
start
timerValue = 60
{1..1}
timerValue = 59
pressure(21)
start
timerValue = 60
pressure(19)
store(19)
pressure19
store(19)
pressure(18)
store(18)
pressure(21)
store(21)
startAlarm
{timer=timerAlarm, duration=60}
{timer=timerAlarm}
stopAlarm
pressure(16)
store(16)
pressure(19)
store(19)
pressure19
store(19)
pressure(18)
store(18)
pressure(21)
startAlarm
{timer=timerAlarm, duration=60}
store(21)
{timer=timerAlarm}
stopAlarm
pressure(16)
store(16)
Outline
Case Study
Method
Requirements
(Partitioning)
Analysis
Design
System Design
<<datatype>> <<block>>
myType Entity Block instance name
- flag = true : bool;
- number : int; - sequenceNumber ... Attributes
- data : myType;
Methods
- method1()
- method2(int param)
Note
Upper-case and lower case characters
Attributes are private elements
Signals have the package access right
• Package = a block + its sub-blocks
block
PressureController
(block code)
lossy = false
STATE1
Note
No parallelism
States can have several
STATE2
output transitions
[ else ] [ lossy ]
ON
Tmin
after (10,15)
Tmax
OFF
WAIT
Synchronous Communications
sig1(x) sig2(x)
x=x+1 Got2
sig1(x)
x=x+1 sig1(x)
sig2(x) Got1
sig1(x) sig2(x)
x=x+1 Got2
sig1(x)
x=x+1 sig1(x)
sig2(x) Got1
sig1(x) sig2(x)
x=x+1 Got2
sig1(x)
x=x+1 sig1(x)
sig2(x) Got1
x=1 x=2
WaitForDone
done_out(x) done_out(x)
T0 done_in(x) T1 T2
Broadcast Channel
x=1 x=2
WaitForDone
done_out(x) done_out(x)
T0 done_in(x) T1 T2
61/71 Une école de l’IMT UMLEmb - Modeling in SysML
Case Study Method Requirements (Partitioning) Analysis Design
Running
highPressure()
startAlarm()
after (alarmDuration,alarmDuration)
stopAlarm()
<<block>>
TimedSystem
- tempo : Timer; Timer declaration
~ out message()
~ in acknowledgement()
Set
The ”set” operation starts a timer with a value given as
parameter
The timer is based on a global system clock
Reset
Prevents a previously set timer to send an expiration signal
Expiration
A timer ”timer1” sends is a signal named ”timer1” to the
block instance it belongs to
⇒ A timer expiration is handled as a signal reception
Question
reset(tempo) RETRANSMISSION
Could we use an after clause
instead of the tempo timer?
STATE2
Pressure Controller
<<block>>
PressureController
(block code)
WaitingForNextCycle
SensingPressure
branchToUse = isInCode()
[else ]
[ branchToUse ]
pressure = readingPressure()
SendingPressure
pressureValue(pressure)
Pressure Sensor
WaitFirstHighPressure
pressureValue(currentPressure)
[ else ]
[ currentPressure < threshold]
HighPressure
LowPressure highPressure()
Main Controller
AlarmIsOff
highPressure()
setTimer(alarmTimer,alarmDuration)
alarmOn()
AlarmIsOn
highPressure() expire(alarmTimer)
reset(alarmTimer)
alarmOff()
setTimer(alarmTimer,alarmDuration)
Alarm Manager
69/71 Une école de l’IMT UMLEmb - Modeling in SysML
Case Study Method Requirements (Partitioning) Analysis Design
WaitingForAlarmCommand
alarmOn() alarmOff()
setAlarm(true) setAlarm(false)
AlarmOn AlarmOff
Alarm Actuator
→ Make exercises!