sbacc: remove spurious initial state in some output
This fixes #492, based on a report from Jérôme Dubois. * spot/twaalgos/sbacc.cc: If the initial state is in a rejecting component, start with an initial state whose colors are unsat_mark. * tests/core/sbacc.test: Add test case. * tests/python/pdegen.py: Adjust it.
This commit is contained in:
parent
9d6ba3ff77
commit
80fd158ed5
4 changed files with 47 additions and 7 deletions
6
NEWS
6
NEWS
|
|
@ -1,6 +1,10 @@
|
||||||
New in spot 2.10.2.dev (not yet released)
|
New in spot 2.10.2.dev (not yet released)
|
||||||
|
|
||||||
Nothing yet.
|
Bugs fixed:
|
||||||
|
|
||||||
|
- On automata where the absence of color is not rejecting
|
||||||
|
(e.g. co-Büchi) and where the initial state was in a rejecting
|
||||||
|
SCC, sbacc() could output a superflous state. (Issue #492)
|
||||||
|
|
||||||
New in spot 2.10.2 (2021-12-03)
|
New in spot 2.10.2 (2021-12-03)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,8 @@ namespace spot
|
||||||
// Use any edge going into the initial state to set the first
|
// Use any edge going into the initial state to set the first
|
||||||
// acceptance mark.
|
// acceptance mark.
|
||||||
init_acc = one_in[s] | common_out[s];
|
init_acc = one_in[s] | common_out[s];
|
||||||
|
else
|
||||||
|
init_acc = unsat_mark.second;
|
||||||
|
|
||||||
old_st.push_back(new_state(s, init_acc));
|
old_st.push_back(new_state(s, init_acc));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -289,3 +289,37 @@ State: 0 [0] 0 {0}
|
||||||
State: 1 [0] 1 [0] 0
|
State: 1 [0] 1 [0] 0
|
||||||
--END--
|
--END--
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
autfilt -S > out <<EOF
|
||||||
|
HOA: v1
|
||||||
|
States: 2
|
||||||
|
Start: 0
|
||||||
|
AP: 2 "a" "b"
|
||||||
|
acc-name: co-Buchi
|
||||||
|
Acceptance: 1 Fin(0)
|
||||||
|
properties: trans-labels explicit-labels trans-acc
|
||||||
|
--BODY--
|
||||||
|
State: 0
|
||||||
|
[0] 0 {0}
|
||||||
|
[1] 1
|
||||||
|
State: 1
|
||||||
|
[1] 1 {0}
|
||||||
|
--END--
|
||||||
|
EOF
|
||||||
|
cat >exp <<EOF
|
||||||
|
HOA: v1
|
||||||
|
States: 2
|
||||||
|
Start: 0
|
||||||
|
AP: 2 "a" "b"
|
||||||
|
acc-name: co-Buchi
|
||||||
|
Acceptance: 1 Fin(0)
|
||||||
|
properties: trans-labels explicit-labels state-acc colored
|
||||||
|
--BODY--
|
||||||
|
State: 0 {0}
|
||||||
|
[0] 0
|
||||||
|
[1] 1
|
||||||
|
State: 1 {0}
|
||||||
|
[1] 1
|
||||||
|
--END--
|
||||||
|
EOF
|
||||||
|
diff out exp
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- mode: python; coding: utf-8 -*-
|
# -*- mode: python; coding: utf-8 -*-
|
||||||
# Copyright (C) 2019, 2020 Laboratoire de Recherche et Développement de
|
# Copyright (C) 2019, 2020, 2021 Laboratoire de Recherche et Développement de
|
||||||
# l'Epita (LRDE).
|
# l'Epita (LRDE).
|
||||||
#
|
#
|
||||||
# This file is part of Spot, a model checking library.
|
# This file is part of Spot, a model checking library.
|
||||||
|
|
@ -124,8 +124,8 @@ assert dehoa == """HOA: v1
|
||||||
States: 4
|
States: 4
|
||||||
Start: 0
|
Start: 0
|
||||||
AP: 1 "p0"
|
AP: 1 "p0"
|
||||||
acc-name: parity max even 2
|
acc-name: co-Buchi
|
||||||
Acceptance: 2 Fin(1) & Inf(0)
|
Acceptance: 1 Fin(0)
|
||||||
properties: trans-labels explicit-labels trans-acc complete
|
properties: trans-labels explicit-labels trans-acc complete
|
||||||
properties: deterministic
|
properties: deterministic
|
||||||
--BODY--
|
--BODY--
|
||||||
|
|
@ -134,11 +134,11 @@ State: 0 "0#0"
|
||||||
[!0] 2
|
[!0] 2
|
||||||
State: 1 "1#0"
|
State: 1 "1#0"
|
||||||
[!0] 2
|
[!0] 2
|
||||||
[0] 3 {0 1}
|
[0] 3 {0}
|
||||||
State: 2 "3#0"
|
State: 2 "3#0"
|
||||||
[t] 2 {0}
|
[t] 2
|
||||||
State: 3 "2#0"
|
State: 3 "2#0"
|
||||||
[0] 1 {0 1}
|
[0] 1 {0}
|
||||||
[!0] 2
|
[!0] 2
|
||||||
--END--"""
|
--END--"""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue