technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen1 Using the SHE Method for UML-based Performance Modelling B.D. Theelen
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen2 Contents Introduction Software/Hardware Engineering (SHE) UML Profile for SHE –Parallel Object-Oriented Specification Language (POOSL) Performance Evaluation Tool Support Conclusions
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen3 Introduction Designing complex hardware/software systems entails evaluating the performance of several design alternatives System-level design methods executable models –Present frameworks for developing executable 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 heuristicsmodelling languages analysis techniques –Provide heuristics for applying certain modelling languages and performance analysis techniques tools executing –Are supplemented by tools that enable efficient application of analysis techniques by executing models according to semantics of modelling language UML is often used as modelling language
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen4 UML-based Performance Modelling UML provides ample notation to specify a system, but –Informal formal –Informal dynamic semantics of UML diagrams complicates application of formal (mathematical) performance analysis techniques Semantics of UML does not describe how to manage concurrency and time not executableUML models are in principle not executable A formal (mathematically defined) semantics would –Allow integral application of mathematical analysis techniques unambiguous execution –Enable unambiguous execution based on mathematical framework Software/Hardware Engineering (SHE) –System-level design method for complex real-time hardware/software systems formal executable models –Heuristics for developing UML models that can be transformed into formal executable models using the Parallel Object-Oriented Specification Language
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen5 SHE: three phases Formulation –UML profile for SHE –Commercial tool Formalisation –Modelling language POOSL Small set of expressive primitives concurrencytime stochasticityFormal semantics defines how to handle concurrency, time and stochasticity in POOSL model –SHESim –SHESim tool Performance evaluation –Based on Markov chain analysis computation simulationAnalytic computation or estimation by simulation –Rotalumis –Rotalumis tool
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen6 UML Profile for SHE: Data Objects Model passive resources (information) data classesOrganised in data classes instance variablesAttributes are instance variables methodsProcedural behaviour specified with methods atomic executionReceiving messages results in atomic execution of equally named method Similar to objects in traditional OO languages RandomGeneratorInstances of data class RandomGenerator introduce stochasticity –Examples: state transition probabilities in state charts, probabilistic delays, … Library classes for random variables of various distributions
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen7 UML Profile for SHE: Processes Model real-time behaviour of non-composite active resources (components) process classesOrganised in process classes Attributes –instance variables –instance parameters Perform behaviour asynchronously concurrent methodsBehaviour specified with sequentially or concurrently executed methods Initial methodInitial method defines start behaviour static channelsSynchronously pass messages (and data) over static channels through ports
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen8 Behaviour specified in state charts, activity diagrams, collaboration diagrams and message sequence charts Orthogonal POOSL statements –Method abstractionm(E 1 …E i )(p 1 …p j ) –Parallel and sequential compositionpar S 1 and S 2 and … rap S 1 ; … ; S n –Synchronous message passingc!m(E 1 …E i ){E at } c?m(p 1 …p i |E rc ){E at } –Non-deterministic selectionsel S 1 or S 2 or … les –Guarded and atomic execution[E]S {E 1 ; E 2 ; … E i } –Interrupt and abortinterrupt S 1 with S 2 abort S 1 with S 2 –Loops and choicewhile E do S od if E then S 1 else S 2 fi –Data ExpressionE –Empty behaviourskip –Time synchronisationdelay E behavioural hierarchyFull support for modelling behavioural hierarchy Limited number of heuristics for deriving POOSL code provided Behaviour of Processes
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen9 UML Profile for SHE: Clusters Model composite active resources (components) cluster classesOrganised in cluster classes instance parametersAttributes are instance parameters notDo not define additional behaviour structural hierarchyExpress structural hierarchy originating from aggregation relations between components Instance Structure Diagram
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen10 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 Semantics Understandable POOSL Model Markov Decision Process extendingFormalisation of performance related aspects in UML diagrams involves extending a POOSL model to define a reward structure –Example: variable to denote current occupancy of a buffer + Extensions for Performance Evaluation + Reward Structure External Scheduler non-determinismExternal scheduler (simulator) resolves non-determinism Discrete-Time Markov Chain + Reward Structure discrete-time Markov chainMathematically analysable discrete-time Markov chain
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen11 computationAnalytical computation: ergodic theorem for Markov chains –Example: time-average buffer occupation Performance Evaluation simulationEstimation by simulation: central limit theorem for Markov chains –Example: packet-loss probability confidence intervals –Enables accuracy analysis with confidence intervals automatic termination –Enables automatic termination of simulation when results are accurate –Library classes for analysing accuracy of different average and variance types
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen12 Tool Support SHESim formalisation –Incremental formalisation of UML models into POOSL model –Defining cluster classes based on drawing instance structure diagrams –Specifying process classes –Defining data classes
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen13 Tool Support SHESim validation –Interactive validation by inspection of objects during simulation –Validation against Collaboration diagrams Message sequence charts State charts and activity diagrams Use case diagrams / scenarios
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen14 Tool Support Rotalumis evaluation –High-speed execution of large POOSL models for performance evaluation –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)
technische universiteit eindhoven 25 September 2002www.ics.ele.tue.nl/~btheelen15 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