technische universiteit eindhoven 25 september 2002btheelen1 using the she method for uml-based...
TRANSCRIPT
![Page 1: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/1.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 1
technische universiteit eindhoven
Using the SHE Method forUML-based Performance Modelling
B.D. Theelen
![Page 2: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/2.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 2
technische universiteit eindhoven
Contents• Introduction• Software/Hardware Engineering (SHE)• UML Profile for SHE
– Parallel Object-Oriented Specification Language (POOSL)
• Performance Evaluation• Tool Support• Conclusions
![Page 3: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/3.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 3
technische universiteit eindhoven
Introduction• Designing complex hardware/software systems entails evaluating
the performance of several design alternatives• System-level design methods
– Present frameworks for developing executable modelsexecutable models, which• Describe a system in the early phases of the design process• Abstract from many implementation details (which are not all known yet)• Allow analysing performance properties before actually realizing the system in
hardware and software• Enable to take well-founded design decisions based on analysis results
– Provide heuristicsheuristics for applying certain modelling languagesmodelling languages and performance analysis techniquesanalysis techniques
– Are supplemented by toolstools that enable efficient application of analysis techniques by executing executing models according to semantics of modelling language
• UML is often used as modelling language
![Page 4: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/4.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 4
technische universiteit eindhoven
UML-based Performance Modelling• UML provides ample notation to specify a system, but
– InformalInformal dynamic semantics of UML diagrams complicates application of formalformal (mathematical) performance analysis techniques• Semantics of UML does not describe how to manage concurrency and time• UML models are in principle not executablenot executable
• A formal (mathematically defined) semantics would– Allow integral application of mathematical analysis techniques– Enable unambiguous executionunambiguous execution based on mathematical framework
• Software/Hardware Engineering (SHE)– System-level design method for complex real-time hardware/software
systems– Heuristics for developing UML models that can be transformed into formal formal
executable modelsexecutable models using the Parallel Object-Oriented Specification Language
![Page 5: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/5.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 5
technische universiteit eindhoven
SHE: three phasesConcepts & Requirements
ConceptModel
Questions
ExecutableModel
FormalProperties
ConceptsSatisfy Requirements
Formulation
Evaluation
FomalisationValidation Fomalisation
Component-Level Design
Milestone A
Milestone C
Milestone B
Sys
tem
-Le
vel
Des
ign
Fo
rmu
lati
on
Fo
rma
lis
ati
on
Eva
lua
tio
n
Yes
No
• Formulation– UML profile for SHEUML profile for SHE– Commercial tool
• Formalisation– Modelling language POOSL
• Small set of expressive primitives• Formal semantics defines how to
handle concurrencyconcurrency, timetime and stochasticitystochasticity in POOSL model
– SHESimSHESim tool• Performance evaluation
– Based on Markov chain analysis• Analytic computationcomputation or
estimation by simulationsimulation– RotalumisRotalumis tool
![Page 6: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/6.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 6
technische universiteit eindhoven
UML Profile for SHE: Data Objects
• Model passive resources (information)• Organised in data classesdata classes• Attributes are instance variablesinstance variables• Procedural behaviour specified with methodsmethods• Receiving messages results in atomic atomic
executionexecution of equally named method• Similar to objects in traditional OO languages
Na
me
Att
ribu
tes
Me
tho
ds
Me
ssa
ges
<<data>>Packet
<<instance variable>>Length: IntegerDestination: Integer
<<method>>setLength(L: Integer): PacketgetDestination(): Integer
• Instances of data class RandomGeneratorRandomGenerator introduce stochasticity– Examples: state transition probabilities in state charts, probabilistic delays, …
• Library classes for random variables of various distributions
![Page 7: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/7.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 7
technische universiteit eindhoven
UML Profile for SHE: Processes
Na
me
Att
ribu
tes
Me
tho
ds
Me
ssa
ges
<<process>>Switch_Core
<<instance parameter>>SwitchDelay: Real
<<instance variable>>P: Packet
<<method>>TransferPacket(ID: Integer)()
<<initial method>>Init()()
<<message>>In?PacketOut!Packet
• Model real-time behaviour of non-composite active resources (components)
• Organised in process classesprocess classes• Attributes
– instance variablesinstance variables– instance parametersinstance parameters
• Perform behaviour asynchronously concurrent• Behaviour specified with sequentially or
concurrently executed methodsmethods• Initial methodInitial method defines start behaviour• Synchronously pass messages (and data) over
static channelsstatic channels through ports
![Page 8: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/8.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 8
technische universiteit eindhoven
• Behaviour specified in state charts, activity diagrams, collaboration diagrams and message sequence charts
• Orthogonal POOSL statements– Method abstraction m(E1…Ei)(p1…pj)– Parallel and sequential composition par S1 and S2 and … rap S1; … ; Sn
– Synchronous message passing c!m(E1…Ei){Eat} c?m(p1…pi|Erc){Eat}– Non-deterministic selection sel S1 or S2 or … les– Guarded and atomic execution [E]S {E1; E2; … Ei}– Interrupt and abort interrupt S1 with S2 abort S1 with S2
– Loops and choice while E do S od if E then S1 else S2 fi– Data Expression E– Empty behaviour skip– Time synchronisation delay E
• Full support for modelling behavioural hierarchybehavioural hierarchy• Limited number of heuristics for deriving POOSL code provided
Behaviour of Processes
![Page 9: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/9.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 9
technische universiteit eindhoven
UML Profile for SHE: Clusters
Na
me
Att
ribu
tes
<<cluster>>Internet_Router
<<instance parameter>>SwitchDelay: Real
• Model composite active resources (components)• Organised in cluster classescluster classes• Attributes are instance parametersinstance parameters• Do notnot define additional behaviour• Express structural hierarchystructural hierarchy originating from
aggregation relations between components
Internet_Router
Inputs ToSwitch
A B
FromSwitch Outputs
Output_Buffers
FlowControl
OutIn
Sinks
In
Switch_Core
OutIn
A B
Input_Buffers
In
FlowControl
Out
Sources
Out
Instance Instance Structure Structure DiagramDiagram
![Page 10: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/10.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 10
technische universiteit eindhoven
Framework for Performance Evaluation• Mathematical framework based on formal semantics of POOSLMathematical framework based on formal semantics of POOSL• Formal semantics combines aspects of traditional OO languages
with probabilistic timed version of process algebra CCS• POOSL model defines a unique Markov decision process
Formal SemanticsFormal Semantics
Understandable POOSL Model
Markov Decision Process
• Formalisation of performance related aspects in UML diagrams involves extendingextending a POOSL model to define a reward structure– Example: variable to denote current occupancy of a buffer
+ Extensions for Performance Evaluation
+ Reward Structure
External SchedulerExternal Scheduler
• External scheduler (simulator) resolves non-determinismnon-determinism
Discrete-Time Markov Chain + Reward Structure
• Mathematically analysable discrete-time Markov chaindiscrete-time Markov chain
![Page 11: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/11.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 11
technische universiteit eindhoven
• Analytical computationcomputation: ergodic theorem for Markov chains– Example: time-average buffer occupation
Occupation Average )(
)()(
)(
)()(a.s.
1
1
SS
SS
n
ii
n
iii
Stπ
StSOccupationπ
Xt
XtXOccupation
N(0,1) σ
μ)(1
μ then )(1
if d.1a.s.
1
n
iin
ii
XPacketLostn
nXPacketLostn
Performance Evaluation
• Estimation by simulationsimulation: central limit theorem for Markov chains– Example: packet-loss probability
– Enables accuracy analysis with confidence intervalsconfidence intervals– Enables automatic terminationautomatic termination of simulation when results are accurate– Library classes for analysing accuracy of different average and variance types
![Page 12: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/12.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 12
technische universiteit eindhoven
Tool Support• SHESim
– Incremental formalisationformalisation of UML models into POOSL model– Defining cluster classes based on drawing instance structure diagrams– Specifying process classes– Defining data classes
![Page 13: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/13.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 13
technische universiteit eindhoven
Tool Support• SHESim
– Interactive validationvalidation by inspectionof objects during simulation
– Validation against• Collaboration diagrams• Message sequence charts• State charts and activity diagrams• Use case diagrams / scenarios
![Page 14: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/14.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 14
technische universiteit eindhoven
Tool Support• Rotalumis
– High-speed execution of large POOSL models for performance evaluationevaluation– Translates POOSL model into byte code that is executed on virtual machine
implemented in C++– Displays limited information about progress of simulation– Performance results are logged to files (based on the library classes)
![Page 15: Technische universiteit eindhoven 25 September 2002btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen](https://reader035.vdocuments.us/reader035/viewer/2022080914/56649cfa5503460f949cbfdd/html5/thumbnails/15.jpg)
25 September 2002 www.ics.ele.tue.nl/~btheelen 15
technische universiteit eindhoven
Conclusions• Performance modelling requires language with formal semantics
– Unambiguous execution based on mathematical framework– Integral application of mathematical analysis techniques
• System-level design method SHE distinguishes three phases– Formulation based on informal UML diagrams (UML profile for SHE)– Formalisation with formal modelling language POOSL
• POOSL model implicitly defines Markov chain– Evaluation based on Markov chain analysis
• Analytical computation or estimation by simulation• Library classes for accuracy analysis
• SHE offers tools for formalisation and evaluation phases– SHESim for creation and validation of POOSL models– Rotalumis for fast evaluation large POOSL models
• Future research on tool integrating computer support for all phases