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
1
vote
1 answer

Will the output always be greater than 0 ? PROMELA program

I'm a bit boggled by this question, when I ran this program I got results greater than 0 but I'm not sure if that would always be the case since the program could execute x++ or x-- first in theory. How can I definitively confirm that the results…
Roland
  • 61
  • 7
1
vote
1 answer

How to generate a Buchi Automaton from a LTL formula?

How can I generate a Buchi Automaton starting from an LTL formula? e.g. [] (a <-> ! b) That is, At all times in the future if a is true b is false if b is true a is false
Patrick Trentin
  • 7,126
  • 3
  • 23
  • 40
1
vote
1 answer

Promela: Errors with parameters in proctypes, and using 'end' label

I'm new to Promela, and I'm not sure what the issue with my code is: proctype frogJump(int frogNum, int frogDirection) { printf("FROG%d STARTS AT %d", frogNum, frogs[frogNum]); int temp; end: do :: lock(mutex) -> if …
NukPan
  • 249
  • 2
  • 8
1
vote
3 answers

Trying to match to a typedef value in a receive statement causes "bad node type 44" error message

When I try to match a message in a receive statement I get a "bad node type 44" error message. This happens when the message's type is a typedef. The error message is rather cryptic and doesn't give much insight. typedef t { int i } init { …
tgonzalez89
  • 621
  • 1
  • 6
  • 26
1
vote
1 answer

permission denied to execute '/usr/bin/spin' in WSL (ubuntu 18.04)

I have been using the Windows Subsytem for Linux for SPIN(Promela) for quite some time. However, without any changes in the setup, suddenly since 28 Oct 2019, I am getting error 'Permission denied' error for '/usr/bin/spin'. Other commands in the…
1
vote
2 answers

Multiple Repeat..Until in Promela Spin

How can I write the following code in Promela: I tried the following but I do not think that it is correct: int c0 = 0; int d1 = 0; int d2 = 0; do :: true -> d1 = x1; d2 = x2; if :: (c0 == c) -> …
Jan
  • 747
  • 1
  • 10
  • 29
1
vote
1 answer

How to check for an arbitrary condition in a message queue in Spin?

I'm trying to simulate the behaviour of other model-checkers using Spin. For that, I need to be able to test for some arbitrary condition in the message queue. For instance, I want to check if somewhere in the channel there exists some message with…
1
vote
1 answer

What does error: sensing to an uninitialized chan mean in ispin?

ispin is generating this message on the progress window (the mid bottom screen on the simulate tab): Error: sending to an uninitialized chan The weird thing is that the error message starts to appear in the middle of the simulation (I set the…
Moon
  • 31
  • 2
1
vote
1 answer

Promela randomly select two elements at the same time

Recently I started learning Promela and I want to model picking two balls from box where I have 10 black balls and 4 white balls, I can model box as array, but I have no idea how to select 2 balls at the same time. Picking one and then another one…
1
vote
1 answer

Promela: Why is not this atomic block equivalent to an assignment statement?

I wrote following Promela code. This code simulates the situation where two processes increment a shared counter. I expected the assert in the code must be true, but SPIN says "assertion violated". Strangely, when I replaced the atomic block with…
Yusuke NOJIMA
  • 255
  • 1
  • 7
1
vote
1 answer

How to change the order of the messages in a channel?

I have this code need to amend so that the channels can reorder the messages and I have to add mechanism to cope with this chan linkA = [10] of {byte}; chan linkB = [10] of {byte}; proctype sender () { byte n; do :: n<10 -> linkA!n*n;…
MANAL
  • 29
  • 1
  • 10
1
vote
1 answer

Promela model with spin - duplicate message and corrupt message

I have this promela code and I need to model message duplication and message corruption and also I need to add mechanisms to detect and cope with corrupted messages and duplicates message from my reading, I found that I need to add new processes…
Memo
  • 53
  • 6
1
vote
1 answer

When to use semaphore locks / unlocks vs. wait / notify?

I'm learning Promela and using SPIN to model some examples I found. This model involves a food ordering simulation. So the customer orders, cashier takes order, sends to server, back to customer etc. Here is a flow of the program. The specific…
ritter
  • 13
  • 5
1
vote
1 answer

SPIN assert not triggered

I am trying to understand why the assert in this model isn't triggered. ltl { !A@wa U B@sb && !B@wb U A@sa } byte p = 0 byte q = 0 int x = 0 inline signal(sem) { sem++ } inline wait (sem) { atomic { sem > 0 ; sem-- } } proctype A() { x =…
isekaijin
  • 19,076
  • 18
  • 85
  • 153
1
vote
1 answer

Spin model checker - Error: memory exhausted because of yacc stack size

I have created a rather large Promela model (2362 states, with a total of 29592 transitions among them) and I wish to verify an LTL property of the underlying system. The model is all defined in one process as follows: int state=1; bool p1a=true,…
ada
  • 31
  • 4