Working on spin and promela

426 views Asked by At

Firstly, I always get this problem of depth reached:0. I tried every possibility. Secondly, i want to reach those states mentioned in ltl formula. So is this syntax correct or not? Screenshot

1

There are 1 answers

2
DaveFar On BEST ANSWER

About the error

Spin clearly explains what is happening:

VECTORSZ too small, recompile pan.c with -DVECTORSZ=N with N>1024;

aborting (at depth 0)

that is why you get

State-vector 1024 byte, depth reached 0, errors: 1

So I would try with

gcc -DVECTORSZ=2048 -o pan pan.c

About the LTL formula

You have a lot of unnecessary brackets; you can write simpler:

<>( (m[7]==2) && (m[11]==1) && (m[20]==1) && (m[54]==1) & (m[57]==1) && (m[81]==1) )

So you have a pretty large array m, which explains why your state vector of 1024 bytes is not sufficient. A better solution than increasing the state vector would be decreasing the size of m if you can still check the property you are interested in with mabstracted in some way.

You write you "want to reach those states mentioned in your ltl formula". The ltl formula is checked for each path, so on each path a state must eventually be reached in which all clauses of your logical conjunction must hold. If you want to find a path that reaches a state in which all clauses of your logical conjunction hold, negate your ltl formula, i.e. []( disjunction of your negated clauses ), and look at the (end of your) counterexample path in case such a state is reachable.