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

how to make a non-initialised variable in Spin?

It seems that Promela initialises each variable (by default, to 0, or to the value that is given in the declaration). How can I declare a variable that is initialised by an unknown value? The documentation suggests if :: p = 0 :: p = 1 fi but I…
d8d0d65b3f7cf42
  • 2,597
  • 15
  • 28
2
votes
1 answer

Promela SPIN unreached in proctype error

I'm pretty new to SPIN and Promela and I came across this error when I'm trying to verify the liveness property in my models. Error code: unreached in proctype P (0 of 29 states) unreached in proctype monitor mutex_assert.pml:39,…
firearian
  • 65
  • 1
  • 7
2
votes
1 answer

Is it impossible to select a nondeterministic value of an array element in Promela?

Following is the Promela code that I am writing. 491 byte api1[5]; 492 byte api2[5]; 493 byte api3[5]; 494 byte reftask1[5] 495 byte reftask2[5]; 496 byte reftask3[5]; 497 byte rid1[5]; 498 byte rid2[5]; 499 …
jungyh0218
  • 558
  • 1
  • 4
  • 17
2
votes
1 answer

How to transform LTL into Automato in Promela - SPIN?

How can I transform LTL into Automata in PROMELA? I know that with the command SPIN -f "ltl x" it is possible transform the LTL into a never claim, but I want the automata of the LTL and not the negation one. It is correct If I negate the LTL…
Georgia
  • 43
  • 3
2
votes
2 answers

Never claim does not work in promela model

Consider this simple PROMELA model: #define p (x!=4) int x = 0; init { do :: x < 10 -> x++; od } I wanted to verify this model with this simple claim, which was generated by using spin -f: never { /* []p…
K. Huber
  • 33
  • 4
2
votes
1 answer

Spin: gcc-4: error: spawn: No such file or directory

I want to use SPIN model checker on windows7-64 and I have installed all the prerequisites of it. Below is the procedure how I did it I installed gcc compiler with cygwin .. updated path checked with command prompt it shows version 4.9.2 Installed…
ehmath
  • 119
  • 2
  • 8
2
votes
1 answer

Expressing model as LTL

Basically, model checking deals a model 'm' (the behavior description of the system) and a property 'p', which the system shall satisfy. With both artifacts, a model checker determines whether the model satisfies the property. My question is whether…
igi
  • 29
  • 6
2
votes
1 answer

How to model a transition system with SPIN

I am new to spin. I want to check whether a transition system satisfies the given LTL property. But I don't know how to model a transition system in promela. For example, the transition system shown below has two states, and the initial state is s0.…
Dingbao Xie
  • 716
  • 9
  • 21
2
votes
2 answers

Accessing local variable of one process from another in Promela

Is it possible to access value of local variable of one process from another process . For example in program below, I want to read value of my_id from manager. proctype user (byte id){ byte my_id = id; } proctype manager (){ printf…
user1097262
2
votes
1 answer

Understanding an Error Trail from Spin Modelchecker

I am trying to use Spin Model Checker to modelcheck a Game between two objects (A and B). The objects move on a board, and each location is defined by its (x,y) coordinates. The two objects are supposed to not collide. I have three processes: init,…
Sheerberenj
  • 155
  • 2
  • 8
1
vote
1 answer

Interleaving possibilities in Promela

I am new to Promela and I'm having some difficulties understanding how to calculate the interleaving possibilities of a model. Which one of the statements is counted in the calculation (how do I know which one to take)? Does process P have 5, as…
melisa
  • 95
  • 5
1
vote
1 answer

Why does the spin check while(condition){} not avoid the std::condition_variable::wait(lock, condition)?

I try to build a fair lock among threads. Each thread runs a for loop to do ++iCounter. Each thread can do ++iCounter one time, then issue cv.notify_one() to wake up another thread using cv.wait(ul, lambda{check condition_A}) to wait the lock. I use…
1
vote
1 answer

How should I do that the two receiving processes not to be twice in a row in Promela model?

I am a beginner in the spin. I am trying that the model runs the two receiving processes (function called consumer in the model) alternatively, ie. (consumer 1, consumer 2, consumer 1, consumer 2,...). But when I run this code, my output for 2…
user8287082
1
vote
0 answers

Bash variable expansion that includes single or double quotes

I have a script that I'm writing to automate running specific tests with a promela model. The user must supply the promela model and another file with the ltl properties they wish to run against the model. I read in the file line by line using the…
washa3
  • 11
  • 3