Questions tagged [spin]

Spin is a popular open-source software tool, that can be used for the formal verification of distributed software systems. The tool was developed at Bell Labs in the original Unix group of the Computing Sciences Research Center, starting in 1980.

Spin is a popular open-source software tool that can be used for the formal verification of distributed software systems. The tool was developed at Bell Labs in the original Unix group of the Computing Sciences Research Center, starting in 1980.

References

158 questions
0
votes
0 answers

Why do I get an error like this in promela?

I am a beginner with promela and SPIN. I have a small code in promela but I do not understand why I have the error mentioned below: chan config =[16] of {short}; bool get_type = false; short car_type = 4; active proctype control() { start: do …
0
votes
0 answers

SPIN program using channels - verification gives "missing pars in receive" error though simulation works fine

I have a program that uses channels for inter-process messaging.It is driving me nuts. When I run my program by typing: spin ipc_verify.pml It works fine (shown by the prints in my program) and exits gracefully as designed. However, when I try to…
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

ispin help (unreachable states in LTL formula)

I have modeled a system in ispin and when trying to verify the system using LTL formulas I found unreachable error like unreached in claim l0 _spin_nvr.tmp:8, state 9, "(!((getReciept&&getCard)))" _spin_nvr.tmp:10, state 11, "-end-" (2…
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
1 answer

Model Checking a Linked List

I looked in SPIN model checker. However, it does not have features for dynamic allocation. Is there any other model checker that i can use for dynamic allocation?
sheetal_158
  • 7,391
  • 6
  • 27
  • 44
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