Presentation is loading. Please wait.

Presentation is loading. Please wait.

VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg

Similar presentations


Presentation on theme: "VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg"— Presentation transcript:

1 VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg March 31, 2000

2 Stefan Leue- 2 - Joint work with Moataz Kamel

3 Stefan Leue- 3 - Outline  Introduction  Modeling with VIP  structure  behaviour  Compilation of Promela code  structure  behaviour  Property Validation using SPIN  POTS  CORBA GIOP  Conclusions

4 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

5 Stefan Leue- 5 - Visual Interface for Promela (VIP)  VIP  GUI-based tool for editing and maintaining v-Promela models  v-Promela to Promela compiler

6 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

7 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

8 Stefan Leue- 8 - Structure Definition in VIP

9 Stefan Leue- 9 - Protocols

10 Stefan Leue Data Classes

11 Stefan Leue Data Classes

12 Stefan Leue Message Types

13 Stefan Leue Data Objects

14 Stefan Leue Ports

15 Stefan Leue Internal Capsule Structure

16 Stefan Leue Connectors

17 Stefan Leue State Machines

18 Stefan Leue Substate Refinement

19 Stefan Leue State Entry/Exit Code

20 Stefan Leue Transition Code

21 Stefan Leue Transition Code

22 Stefan Leue Transition Code

23 Stefan Leue Transition Code

24 Stefan Leue 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

25 Stefan Leue Semaphore

26 Stefan Leue Buffers and Synchronizers in GIOP

27 Stefan Leue Structure Implementation  Capsules as proctypes  Ports as proctype parameters proctype User(chan fromSwitch, toSwitch ) {...} proctype PhoneHandler(chan fromUser, toUser, toOtherHandler, fromOtherHandler ) {...} proctype POTS( ) {chan toUser = [1] of { SwitchToUser }; chan fromUser = [1] of { UserToSwitch };... run User( toUser , fromUser ); run User( toUser , fromUser ); run PhoneHandler( fromUser , toUser , leftToRight , rightToLeft ); run PhoneHandler( fromUser , toUser , rightToLeft , leftToRight );} init{atomic {run POTS();}}

28 Stefan Leue Behaviour - Implementation  States: Promela labels  Transitions: Promela code + goto s  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-name fi }

29 Stefan Leue 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_ringing if idle : :: fromUser?[offhook] && true -> fromUser?UserToSwitch_msg; /* exit idle */ /* action offhook_ */ /* entry await_digit */ toUser!dialtone; /* entry wait */ goto wait fi

30 Stefan Leue Group Transitions ringing : {if :: fromUser?[offhook]... fi } unless { if :: fromUser?[onhook]... :: fromOtherHandler?[disconnect]... fi} ringing : {if :: fromUser?[onhook]... :: fromOtherHandler?[disconnect]... fi } unless { if :: fromUser?[offhook]... fi} ringing : if :: fromUser?[offhook]... :: fromUser?[onhook]... :: fromOtherHandler?[disconnect]... fi

31 Stefan Leue Property Validation - POTS  Is the model capable of establishing a phone call between parties? ! <> (s && r && p && q) #define p #define q #define r #define s Counterexample found: trail of 872 steps state-vector 188 bytes 1 million states, 1.5 million transition 43 Mbytes of memory

32 Stefan Leue 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

33 Stefan Leue VIP  Implemented in JAVA, using SDK 1.2, and XML  Approximately 1 man-year  Approximately loc  Class structure documented in UML diagrams, at least initially...

34 Stefan Leue 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

35 Stefan Leue 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

36 Stefan Leue Public Availability?  Hope to be able to make tool available shortly  Contact:


Download ppt "VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg"

Similar presentations


Ads by Google