Questions tagged [promela]

Process/Protocol Meta Language is a verification modelling language used to verify the logic of parallel systems.

PROMELA is a process modeling language whose intended use is to verify the logic of parallel systems. Given a program in PROMELA, Spin can verify the model for correctness by performing random or iterative simulations of the modeled system's execution, or it can generate a C program that performs a fast exhaustive verification of the system state space. During simulations and verifications SPIN checks for the absence of deadlocks, unspecified receptions, and unexecutable code. The verifier can also be used to prove the correctness of system invariants and it can find non-progress execution cycles. Finally, it supports the verification of linear time temporal constraints; either with Promela never-claims or by directly formulating the constraints in temporal logic. Each model can be verified with Spin under different types of assumptions about the environment. Once the correctness of a model has been established with Spin, that fact can be used in the construction and verification of all subsequent models.

PROMELA programs consist of processes, message channels, and variables. Processes are global objects that represent the concurrent entities of the distributed system. Message channels and variables can be declared either globally or locally within a process. Processes specify behavior, channels and global variables define the environment in which the processes run.

via: Wikipedia

159 questions
3
votes
1 answer

Spin: error, the version of spin that generated this pan.c assumed a different wordsize (4 iso 8)

I am using Windows O.S and in Cygwin i type: wish -f ispin.tcl to open the ispin interface. I open a file test.pml which contains: byte state = 2; proctype A() { (state == 1) -> state = 3 } proctype B() { state = state - 1 } init { run A();…
Marialena
  • 817
  • 8
  • 31
3
votes
1 answer

iSpin LTL property evaluation only with activated "assertion violations"?

I am trying to get used to iSpin/Promela. I am using: Spin Version 6.4.3 -- 16 December 2014, iSpin Version 1.1.4 -- 27 November 2014, TclTk Version 8.6/8.6, Windows 8.1. Here is an example where I try to use LTL. The verification of the LTL…
Stefan
  • 1,253
  • 2
  • 12
  • 36
3
votes
1 answer

Promela syntax error: Error: incomplete structure ref 'table' saw 'operator: ='

I have the following typedefs. Pub type keeps two ints, and the pub_table keeps an array of publishers and an int. typedef pub{ int nodeid; int tid }; typedef pub_table{ pub table[TABLE_SIZE]; int last }; Then on line…
Anton Belev
  • 11,963
  • 22
  • 70
  • 111
3
votes
1 answer

Spin verification - undefined reference to random and srandom

I am currently learning Promela/Spin. The problem I have is that I can't verify my programs. I create my pan files with: spin_64bits.exe -a x.pr --- all's fine until here. Now when I try to compile pan.c via gcc pan.c (gcc -o pan pan.c, whatever) I…
Beko
  • 982
  • 3
  • 15
  • 26
3
votes
2 answers

Cache models in Promela

I am looking to model cache for multicore processors, including cache coherence. Do such PROMELA implementations already exist. I tried to search for it, but couldn't find any. Secondly, if I have to implement it myself, is it feasible in PROMELA to…
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
3
votes
1 answer

Recursive data types in Promela

I am trying to make a B-Tree in Promela so that I can prove stuff about it, however, it seems that Promela does not support recursive data types. This doesn't work: #define n 2 typedef BTreeNode { int keys[2*n-1]; BTreeNode children[2*n]; …
Janus Troelsen
  • 20,267
  • 14
  • 135
  • 196
3
votes
2 answers

How to interpret SPIN error output?

I am trying to model check a simple Promela Model for the following LTL property: ltl { M[0] U M[1] } And I'm getting an error, guided simulation on the error trail yields the following output: ltl ltl_0: (M[0]) U (M[1]) spin: couldn't find claim 2…
user1101674
  • 1,341
  • 2
  • 12
  • 15
3
votes
1 answer

Whats causing timeout in Promela/SPIN?

I have the following promela code: chan level = [0] of {int}; proctype Sensor (chan levelChan) { int x; do :: true -> levelChan ? x; if :: (x < 2) -> printf("low %d", x); :: (x > 8) ->…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
2
votes
0 answers

How to get a random data in promela

I have met a question that "If babble1 is 1 then thebabbled frame is generated randomly with a sequence number between 0 to 255."So i need to define a inline functino to get a random data.Should I include a rand.h in C to Spin?Or there is another…
Hongjian Jiang
  • 307
  • 1
  • 6
2
votes
1 answer

Model Checking: why does LTL logic "<>" not produce correct counter-example in Spin

Update There are two problems in my previous attempt. By fixing them I successfully get the expected answer. The LTL specified using the -f option from command line will be negated. Instead, I use the inline LTL by adding ltl { <> p} into the…
2
votes
1 answer

Trying to include C libraries into Promela model

First, I'll summarize the project where I'm working so it's easier to understand the problem (I'm not use to write in English, sorry for the mistakes I could commit). I've been working on a Promela model for path planning on natural terrain for a…
FranmR
  • 76
  • 7
2
votes
1 answer

Logical evaluation of "When A and B ... "

Given a statement "When the CM is idle and receives update request from the WCP, it will set ....". Some context: there can only be one type of msg in the channel i.e. it will only contain update requests from wcp. I can think of 2 possible…
Rajdeep
  • 2,246
  • 6
  • 24
  • 51
2
votes
1 answer

Why an infinite loop doesn't result in an error in model checking with Promela and Spin?

If I write the following code in Promela and run it in Spin in verifier mode it ends with 0 errors. It does report that toogle and init had unreached states, but those seem to be only warnings. byte x = 0; byte y = 0; active proctype toggle() { …
tgonzalez89
  • 621
  • 1
  • 6
  • 26
2
votes
0 answers

Automata view in ispin

I'm new to ispin and promela coding. I managed to get the automata to view working in ispin but the problem I am having at the moment is that when the automata are bit complex the labels texts(transition label, state name) get really small that I…
Moon
  • 31
  • 2
2
votes
2 answers

Python file included with C in Promela/Spin: 'inline text too long'

I get this error message when trying to use a Python library in Promela and spin (error message screenshot): spin: /usr/include/unistd.h:778, Error: inline text too long near '/usr/include/unistd.h' My Promela code is c_code{ #include "demo1.c"…
1
2
3
10 11