VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg...
-
Upload
amaya-bolas -
Category
Documents
-
view
214 -
download
0
Transcript of VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg...
![Page 1: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/1.jpg)
VIP: A Visual Editor and Compiler for v-Promela
Stefan LeueAlbert-Ludwigs-University Freiburg
http://www.informatik.uni-freiburg.de/~leue
March 31, 2000
![Page 2: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/2.jpg)
Stefan Leue - 2 -
Joint work with
Moataz Kamel
![Page 3: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/3.jpg)
Stefan Leue - 3 -
Outline
Introduction
Modeling with VIP structure behaviour
Compilation of Promela code structure behaviour
Property Validation using SPIN POTS CORBA GIOP
Conclusions
![Page 4: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/4.jpg)
Stefan Leue - 4 -
Visual Interface for Promela (VIP)
Based on v-Promela visual notation for describing structure and behaviour of
concurrent, object-based systems syntax based on UML-RT (ROOM in UML’s clothes) incorporates Promela features supports hierarchical modeling of structure and
behaviour can be compiled into Promela code transparent use
of SPIN
![Page 5: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/5.jpg)
Stefan Leue - 5 -
Visual Interface for Promela (VIP)
VIP GUI-based tool for editing and maintaining v-Promela
models v-Promela to Promela compiler
![Page 6: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/6.jpg)
Stefan Leue - 6 -
Modeling Steps Supported by VIP
Structure concurrent objects: capsules message passing interfaces: ports data classes data objects signal lists: protocols
Behaviour states transitions transition code
![Page 7: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/7.jpg)
Stefan Leue - 7 -
Running Example: POTS
Simple Plain Old Telephony Call Processing two user objects each one controlled by a phone handler object phone handlers communicate to set up and tear down
calls
![Page 8: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/8.jpg)
Stefan Leue - 8 -
Structure Definition in VIP
![Page 9: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/9.jpg)
Stefan Leue - 9 -
Protocols
![Page 10: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/10.jpg)
Stefan Leue - 10 -
Data Classes
![Page 11: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/11.jpg)
Stefan Leue - 11 -
Data Classes
![Page 12: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/12.jpg)
Stefan Leue - 12 -
Message Types
![Page 13: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/13.jpg)
Stefan Leue - 13 -
Data Objects
![Page 14: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/14.jpg)
Stefan Leue - 14 -
Ports
![Page 15: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/15.jpg)
Stefan Leue - 15 -
Internal Capsule Structure
![Page 16: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/16.jpg)
Stefan Leue - 16 -
Connectors
![Page 17: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/17.jpg)
Stefan Leue - 17 -
State Machines
![Page 18: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/18.jpg)
Stefan Leue - 18 -
Substate Refinement
![Page 19: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/19.jpg)
Stefan Leue - 19 -
State Entry/Exit Code
![Page 20: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/20.jpg)
Stefan Leue - 20 -
Transition Code
![Page 21: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/21.jpg)
Stefan Leue - 21 -
Transition Code
![Page 22: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/22.jpg)
Stefan Leue - 22 -
Transition Code
![Page 23: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/23.jpg)
Stefan Leue - 23 -
Transition Code
![Page 24: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/24.jpg)
Stefan Leue - 24 -
Buffers and Synchronizers
Buffers queue variables buffer access points producer-consumer system
Synchronizers enable Promela-style synchronous communication
amongst arbitrary sets of capsule instances example: semaphores
![Page 25: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/25.jpg)
Stefan Leue - 25 -
Semaphore
![Page 26: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/26.jpg)
Stefan Leue - 26 -
Buffers and Synchronizers in GIOP
![Page 27: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/27.jpg)
Stefan Leue - 27 -
Structure Implementation
Capsules as proctypes
Ports as proctype parameters
proctype User(chan fromSwitch, toSwitch ){...}
proctype PhoneHandler(chan fromUser, toUser, toOtherHandler, fromOtherHandler ){...}
proctype POTS( ){ chan toUser1435267635 = [1] of { SwitchToUser };
chan fromUser590843343 = [1] of { UserToSwitch }; ...
run User( toUser1435267635, fromUser590843343 );run User( toUser986680783, fromUser849317327 );run PhoneHandler( fromUser590843343, toUser1435267635,
leftToRight1222086095, rightToLeft1089179087 );run PhoneHandler( fromUser849317327, toUser986680783,
rightToLeft1089179087, leftToRight1222086095 );}init{atomic {run POTS();}}
![Page 28: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/28.jpg)
Stefan Leue - 28 -
Behaviour - Implementation
States: Promela labels
Transitions: Promela code + gotos Entry and exit code inlined Transition code atomic
General state code format:
state-name: entry-code;atomic {if:: transition-code_i; exit-code; goto state-namefi }
![Page 29: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/29.jpg)
Stefan Leue - 29 -
Transition Code
if/* correct_connectreq_audiblering */:: received_ph_num.phone_number == 1 -> /* exit digit_received */ /* action correct_connectreq_audiblering */ toOtherHandler!connectreq; toUser!audiblering; /* exit await_digit */ /* action connectreq */ /* entry originator */ /* action untitled */ /* entry party_ringing */ goto party_ringing1956295048
ifidle1723158139::: fromUser?[offhook] && true -> fromUser?UserToSwitch_msg; /* exit idle */ /* action offhook_ */ /* entry await_digit */ toUser!dialtone; /* entry wait */ goto wait2091208315...fi
![Page 30: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/30.jpg)
Stefan Leue - 30 -
Group Transitions
ringing62399654:{if:: fromUser?[offhook] ...fi } unless {if:: fromUser?[onhook]...:: fromOtherHandler?[disconnect] ...fi}
ringing62399654:{if:: fromUser?[onhook] ...:: fromOtherHandler?[disconnect] ...fi } unless {if:: fromUser?[offhook] ...fi}
ringing2063158907:if:: fromUser?[offhook] ...:: fromUser?[onhook] ...:: fromOtherHandler?[disconnect] ...fi
![Page 31: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/31.jpg)
Stefan Leue - 31 -
Property Validation - POTS
Is the model capable of establishing a phone call between parties?
! <> (s && r && p && q)
#define p (PhoneHandler[4]@conversation_orig1702392370)#define q (PhoneHandler[5]@conversation_term163607093)#define r (User[2]@conversation1450209847)#define s (User[3]@conversation1450209847)
Counterexample found:• trail of 872 steps• state-vector 188 bytes• 1 million states, 1.5 million transition• 43 Mbytes of memory
![Page 32: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/32.jpg)
Stefan Leue - 32 -
Property Validation - CORBA GIOP
Comparison with previous, hand-coded model
Some differences: VIP model uses goto, hand-coded model uses control
state variables VIP model uses channels as local variables, hand-
coded model uses global channel variables
![Page 33: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/33.jpg)
Stefan Leue - 33 -
VIP
Implemented in JAVA, using SDK 1.2, and XML
Approximately 1 man-year
Approximately 20000 loc
Class structure documented in UML diagrams, at least initially...
![Page 34: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/34.jpg)
Stefan Leue - 34 -
Conclusions
VIP - based modeling
Compilation of Promela code
Property Validation POTS CORBA GIOP
Expected Benefits increased acceptance of formal modeling and analysis
in practicioner’s circles improved documentation and maintenance of Promela
models facilitated use in education
![Page 35: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/35.jpg)
Stefan Leue - 35 -
To Do ...
Simulation Capability inside VIP
Interpretation of Spin results in VIP model context
Facilitated requirement specification better hooks more suitable requirements languages
– (life) MSCs– graphical interval logics– automata-based observer
Addition of features replication dynamic construction and destruction inheritance
![Page 36: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.](https://reader036.fdocuments.in/reader036/viewer/2022062803/56649ca15503460f949604d6/html5/thumbnails/36.jpg)
Stefan Leue - 36 -
Public Availability?
Hope to be able to make tool available shortly
Contact:[email protected]