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
2
votes
1 answer

PROMELA: What are interleavings?

Lets say we have this piece of code: int x = 3; int y = 5; int z = 0; active proctype P(){ if :: x > y -> z = x :: else -> z = y fi } active proctype Q(){ x++ } active proctype R(){ y = y - x } I don't understand what…
jdoe
  • 65
  • 4
2
votes
1 answer

What exactly is the difference between skip and break in PROMELA?

Let's say I have this piece of PROMELA code active proctype A(){ do :: !x -> break :: else -> skip od … //more code } What exactly does break and skip do in this instance? Does break break out the whole process A() so that…
2
votes
1 answer

Strange error on Promela - Error: syntax error saw 'keyword: do' near 'do'

Why is the following Promela code returning an error only with N >= 34 ? #define N 34 active proctype proc1() { byte i; select(i: 1 .. N); //line 5 do :: true -> printf("Hi"); :: true -> …
Luca Di Liello
  • 1,486
  • 2
  • 17
  • 34
2
votes
1 answer

Error: VECTORSZ is too small

I am new to working with Promela and in particular SPIN. I have a model which I am trying verify and can't understand SPIN's output to resolve the problem. Here is what I did: spin -a untitled.pml gcc -o pan pan.c ./pan The output was as…
2
votes
1 answer

Undeclared variable error when using mtype with Jspin

I am new to Jspin and Promela. I tried to implement the following system: A home alarm system can be activated and deactivated using a personal ID key or password, after  activation the system enters a waiting period of about 30 seconds, time that…
Cristina
  • 21
  • 1
2
votes
1 answer

Lock between N Processes in Promela

I am trying to model one of my project in promela for model checking. In that, i have N no of nodes in network. So, for each node I am making a process. Something like this: init { byte proc; atomic { proc = 0; do :: proc < N -> …
Carol
  • 69
  • 7
2
votes
1 answer

Promela: passing array to new proctype

I need to pass an array from parent process to child process in Promela but it is not allowing me to do so. Also, I have some constraints in making this array global, so can't do this also. How can this be done? for e.g.: proctype B(int hg) { …
Carol
  • 69
  • 7
2
votes
1 answer

Using (U)ntil operator in SPIN ltl formula

I am trying to understand how to correctly use the Until operator in an ltl formula. I found this definition (below) to be clear: Until AUB: true if there exists i such that: B is true in [si, si+1, si+2, … ] for all j such that 0 ≤ j < i,…
cmoses
  • 196
  • 1
  • 2
  • 16
2
votes
1 answer

LTL model checking with SPIN

I am looking at the SPIN software. I would like to do use it to find models of LTL theories. All the manuals and tutorials talk about verifying properties of algorithms, but I am not interested in that at all. I simply want to find a models of LTL…
user1747134
  • 2,374
  • 1
  • 19
  • 26
2
votes
1 answer

Using the ne(X)t operator in a SPIN ltl formula

I am trying to define an ltl formula which uses the ne(X)t operator in SPIN. My problem is very similar to this question. I have a state machine and I want to verify that if some statement p is true in state0, then some statement q is true in the…
cmoses
  • 196
  • 1
  • 2
  • 16
2
votes
1 answer

Promela modeling with Spin

I am working on a promela model that is fairly simple. Using two different modules, it acts as a crosswalk/Traffic light. The first module is the traffic light that outputs the current signal (green, red, yellow, pending). This module also receives…
Flower
  • 381
  • 1
  • 6
  • 17
2
votes
1 answer

Spin Verification, verifying a variable reaches a certain value

this is my first Q on Stack Exchange so if there's anything that's breaking guidelines please let me know. I have a program written in Promela for a college OS and concurrent systems class. There are two processes running that increment a variable…
Jack Cassidy
  • 159
  • 2
  • 14
2
votes
1 answer

LTL properties and promela program

I have the following program that models a FIFO with a process in PROMELA: mtype = { PUSH, POP, IS_EMPTY, IS_FULL }; #define PRODUCER_UID 0 #define CONSUMER_UID 1 proctype fifo(chan inputs, outputs) { mtype command; int data, tmp,…
lamia
  • 31
  • 6
2
votes
2 answers

SPIN: interpret the error trace

I try to solve with spin the task about the farmer, wolf, goat and cabbage. So, I found the folowing promela description: #define fin (all_right_side == true) #define wg (g_and_w == false) #define gc (g_and_c == false) ltl ltl_0 { <> fin && [] (…
julitta_94
  • 21
  • 2
2
votes
1 answer

Find the minimum value of a variable across all possible executions with an LTL formula

Consider the following Promela model of two processes that manipulate a shared variable N: byte N = 0; active [2] proctype P(){ byte temp, i; i = 1; do :: i < 10 -> temp = N; temp++; N =…
F. JAF
  • 31
  • 4
1 2
3
10 11