-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
When checking the following Promela description, some buggy behaviors appeared.
❯ cat failed.pml
byte i = 0
active [2] proctype process(){
// transition failed
(i > 0) -> i--
// (i > 0) -> i = i - 1
// OK
// (i > 0) -> i = - 1
}
- DFS (default): When checking with DFS, it shows
spin: trail ends after -4 steps, but-4 stepsis strange. - BFS: When checking with BFS, it shows "transition failed" and the counterexample is not correctly displayed.
Especially, the "transition failed" issue troubles me.
When checking a bigger model with an assertion, the same message appeared with the assertion violation, which hinders me to analyze the cause.
I would be grateful for any information regarding a potential workaround or the known cause of this behavior.
The logs are shown the below.
DFS
❯ spin -a failed.pml
❯ gcc -o pan pan.c
❯ ./pan
pan:1: invalid end state (at depth -1)
pan: wrote failed.pml.trail
(Spin Version 6.5.2 -- 21 June 2024)
Warning: Search not completed
+ Partial Order Reduction
Full statespace search for:
never claim - (none specified)
assertion violations +
acceptance cycles - (not selected)
invalid end states +
State-vector 28 byte, depth reached 0, errors: 1
1 states, stored
0 states, matched
1 transitions (= stored+matched)
0 atomic steps
hash conflicts: 0 (resolved)
Stats on memory usage (in Megabytes):
0.000 equivalent memory usage for states (stored*(State-vector + overhead))
0.292 actual memory usage for states
128.000 memory used for hash table (-w24)
0.534 memory used for DFS stack (-m10000)
128.730 total actual memory usage
pan: elapsed time 0 seconds
❯ spin -t -p failed.pml
spin: trail ends after -4 steps
#processes: 2
i = 0
-4: proc 1 (process:1) failed.pml:5 (state 1)
-4: proc 0 (process:1) failed.pml:5 (state 1)
2 processes created
BFS
❯ spin -a failed.pml
❯ gcc -o pan pan.c -DBFS
❯ ./pan
pan:1: invalid end state (at depth 0)
pan: wrote failed.pml.trail
(Spin Version 6.5.2 -- 21 June 2024)
Warning: Search not completed
+ Breadth-First Search
+ Partial Order Reduction
Full statespace search for:
never claim - (none specified)
assertion violations +
cycle checks - (disabled by -DSAFETY)
invalid end states +
State-vector 20 byte, depth reached 0, errors: 1
1 states, stored
1 nominal states (stored-atomic)
0 states, matched
1 transitions (= stored+matched)
0 atomic steps
hash conflicts: 0 (resolved)
Stats on memory usage (in Megabytes):
0.000 equivalent memory usage for states (stored*(State-vector + overhead))
0.292 actual memory usage for states
128.000 memory used for hash table (-w24)
128.195 total actual memory usage
pan: elapsed time 0 seconds
❯ spin -t -p failed.pml
1: proc 0 (process:1) failed.pml:5 (state 1) [((i>0))]
transition failed
spin: trail ends after 1 steps
#processes: 2
i = 0
1: proc 1 (process:1) failed.pml:5 (state 1)
1: proc 0 (process:1) failed.pml:5 (state 1)
2 processes created
❯ ./pan -C
spin: trail ends after 1 steps
#processes 2:
1: proc 0 (process) failed.pml:5 (state 1) (invalid end state)
((i>0))
1: proc 1 (process) failed.pml:5 (state 1) (invalid end state)
((i>0))
global vars:
byte i: 0
Versions
❯ spin -V
Spin Version 6.5.2 -- 21 June 2024
❯ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=25.04
DISTRIB_CODENAME=plucky
DISTRIB_DESCRIPTION="Ubuntu 25.04"
Metadata
Metadata
Assignees
Labels
No labels