twaalgos: add a match_states variant with a formula argument
This is related to issue #591, reported by Blake C. Rawlings. * spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/ltl2tgba_fm.hh (ltl_to_tgba_fm): Add option to keep LTL labels. * spot/twaalgos/matchstates.cc, spot/twaalgos/matchstates.hh (match_states): Add variant with a formula as second argument. * tests/python/matchstates.py: Test it. * NEWS: Mention it. * THANKS: Add reporter.
This commit is contained in:
parent
5f1d00b858
commit
3d3e87948c
7 changed files with 89 additions and 4 deletions
|
|
@ -60,3 +60,18 @@ m3 = spot.match_states(a, c)
|
|||
tc.assertEqual(m3, ((), (), (), ()))
|
||||
m4 = spot.match_states(c, a)
|
||||
tc.assertEqual(m4, ((), ))
|
||||
|
||||
f = spot.formula("Ga | Gb | Gc")
|
||||
m5 = spot.match_states(a, f)
|
||||
tc.assertEqual(m5, (f, f, f, f))
|
||||
m6 = spot.match_states(b, f)
|
||||
tc.assertEqual(m6, (spot.formula("Gc"),
|
||||
spot.formula("Gb | Gc"),
|
||||
spot.formula("Gb"),
|
||||
spot.formula("Ga"),
|
||||
spot.formula("Ga | Gc"),
|
||||
spot.formula("Ga | Gb"),
|
||||
spot.formula("Ga | Gb | Gc")))
|
||||
|
||||
m7 = spot.match_states(c, f) # Note that f is not the formula for c
|
||||
tc.assertEqual(m7, (spot.formula("0"),))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue