1 Marc Geilen, Email: [email protected]Eindhoven University of Technology, Information and Communication Systems Object-Oriented Modelling and Specification using SHE M. Geilen, J. Voeten Information and Communication Systems Department of Electrical Engineering Eindhoven University of Technology The Netherlands >
46
Embed
Marc Geilen, Email: [email protected] Eindhoven University of Technology, Information and Communication Systems 1 Object-Oriented Modelling and Specification.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 12
The POOSL
Language
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 13
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 14
Example: Switch Fabric
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 15
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 16
Example: Multistage Switch
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 17
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 18
Example: Switch
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 19
Process Statements A method body consists of a process statement PS:
The execution of PS can result in Action Performance & Time Passage
PS ::= | ch!m(DE1,…,DEn){DS} synchronous send
| delay(DE) delay statement
| while E do PS od repetition
| DS {DS} data statement | if E then PS1 else PS2 fi selection
message receptionch?m(p1,…,pn | DE){DS}
| sel PS1 or … or PSn les choice statement | par PS1 and … and PSn rap parallel composition | PS1 interrupt PS2 interrupt statement | PS1 abort PS2 abort statement
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 24
Example 5: Process Class Source
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 25
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 26
Example: Data class Exponential
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 27 >
Data Statements and Expressions
DS ::= x:=DE | DS1;DS2
| while DE do DS | if E then DS1 else DS2 fi
| DE
assignment to variable or parametersequential compositionrepetitionselectiondata expression
•A method body consist of a data statement DS :
>
DE ::= x | new(C) | self | DE m (DE1,…,DEn)
| -1,0,’a’,’b’,3.14,true,false | nil
data object referenced by xnewly created data object of data class Cdata object evaluating this expressionmethod callconstants of primitive classes constantsundefined data object
• DE is a data expression, always evaluating to a data object:
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 28
mu
rand
withParam(m:Real):Exponential
mu:=m;
rand:=new(RandomGenerator);
return(self).
Example: Intuitive Semantics
Consider the execution of the following statement:exp:=new(Exponential) withParam(3)
3
some
Random
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 29
FormalSemantics
>
Object-Oriented Modelling and Specification using SHE
Model M can perform action a and then behave as M’
Model M can delay for time t and then behave as M’
>
M M’a
• Compositional Definition with Axioms and Inference Rules
(Mod, Act,T,{ | a Act},{ | t T})a t
M M’t
delay(t)
tM1 || M2 M’1 || M’2
t
M2 M’2t
M1 M’1t M1 M’1
c!mM2 M’2
c?m
M1 || M2 M’1 || M’2
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 31
Action Urgency: Two-Phase Model
Asynchronous Execution of Actions
Synchronous Passage of Time
>
[X.Nicollin, J.Sifakis ’91]
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 32
Example: Lossy Channel
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 33
Transition System of a Lossy Channel
in?cell
out!ce ll
100
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 34
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 35
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 36
SupportingTools
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 37
Editing (1)
• Editing hierarchy and structure...
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 38
Editing (2)
• Editing behaviour of process and data classes...
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 39
Simulation
• Executing the behaviour of the model...
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 40
Validation
• Validating system behaviour...
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 41
Scenarios
• Using scenarios to focus on specific parts of the model...
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 42
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 43
Conclusions & Further Research
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 44
Conclusion (1)
• POOSL
POOSL 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 45
Conclusion (2)
• Mathematical semantics
POOSL is equipped with a complete mathematical semantics enabling analytical and empirical performance evaluation and formal verification
• Tools
Tools are available supporting
– modelling,
– simulation,
– validation
– performance analysis.
>
Object-Oriented Modelling and Specification using SHE
Eindhoven University of Technology, ICS 46
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