Visual Modelling R J Walters. Introduction Motivation The Language The tools An example Conclusion.
Post on 21-Dec-2015
219 Views
Preview:
Transcript
Visual Modelling
R J Walters
Introduction
Motivation The Language The tools An example Conclusion
Issues in threaded and distributed systems
Connecting the parts
Getting the result to make sense
RaDraw
A tool for generating RolEnact models
Background: RolEnact
A tool for investigating the behaviour of Role based models
First models built using “raw” Enact code
Now has – simplified language– 32 bit implementation
A RolEnact model running
• Separate (named) window for each instance of a Role • First line inside window shows present state of Role• List of possible actions• Perform an action and all Roles re-evaluate their state
“Raw” RolEnact code
class Control < Role.class Counter < Role.
Control.addEvent('New_counter).Control.New_counterReady():= self.inState('initial).
Control.New_counterDoit():= (self.setState('initial); self.Counter:= Counter.create(); self.Counter.Control:=self).
Counter.addEvent('Enquire).Counter.EnquireReady():= self.inState('initial) and Account_System.exists('initial).
Counter.EnquireDoit():= (self.setState('waiting ); aRole:=Account_System.choose('initial); aRole.setState('searching ); self.Account_System:=aRole; aRole.Counter:=self).
New RolEnact code
Create Control.New_counterMe( initial -> initial= )New Counter
End
Selection Counter.EnquireMe( initial -> waiting )Account_System( initial -> searching )
End
Better, but still “too hard” for target users
RaDraw
A friendly front end Displays RE model as code or a
diagram Can build and edit a model Calls RolEnact to run a model
But
Diagram and code are not equivalent Difficulty with what the diagram means
… I wanted to do something better
RDT
Draw your processes (components) Draw how they are connected Run the model in the execution tool Use a model checker on it - SPIN * Limitations are accepted in exchange
for ease of use
RDT: Processes
Process has state Displayed as a picture Built using system of dialogue boxes 3 types of event
– Receive– Send– Create
RDT: Events, Receive
State 1
State 2
ReceiveEvent Value Channel
RDT: Events, Send
State 1
State 2
SendEvent Value Channel
RDT: Events, Create
State 1
State 2
CreateEvent NewValue Channel
An example process
An example process
RDT: Models
Add instances of processes to your model
Describe how these instances are (initially) connected
Models: Process Instances
Inst1: ProcTypeCh2
Ch1
Inst2: ProcTypeCh2
Ch1
Models: Connections
Inst1: ProcTypeCh2
Ch1
Inst2: ProcTypeCh2
Ch1
Example model
Example model
What next?
Execute the model
Use a model checker on it
Channels:
Communication in RDT is based on that used in the pi-calculus
Similar identity between values and channels
RDT also permits asynchronous communication
– Need channels in the execution tool
Executing the model
Each Process instance has a window which shows:– Name and type– State– List of available actions– List of local channel names mapping these
to instances of channels
Executing the model
Each Channel (instance) has a window which shows:– Name– List of values held in the channel
The Execution tool
The Execution tool
Conclusion
Language, model construction tool, execution tool, translation tool
Builds formal models using “informal” methods
top related