This example is the right part of Fig.2 in our ATVA'16 paper titled "Spot 2.0 — a framework for LTL and ω-automata manipulation" slightly updated to benefit from improvements in more recent versions of Spot.
import spot
import spot.ltsmin
spot.setup(show_default='.Ab', max_states=10)
# This extra line ensures that our test suite skips this test if divine is not installed.
spot.ltsmin.require('divine')
%%dve adding
int c=1, x1, x2;
process a1 {
state Q, R, S; init Q;
trans Q -> R { guard c<20; effect x1 = c; },
R -> S { effect x1 = x1 + c; },
S -> Q { effect c = x1; };
}
process a2 {
state Q, R, S; init Q;
trans Q -> R { guard c<20; effect x2 = c; },
R -> S { effect x2 = x2 + c; },
S -> Q { effect c = x2; };
}
system async;
adding
adding.kripke(['a1.Q', 'c==17'])
def model_check(model, f):
nf = spot.formula.Not(f)
ss = model.kripke(spot.atomic_prop_collect(nf))
return not ss.intersects(nf.translate())
model_check(adding, 'F("c==2")')