+ All Categories
Home > Documents > VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg...

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

Date post: 15-Jan-2016
Category:
Upload: amaya-bolas
View: 215 times
Download: 0 times
Share this document with a friend
36
VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg [email protected] http://www.informatik.uni-freiburg.de/~leue March 31, 2000
Transcript
Page 1: VIP: A Visual Editor and Compiler for v-Promela Stefan Leue Albert-Ludwigs-University Freiburg leue@uni-freiburg.de leue.

VIP: A Visual Editor and Compiler for v-Promela

Stefan LeueAlbert-Ludwigs-University Freiburg

[email protected]

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Stefan Leue - 36 -

Public Availability?

Hope to be able to make tool available shortly

Contact:[email protected]

[email protected]


Recommended