150 likes | 296 Views
Using the SHE Method for UML-based Performance Modelling. B.D. Theelen. Contents. Introduction Software/Hardware Engineering (SHE) UML Profile for SHE Parallel Object-Oriented Specification Language (POOSL) Performance Evaluation Tool Support Conclusions. Introduction.
E N D
Using the SHE Method forUML-based Performance Modelling B.D. Theelen www.ics.ele.tue.nl/~btheelen
Contents • Introduction • Software/Hardware Engineering (SHE) • UML Profile for SHE • Parallel Object-Oriented Specification Language (POOSL) • Performance Evaluation • Tool Support • Conclusions www.ics.ele.tue.nl/~btheelen
Introduction • Designing complex hardware/software systems entails evaluating the performance of several design alternatives • System-level design methods • 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 • Provide heuristics for applying certain modelling languages and performance analysis techniques • 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 www.ics.ele.tue.nl/~btheelen
UML-based Performance Modelling • UML provides ample notation to specify a system, but • 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 • UML models are in principle not executable • A formal (mathematically defined) semantics would • Allow integral application of mathematical analysis techniques • Enable unambiguous 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 executable models using the Parallel Object-Oriented Specification Language www.ics.ele.tue.nl/~btheelen
SHE: three phases • Formulation • UML profile for SHE • Commercial tool • Formalisation • Modelling language POOSL • Small set of expressive primitives • Formal semantics defines how to handle concurrency, time and stochasticity in POOSL model • SHESim tool • Performance evaluation • Based on Markov chain analysis • Analytic computation or estimation by simulation • Rotalumis tool www.ics.ele.tue.nl/~btheelen
UML Profile for SHE: Data Objects • Model passive resources (information) • Organised in data classes • Attributes are instance variables • Procedural behaviour specified with methods • Receiving messages results in atomic execution of equally named method • Similar to objects in traditional OO languages • Instances of data class RandomGenerator introduce stochasticity • Examples: state transition probabilities in state charts, probabilistic delays, … • Library classes for random variables of various distributions www.ics.ele.tue.nl/~btheelen
UML Profile for SHE: Processes • Model real-time behaviour of non-composite active resources (components) • Organised in process classes • Attributes • instance variables • instance parameters • Perform behaviour asynchronously concurrent • Behaviour specified with sequentially or concurrently executed methods • Initial method defines start behaviour • Synchronously pass messages (and data) over static channels through ports www.ics.ele.tue.nl/~btheelen
Behaviour of Processes • 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 S1and S2and … rap S1; … ; Sn • Synchronous message passing c!m(E1…Ei){Eat} c?m(p1…pi|Erc){Eat} • Non-deterministic selection sel S1or S2or … les • Guarded and atomic execution [E]S {E1; E2; … Ei} • Interrupt and abort interrupt S1with S2 abort S1with S2 • Loops and choice while E do S od if E then S1else S2fi • Data Expression E • Empty behaviour skip • Time synchronisation delay E • Full support for modelling behavioural hierarchy • Limited number of heuristics for deriving POOSL code provided www.ics.ele.tue.nl/~btheelen
Instance Structure Diagram UML Profile for SHE: Clusters • Model composite active resources (components) • Organised in cluster classes • Attributes are instance parameters • Do not define additional behaviour • Express structural hierarchy originating from aggregation relations between components www.ics.ele.tue.nl/~btheelen
Understandable POOSL Model + Extensions for Performance Evaluation Formal Semantics Markov Decision Process + Reward Structure External Scheduler Framework for Performance Evaluation • Mathematical 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 • Formalisation 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 • External scheduler (simulator) resolves non-determinism • Mathematically analysable discrete-time Markov chain Discrete-Time Markov Chain + Reward Structure www.ics.ele.tue.nl/~btheelen
Performance Evaluation • Analytical computation: ergodic theorem for Markov chains • Example: time-average buffer occupation • Estimation by simulation: central limit theorem for Markov chains • Example: packet-loss probability • Enables accuracy analysis with confidence intervals • Enables automatic termination of simulation when results are accurate • Library classes for analysing accuracy of different average and variance types www.ics.ele.tue.nl/~btheelen
Tool Support • SHESim • Incremental formalisation of UML models into POOSL model • Defining cluster classes based on drawing instance structure diagrams • Specifying process classes • Defining data classes www.ics.ele.tue.nl/~btheelen
Tool Support • SHESim • Interactive validation by inspectionof objects during simulation • Validation against • Collaboration diagrams • Message sequence charts • State charts and activity diagrams • Use case diagrams / scenarios www.ics.ele.tue.nl/~btheelen
Tool Support • Rotalumis • 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) www.ics.ele.tue.nl/~btheelen
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 www.ics.ele.tue.nl/~btheelen