fix degeneralize_tba after accepting transition
* spot/twaalgos/degen.cc (degeneralize_tba): Here. * tests/python/pdegen.py, tests/python/simstate.py: Adjust expected values. * NEWS: Mention the bug.
This commit is contained in:
parent
f9e75de647
commit
b733d486be
4 changed files with 14 additions and 5 deletions
7
NEWS
7
NEWS
|
|
@ -79,6 +79,13 @@ New in spot 2.8.5.dev (not yet released)
|
||||||
should be on each transition; propagate_marks_here() actually
|
should be on each transition; propagate_marks_here() actually
|
||||||
modifies the automaton.
|
modifies the automaton.
|
||||||
|
|
||||||
|
Bugs fixed:
|
||||||
|
|
||||||
|
- degeneralize_tba() was incorrectly not honnoring the "skip_level"
|
||||||
|
optimization after creating an accepting transition; as a
|
||||||
|
consequence, some correct output could be larger than necessary
|
||||||
|
(but still correct).
|
||||||
|
|
||||||
New in spot 2.8.5 (2020-01-04)
|
New in spot 2.8.5 (2020-01-04)
|
||||||
|
|
||||||
Bugs fixed:
|
Bugs fixed:
|
||||||
|
|
|
||||||
|
|
@ -661,7 +661,7 @@ namespace spot
|
||||||
{
|
{
|
||||||
d.second = 0; // Make it go to the first level.
|
d.second = 0; // Make it go to the first level.
|
||||||
// Skip as many levels as possible.
|
// Skip as many levels as possible.
|
||||||
if (!a->acc().accepting(acc) && !skip_levels)
|
if (!a->acc().accepting(acc) && skip_levels)
|
||||||
{
|
{
|
||||||
if (use_cust_acc_orders)
|
if (use_cust_acc_orders)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ assert daut5.equivalent_to(aut5)
|
||||||
sets = list(range(aut5.num_sets()))
|
sets = list(range(aut5.num_sets()))
|
||||||
pdaut5 = spot.partial_degeneralize(aut5, sets)
|
pdaut5 = spot.partial_degeneralize(aut5, sets)
|
||||||
assert pdaut5.equivalent_to(aut5)
|
assert pdaut5.equivalent_to(aut5)
|
||||||
assert daut5.num_states() == 10
|
assert daut5.num_states() == 9
|
||||||
assert pdaut5.num_states() == 8
|
assert pdaut5.num_states() == 8
|
||||||
|
|
||||||
aut6 = spot.automaton("""HOA: v1 States: 6 Start: 0 AP: 3 "p0" "p1" "p2"
|
aut6 = spot.automaton("""HOA: v1 States: 6 Start: 0 AP: 3 "p0" "p1" "p2"
|
||||||
|
|
@ -189,7 +189,7 @@ assert daut7.equivalent_to(aut7)
|
||||||
sets = list(range(aut7.num_sets()))
|
sets = list(range(aut7.num_sets()))
|
||||||
pdaut7 = spot.partial_degeneralize(aut7, sets)
|
pdaut7 = spot.partial_degeneralize(aut7, sets)
|
||||||
assert pdaut7.equivalent_to(aut7)
|
assert pdaut7.equivalent_to(aut7)
|
||||||
assert daut7.num_states() == 11
|
assert daut7.num_states() == 10
|
||||||
assert pdaut7.num_states() == 10
|
assert pdaut7.num_states() == 10
|
||||||
|
|
||||||
aut8 = spot.automaton("""HOA: v1 States: 8 Start: 0 AP: 3 "p0" "p1" "p2"
|
aut8 = spot.automaton("""HOA: v1 States: 8 Start: 0 AP: 3 "p0" "p1" "p2"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# -*- mode: python; coding: utf-8 -*-
|
# -*- mode: python; coding: utf-8 -*-
|
||||||
# Copyright (C) 2015, 2017-2018 Laboratoire de Recherche et Développement
|
# Copyright (C) 2015, 2017-2018, 2020 Laboratoire de Recherche et Développement
|
||||||
# de l'Epita
|
# de l'Epita
|
||||||
#
|
#
|
||||||
# This file is part of Spot, a model checking library.
|
# This file is part of Spot, a model checking library.
|
||||||
|
|
@ -169,7 +169,9 @@ State: 11 "{₀[1#1]{₁[0#0,0#1]{₂[1#0]₂}₁}₀}"
|
||||||
|
|
||||||
a = spot.translate('!Gp0 xor FG((p0 W Gp1) M p1)')
|
a = spot.translate('!Gp0 xor FG((p0 W Gp1) M p1)')
|
||||||
a = spot.degeneralize_tba(a)
|
a = spot.degeneralize_tba(a)
|
||||||
|
assert a.num_states() == 8
|
||||||
b = spot.simulation(a)
|
b = spot.simulation(a)
|
||||||
|
assert b.num_states() == 3
|
||||||
b.set_init_state(1)
|
b.set_init_state(1)
|
||||||
b.purge_unreachable_states()
|
b.purge_unreachable_states()
|
||||||
b.copy_state_names_from(a)
|
b.copy_state_names_from(a)
|
||||||
|
|
@ -182,7 +184,7 @@ Acceptance: 1 Inf(0)
|
||||||
properties: trans-labels explicit-labels trans-acc complete
|
properties: trans-labels explicit-labels trans-acc complete
|
||||||
properties: deterministic stutter-invariant
|
properties: deterministic stutter-invariant
|
||||||
--BODY--
|
--BODY--
|
||||||
State: 0 "[1,8,9]"
|
State: 0 "[1,7]"
|
||||||
[!1] 0 {0}
|
[!1] 0 {0}
|
||||||
[1] 0
|
[1] 0
|
||||||
--END--"""
|
--END--"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue