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

Spin Model Checker does not find a bug when using remote varrefs

I am trying to formally verify mutual exclusion on the following Promela Model: /* Mutex with (bugged) Peterson algorithm */ bool flag[2]; int turn = -1; active [2] proctype agent() { bool in_cs; int other = 1 - _pid; do ::…
Patrick Trentin
  • 7,126
  • 3
  • 23
  • 40
0
votes
1 answer

How does one formally verify that the following protocol is correct?

In the following code sample, a Sender and a Receiver exchange --for an undetermined amount of time-- a number of packets. Each message, sent by the Sender, contains either 0 or 1 and a sequence number. Whenever the Receiver a message, it checks…
Patrick Trentin
  • 7,126
  • 3
  • 23
  • 40
0
votes
1 answer

Comparing only one attribute of a structure

I got an issue with promela language when trying to compare an attribute, that is not the first one, of my structure. Here is an example: typedef Msg { byte header; byte content; } chan pipe = [5] of { Msg }; active proctype Receive () { …
AilurusFulgens
  • 199
  • 1
  • 12
0
votes
1 answer

Promela Syntax error

I am receiving a syntax error when I attempt to run my promela code, the error says Error: syntax error saw 'token: ::' which is referring to this line of code (lines 10-13): #define IniRunning(x,y) if :: ((x==A) && (y==B)) ->…
Ishy
  • 15
  • 6
0
votes
1 answer

how to transform ABP from promela to microclr?

I've prepared an ABP model in Promela modeling language. But I'd need some help with rewriting it in another modelling language - mCRL. I do not have any experience in it. Could someone, please, show me a way to start, or point me to good tutorial…
0
votes
1 answer

how to declare the Size of message in PROMELA?

Is there any method to specify the size of message?. For example if i want to send message data through channel AB then how can I specify the size of data in PROMELA language?
0
votes
2 answers

I got error while simulate code written in PROMELA

I am using ispin and got an error stating spin: trails end after 10 steps and transition fail. How can I prevent this error from happening?
0
votes
1 answer

Maximum number of processes in SPIN model

I created multiple processed which in turn are spawning other processes. Thus SPIN model keeps printing "Too many processes (Max 255)". However, it is still giving me the end output. If it cannot handle more than 255 processes how does it still…
sheetal_158
  • 7,391
  • 6
  • 27
  • 44
0
votes
2 answers

Set implementation in UPPAAL

I have a model which in which a process needs to choose an element s randomly from the the set S. The choosing part is a single operation. The only similar data structure I know in UPPAAL is arrays. Does there exist a set data structure in UPPAAL? …
Pranav Raj
  • 781
  • 1
  • 8
  • 19
0
votes
1 answer

Is anyone using Spin / Promela and jspin on WIndows 8?

I use Promela & Spin for modeling concurrency in a course I teach. I've been using the jspin front end as well. I have students who are trying to install the tools on Windows 8 and they are having a tough time - I don't know if its a 64 bit vs. 32…
mjl48
  • 3
  • 3
0
votes
1 answer

Select statement in Promela much slower than the equivalent if statement?

So I used the following line in my Promela code. select( cycles: 26..31 ); However, it was causing state explosion. I replaced it with the following if statement and suddenly the state explosion problem vanished. Isn't the select statement I showed…
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
0
votes
1 answer

How can I model this code in promela/SP?

The following algorithm attempts to enforce mutual exclusion between two processes P1 and P2 each of which runs the code below. You can assume that initially sema = 0. while true do{ atomic{if sema = 0 then sema:= 1 else go to line 2} critical…
oralo
  • 17
  • 1
  • 6
0
votes
1 answer

How do you broadcast a message in PROMELA?

So what I want is process A to broadcast a message to say processes B to D. How can this be done? The right way of doing so seems like to have channels between A and processes B to D and then to just send the same message to each of the process from…
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
0
votes
1 answer

How to limit the memory used by PROMELA?

I am trying to limit the maximum memory used by PROMELA, by using the -DMEMLIMIT flag, like this. ./spin -a -DMEMLIMIT=1024 code.pml But, still the memory keeps on increasing. Any idea, why is that so?
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
0
votes
2 answers

How does PROMELA execute this?

byte x; if ::(x == 0) -> ... ::(x > 0) -> ... fi Is there a default value of a global variable? Or the model checker checks for all possible interleavings, that is, in this case, use all possible states with both (x==0) and (x>0).
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
1 2 3
10
11