460 likes | 466 Views
Explore Object-Oriented Modelling and Specification using the SHE methodology in software/hardware engineering. Understand the POOSL language with examples, design decisions, and system-level modelling. Delve into language design considerations and alternatives.
E N D
Object-Oriented Modelling and Specification using SHE M. Geilen, J. Voeten Information and Communication SystemsDepartment of Electrical Engineering Eindhoven University of Technology The Netherlands Marc Geilen, Email: geilen@ics.ele.tue.nl Eindhoven University of Technology, Information and Communication Systems >
Contents • Introduction: SHE • System Level Modelling • The POOSL Language • Example and tools • Conclusions & Further Research Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Software / Hardware Engineering Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Requirements Catalogue Object o1 Initial Requirements (class A) message c Object o3 P: Class A P: Class B (class B) Attributes: Attributes: M1 M2 Object o2 Messages: Messages: m (class A) message b network Relationship x Message Flow Diagrams Architecture Structure Diagrams Object Class Diagram formalisation Interaction Diagrams Instance Structure Diagrams o1 o2 o3 POOSL Object o1 (class A) 1:a 2:b functional behaviour, structure, communication, real-time 5:c Object o2 Object o3 (class A) (class B) SHE Methodology Framework Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
Object Class Diagram Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
SHE: Message Flow Diagram Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
Introduction: System Level Modelling Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Design Decisions and Models • Investigation of design alternatives to obtain a satisfying realisation. • Realising design alternatives to determine the values of these properties is too costly and time-consuming. • Values of properties must be determined from models. • A model is an abstract representation of some design realisation. • A model must be adequate for the properties that are relevant for making a design decision. Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
System Level Modelling • If a model is more abstract • it will in general be adequate for less properties with less accuracy; • it will be more difficult to realise; • it will be more compact; • it will take less time to develop; • it will be cheaper to deduce properties. • Design decisions taken early in the design process (based on abstract models) have a large impact on property values. Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example: Switch Fabrics • Design Issues • Queues • Priorities • Backpressure • Scheduling • Decision Properties • Throughput • Average Delay • Jitter • Quality of Service • Modelling Concepts • Modelling Entities • Concurrency • Communication/Synchronization • Time/Stochasticity Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Language Design Considerations/Alternatives • Modelling Entities • Separate Data & Control Autonomous Objects • Structural Behavioural • ... • Concurrency • Synchronous Asynchronous • Inherent to Modelling Entities Orthogonality • Communication/synchronisation • Synchronous Asynchronous • Buffered Unbuffered • ... • Time/stochasticity • Real-time Discrete-time Synchrony Hypothesis • Stochastic Probabilistic Non-determinism • ... POOSL Small Expressive Collection of Blending Language Primitives Selection Conflicts Orthogonality Mathematical semantics Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
The POOSL Language Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Overview of POOSL • POOSL (Parallel Object-Oriented Specification Language) is a formal specification language based on a timed version of process algebra CCS and on the basic concepts of traditional object-oriented programming languages (Smalltalk, Java, C++). • A POOSL specification consists of • A Top-Level Cluster; • Clusters & Cluster Classes; • Process Objects & Process Classes; • Data Objects & Data Classes. Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example: Switch Fabric Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Clusters • Hierarchical structural entities; • Statically interconnected in a topology of channels; • Connect to the channels through private ports; • Consist of process objects and other clusters; • Behave asynchronous concurrent; • Communicate by synchronous message passing; • Organised in cluster classes. Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example: Multistage Switch Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Process objects • Behavioural asynchronous concurrent entities; • Statically interconnected in a topology of channels; • Communicate by synchronous message passing; • Contain data objects; • Compositional behaviour descriptions • Primitive statements: data,time,communication • Constructors: Parallel composition, interrupts, … • Behavioural abstraction: methods; • Are organised in process classes. Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example: Switch Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
PS ::= ch?m(p1,…,pn | DE){DS} message reception | ch!m(DE1,…,DEn){DS} synchronous send | delay(DE) delay statement | timestamp x read model time | while E do PS od repetition | if E then PS1 else PS2 fi selection | DS {DS} data statement | PS1;PS2 sequential composition | sel PS1or … or PSn les choice statement | par PS1 and … and PSn rap parallel composition | PS1 interrupt PS2 interrupt statement | PS1 abort PS2 abort statement | [DE]PS guarded command | m(DE1,…,DEn)(p1,…,pn) method call Process Statements A method body consists of a process statement PS: The execution of PS can result in Action Performance & Time Passage Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
copy (10,12) 3.14 position( ) givePosition Example 1: Intuitive Semantics (10,12) Time: 0 instance variable point instance variable point initialize()() ch!givePosition; delay(3.14); ch?position(point). initialize()() ch?givePosition; ch!position(point). ch Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
startUp()() outputBufferArray:=new(Array) size(2); outputBufferArray put(1,new(BoundedFIFOBuffer) size(bufferSize)); outputBufferArray put(2,new(BoundedFIFOBuffer) size(bufferSize)); par handleInput1()() and handleInput2()() and handleOutput1()() and handleOutput2()() rap. Example 2: initial method startUp of Switch Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example 3: method handleInput1 of Switch handleInput1()() | cell: Cell | i1?cell(cell | outputBufferArray at(cell destinationPort) isNotFull) {outputBufferArray at(cell destinationPort) put(cell); cell nextDestinationPort}; delay(cellTime); handleInput1()(). Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example 4: method handleOutput1 of Switch handleOutput1()() [outputBufferArray at(1) isNotEmpty] o1!cell(outputBufferArray at(1) firstElement) {outputBufferArray at(1) removeFirstElement}; delay(cellTime); handleOutput1()(). Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example 5: Process Class Source Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Data objects • Behavioural sequential entities; • Can be created dynamically; • Communicate by message passing; • Invoke methods upon message reception; • Return results of method invocations to sender; • Are organised in data classes. Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example: Data class Exponential Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Data Statements and Expressions • A method body consist of a data statement DS : DS ::= x:=DE | DS1;DS2 | while DE do DS | if E then DS1 else DS2 fi | DE assignment to variable or parameter sequential composition repetition selection data expression • DE is a data expression, always evaluating to a data object: DE ::= x | new(C) | self | DE m (DE1,…,DEn) | -1,0,’a’,’b’,3.14,true,false | nil data object referenced by x newly created data object of data class C data object evaluating this expression method call constants of primitive classes constants undefined data object Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS > >
3 mu withParam(m:Real):Exponential mu:=m; rand:=new(RandomGenerator); return(self). some Random rand Example: Intuitive Semantics Consider the execution of the following statement: exp:=new(Exponential) withParam(3) Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Formal Semantics Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
a t (Mod, Act,T,{ | a Act},{ | t T}) a M M’ t M M’ c!m c?m t t t t M1 M’1 M2 M’2 M1 M’1 M2 M’2 delay(t) M1 || M2 M’1 ||M’2 M1 || M2 M’1 ||M’2 Formal Semantics: Transition System • Plotkin-style Structural Operational Interleaving Semantics defines a labelled transition system: Model M can perform action a and then behave as M’ Model M can delay for time t and then behave as M’ • Compositional Definition with Axioms and Inference Rules Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Synchronous Passage of Time Asynchronous Execution of Actions Action Urgency: Two-Phase Model [X.Nicollin, J.Sifakis ’91] Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Example: Lossy Channel Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Transition System of a Lossy Channel Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Analysis: Verification • Analytical (Exhaustive) • Generate complete transition system using the mathematical semantics • Exhaustive analysis of this transition system • Certain results but only applicable in case of relatively small (finite-state) systems • Empirical validation (By Simulation) • Generate one or more execution traces using the mathematical semantics • Analysis of these execution traces • Uncertain results but applicable in case of large and even infinite-state systems Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Analysis: Performance • Analytical (Exhaustive) • Generate complete transition system using the mathematical semantics • Exhaustive analysis of this transition system • Compute performance figures using Markov Reward Structures • Certain/precise results but only applicable in case of relatively small finite-state systems • Empirical (By Simulation) • Generate one or more execution traces using the mathematical semantics • Analysis these execution traces • Estimate performance figures using statistical methods • Uncertain results but applicable in case of large and even infinite-state systems Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Supporting Tools Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Editing (1) • Editing hierarchy and structure... Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
Editing (2) • Editing behaviour of process and data classes... Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
Simulation • Executing the behaviour of the model... Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
Validation • Validating system behaviour... Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
Scenarios • Using scenarios to focus on specific parts of the model... Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS
Empirical Performance Estimation • Automatic estimation of performance parameters. With a confidence of 95% the mean throughput is between 0.00871 and 0.00919 Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Conclusions & Further Research Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Conclusion (1) • POOSLPOOSL is a language developed for system level modelling.It combines a process part based on CCS with a data part based on traditional object-oriented programming languages • Architecture structure and topology is modelled graphically by means of clusters and channels • Complex real-time behaviour is modelled by asynchronous concurrent process objects • Complex dynamic functional behaviour is expressed by (travelling) data objects Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Conclusion (2) • Mathematical semanticsPOOSL is equipped with a complete mathematical semantics enabling analytical and empirical performance evaluation and formal verification • ToolsTools are available supporting • modelling, • simulation, • validation • performance analysis. Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >
Further Research • Performance evaluation • Probabilistic extension of the formal semantics • Model abstraction, analytical techniques based on stochastic processes • Empirical parameter estimation techniques applied to full models • Formal (real-time) verification • Model abstraction, exhaustive model checking • Non-exhaustive model checking applied to full models • Software synthesis (C++) • Rapid Simulation, Performance Analysis and Verification • Automatic Implementation Object-Oriented Modelling and Specification using SHE Eindhoven University of Technology, ICS >