Multithreading in SPIN model checker -
how parametrize spin model number of threads? using standard spin model checker. have options set number of parallel threads? checked reference didn't find useful
you can dynamically spawn promela process using run
operator. can iterate as:
#define try_count 5 byte index = 0; :: index == try_count -> break :: else -> index++; run theprocess() od
you can define file like:
active [try_count] proctype foo () { printf ("pid: %d\n", _pid); assert (true) } init { assert (true) }
and run spin simulation:
$ spin -dtry_count=4 bar.pml pid: 2 pid: 0 pid: 1 pid: 3 5 processes created
or verification
$ spin -dtry_count=4 -a bar.pml $ gcc -o bar pan.c $ ./bar hint: search more efficient if pan.c compiled -dsafety (spin version 6.3.2 -- 17 may 2014) + partial order reduction ...
Comments
Post a Comment