non-functional analysis for uml models
TRANSCRIPT
Non-Functional Analysis for UML Models
Model Processing for AnalysisBen Watson
Tri-Pacific Software, [email protected]
2
The Real-Time UML Profile! Officially, it is The UML Profile for Schedulability,
Performance and Time! The profile was adopted at the September OMG
meeting in Toronto! The profile addresses the time related non-
functional characteristics of a UML model" Models for time, resources, concurrency" Sub profiles (and models) for schedulability and
performance" Software and hardware infrastructure and their
mapping" Specific notations for the above where necessary
! Stereotypes! Tagged values
3
Desired Development Model! Seamless integration of technologies and tools
based on standards for real-time modeling
Model EditingModel EditingToolTool
55
3.13.1
44
Model AnalysisModel AnalysisToolTool
Automatedmodel conversion
AutomatedAutomatedmodel conversionmodel conversion
Inversemodel conversion
InverseInversemodel conversionmodel conversion
UML modelUML modelUML model
Quantitative annotations
Quantitative Quantitative annotationsannotations
4
Instance- vs Class-Based Models
! Practically all analysis methods are concerned with instance-based models
! However, it is often useful to associate QoS characteristics with classes" Used to define default values that may be
overridden for specific instances! Need to apply a stereotype to both spec
elements and instance elements
N1:NodeN1:Node N3:NodeN3:Node
N4:NodeN4:Node
N2:NodeN2:Node
NodeNode
1
1
5
Example: Collaboration
6
Example: Annotated Sequence
7
What We Needed to Build! A schedulability analysis model processor! Two issues to address
" The program architecture" Extracting a timing model from the UML model
! Starting point for the model processor was RapidRMA, our Rate Monotonic Analysis (RMA) tool
! Our goal: To make the integration with multiple UML tools as seamless as possible" Make it unobtrusive (look like the host application)" Provide complete RMA tool capability" Do it interactively
8
Program Architecture
RMA AnalysisEngineUML System UMLRMA
RapidRMA
Adaptor
9
Schedulability Analysis Sub-Profile
RealTimeSituation
11
ResponseUtilization
OverlapsSlack Time
Spare Capacity
TriggerisSchedulable
1
1
+effect 1
+cause 1
/
1 1
1 11 1
SchedulingJob
1..n
0..n
1..n
0..n
0..n
1
0..n
1
SchedulingPolicy1
0..n
1
0..n
SchedulableResource
SResourceCapacityAcquisition TimeDeacquisition TimeisConsumablePriority CeilingisPreemptible
0..n
0..n
0..n
0..n
ExecutionEnginePriority RangeProcessing Rate
UtilizationisPreemptibleisSchedulable
Context Switch Time
1..n
0..n
1..n
0..n
0..n 0..1
+ownedResources
0..n 0..1
1
0..n
+host 1
0..n
<<deploys>>
0..n
0..n
+precedents
0..n
0..n
SActionPriority
Delay TimePreempted TimeReady TimeRelease TimeBlocking TimeLaxityAbsolute DeadlineRelative DeadlineisAtomic
Worst-case Completion Time
0..n0..n
+usedResources
0..n0..n /
1
0..n
+host
1
0..n
<<deploys>>
10
Defined Stereotypes (1 of 3)
An execution engineSASchedulingPolicy [0..1]SAAccessPolicy [0..1]SARate [0..1]SAContextSwitch [0..1]SAPriorityRange [0..1]SAPreemptible [0..1]SAUtilization [0..1]SASchedulable [0..1]Saresources [0..1]
Node, Instance, Object, Classifier, ClassifierRole
«SAEngine»
An actionSAPriority [0..1]SAActualPty [0..1]SABlocking [0..1] SAReady [0..1]SADelay [0..1]SARelease [0..1] SAPreempted [0..1]SAWorstCase [0..1]SALaxity [0..1] SAPriority [0..1]SAAbsDeadline [0..1]SARelDeadline [0..1] SAusedResource [0..1]SAhost [0..1]
Action, ActionExecution,Stimulus, Action, Message, Method…
«SAAction» (subclass of «RTaction» and «CRAction»)
DescriptionTagsApplies ToStereotype
11
Defined Stereotypes (2 of 3)
A resource of some kindSAAccessControl [0..1]SAConsumable [0..1]SACapacity [0..1]SAAcquisition [0..1]SADeacquisition [0..1]SAPtyCeiling [0..1]SAPreemptible [0..1]
Classifier, ClassifierRole, Instance, Object, Node
«SAResource»
A schedulable resourceClassifier, ClassifierRole, Instance, Object, Node
«SASchedulable» (subclass of «SAResource»)
A response to a stimulus or action
SAUtilization [0..1]SASpare [0..1]SASlack [0..1]SAOverlaps [0..1]
Action, ActionExecution,Stimulus, Action, Message, Method…
«SAResponse» (subclass of «SAAction»)
A precedence relationship between actions and triggers
Usage«SAPrecedes»
Identifies ownership of resources
Abstraction«SAOwns»(subclass of «GRMrealize»)
DescriptionTagsApplies ToStereotype
12
Defined Stereotypes (3 of 3)
Identifies sharable resources
Usage«SAUses»
A schedulability analysis context
Collaboration, CollaborationInstance, ActivityGraph
«SASituation»
Identifies schedulable resources used for execution of actions
Usage«SAusedHost»
A trigger SASchedulable [0..1]SASAprecedents [0..1]
Message, Stimulus«SATrigger» (subclass of «SAAction»)
A precedence relationship between actions and triggers
Usage«SAPrecedes»
A schedulerSASchedulingPolicy [0..1]SAExecutionEngine [0..1]
Classifier, ClassifierRole, Instance, Object
«SAScheduler»
DescriptionTagsApplies ToStereotype
13
Minimum Annotations for Schedulability! External signals and time triggered internal signals
" Occurrence pattern" Deadline
! Actions that process the signals" Execution time" Action sequence
! Precedence! Synchronous / asynchronous
! Deployment" Processor" Device" Instance
14
Minimum Annotations
15
Classifiers and Instances! All schedulability analysis is instance-based! Annotations on a classifier are permitted
" Default value for the entire class" An annotation on an instance overrides the
classifier annotation! Weak support for instances in UML tools
" No method to correlate instances on different sequence diagrams
" Adopt the convention that identical instance names refer to the same instance
! It is important to know when actions belong to the same instance of an object due to run-to-completion semantics
16
Rules to Extract Timing Model! The sequence diagrams determine the timing
model! Locate all external signals
" Incoming from the environment! Determine arrival pattern and deadline from
<<SATrigger>> and <<SAAction>> stereotypes! Determine the action that is the response to the
trigger event" Single action" Action sequence (precedence)
! <<SAAction>> and <<local::SAAction>>! Inherits the trigger occurrence pattern! End-to-end deadline
! Determine tasks and resources" Synchronous vs asynchronous messages
17
Example Sequence Diagram
18
Timing Model
telemetryGatherer
Tasks Resources
sensorData
sensors
19
Another Example
20
Timing Model
Tasks
/o3:O3::a3,1 /o5:O5::a3,3
/o3:O3::a3,2
21
Results Example
22
Conclusion! We have implemented a model processor
for the RT UML profile" Conforms to the standard" Meets our “seamless” goals
! Future work" Implement the entire standard
! Layered models! Parameterized tagged values
" Extensions to the standard! Stochastic analysis! Scripting interface
23
Questions?