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

iSpin LTL property evaluation only with activated "assertion violations"?

I am trying to get used to iSpin/Promela. I am using: Spin Version 6.4.3 -- 16 December 2014, iSpin Version 1.1.4 -- 27 November 2014, TclTk Version 8.6/8.6, Windows 8.1. Here is an example where I try to use LTL. The verification of the LTL…
Stefan
  • 1,253
  • 2
  • 12
  • 36
3
votes
1 answer

Promela syntax error: Error: incomplete structure ref 'table' saw 'operator: ='

I have the following typedefs. Pub type keeps two ints, and the pub_table keeps an array of publishers and an int. typedef pub{ int nodeid; int tid }; typedef pub_table{ pub table[TABLE_SIZE]; int last }; Then on line…
Anton Belev
  • 11,963
  • 22
  • 70
  • 111
3
votes
1 answer

Spin verification - undefined reference to random and srandom

I am currently learning Promela/Spin. The problem I have is that I can't verify my programs. I create my pan files with: spin_64bits.exe -a x.pr --- all's fine until here. Now when I try to compile pan.c via gcc pan.c (gcc -o pan pan.c, whatever) I…
Beko
  • 982
  • 3
  • 15
  • 26
3
votes
2 answers

Cache models in Promela

I am looking to model cache for multicore processors, including cache coherence. Do such PROMELA implementations already exist. I tried to search for it, but couldn't find any. Secondly, if I have to implement it myself, is it feasible in PROMELA to…
MetallicPriest
  • 29,191
  • 52
  • 200
  • 356
3
votes
1 answer

Recursive data types in Promela

I am trying to make a B-Tree in Promela so that I can prove stuff about it, however, it seems that Promela does not support recursive data types. This doesn't work: #define n 2 typedef BTreeNode { int keys[2*n-1]; BTreeNode children[2*n]; …
Janus Troelsen
  • 20,267
  • 14
  • 135
  • 196
3
votes
2 answers

How to interpret SPIN error output?

I am trying to model check a simple Promela Model for the following LTL property: ltl { M[0] U M[1] } And I'm getting an error, guided simulation on the error trail yields the following output: ltl ltl_0: (M[0]) U (M[1]) spin: couldn't find claim 2…
user1101674
  • 1,341
  • 2
  • 12
  • 15
3
votes
1 answer

Whats causing timeout in Promela/SPIN?

I have the following promela code: chan level = [0] of {int}; proctype Sensor (chan levelChan) { int x; do :: true -> levelChan ? x; if :: (x < 2) -> printf("low %d", x); :: (x > 8) ->…
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
2
votes
2 answers

How to receive message from 'any' channel in PROMELA/SPIN

I'm modeling an algorithm in Spin. I have a process that has several channels and at some point, I know a message is going to come but don't know from which channel. So want to wait (block) the process until it a message comes from any of the…
Ali Moosavi
  • 169
  • 3
  • 8
2
votes
0 answers

How to get a random data in promela

I have met a question that "If babble1 is 1 then thebabbled frame is generated randomly with a sequence number between 0 to 255."So i need to define a inline functino to get a random data.Should I include a rand.h in C to Spin?Or there is another…
Hongjian Jiang
  • 307
  • 1
  • 6
2
votes
1 answer

Model Checking: why does LTL logic "<>" not produce correct counter-example in Spin

Update There are two problems in my previous attempt. By fixing them I successfully get the expected answer. The LTL specified using the -f option from command line will be negated. Instead, I use the inline LTL by adding ltl { <> p} into the…
2
votes
1 answer

Trying to include C libraries into Promela model

First, I'll summarize the project where I'm working so it's easier to understand the problem (I'm not use to write in English, sorry for the mistakes I could commit). I've been working on a Promela model for path planning on natural terrain for a…
FranmR
  • 76
  • 7
2
votes
1 answer

Logical evaluation of "When A and B ... "

Given a statement "When the CM is idle and receives update request from the WCP, it will set ....". Some context: there can only be one type of msg in the channel i.e. it will only contain update requests from wcp. I can think of 2 possible…
Rajdeep
  • 2,246
  • 6
  • 24
  • 51
2
votes
1 answer

Why an infinite loop doesn't result in an error in model checking with Promela and Spin?

If I write the following code in Promela and run it in Spin in verifier mode it ends with 0 errors. It does report that toogle and init had unreached states, but those seem to be only warnings. byte x = 0; byte y = 0; active proctype toggle() { …
tgonzalez89
  • 621
  • 1
  • 6
  • 26
2
votes
0 answers

Automata view in ispin

I'm new to ispin and promela coding. I managed to get the automata to view working in ispin but the problem I am having at the moment is that when the automata are bit complex the labels texts(transition label, state name) get really small that I…
Moon
  • 31
  • 2
2
votes
2 answers

Python file included with C in Promela/Spin: 'inline text too long'

I get this error message when trying to use a Python library in Promela and spin (error message screenshot): spin: /usr/include/unistd.h:778, Error: inline text too long near '/usr/include/unistd.h' My Promela code is c_code{ #include "demo1.c"…
1
2
3
10 11