propagate_marks_here can break state-acc prop

* spot/twaalgos/degen.cc: Fix
* tests/python/pdegen.py: Test
This commit is contained in:
Philipp Schlehuber-Caissier 2022-06-29 14:02:25 +02:00
parent ddbdcd39cb
commit 99bf152673
2 changed files with 45 additions and 0 deletions

View file

@ -442,3 +442,44 @@ si = spot.scc_info(aut15)
aut15b = si.split_on_sets(2, [])[0]; d
aut15c = spot.partial_degeneralize(aut15b)
tc.assertTrue(aut15c.equivalent_to(aut15b))
# Testing property propagation/update
# for propagate_marks_here
s = """HOA: v1
States: 3
Start: 0
AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc
--BODY--
State: 0
[0] 1
[!0] 2
State: 1 {0}
[0] 0
State: 2
[!0] 0
--END--"""
aut = spot.automaton(s)
spot.propagate_marks_here(aut)
s2 = aut.to_str("hoa")
tc.assertEqual(s2, """HOA: v1
States: 3
Start: 0
AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc deterministic
--BODY--
State: 0
[0] 1 {0}
[!0] 2
State: 1
[0] 0 {0}
State: 2
[!0] 0
--END--""")