scc_info: fix split_on_sets
* spot/twaalgos/sccinfo.cc (split_on_sets): Correctly register APs. * tests/python/sccsplit.py: New file. * tests/Makefile.am: Add it. * NEWS: Mention the bug.
This commit is contained in:
parent
b52f4ea711
commit
9f81df2cd4
4 changed files with 37 additions and 0 deletions
5
NEWS
5
NEWS
|
|
@ -34,6 +34,11 @@ New in spot 2.6.0.dev (not yet released)
|
|||
- "ltlfilt --suspendable" is now a synonym for
|
||||
"ltlfilt --universal --eventual".
|
||||
|
||||
Bugs fixed:
|
||||
|
||||
- scc_info::split_on_sets() did not correctly register the
|
||||
atomic propositions of the returned automata.
|
||||
|
||||
New in spot 2.6 (2018-07-04)
|
||||
|
||||
Command-line tools:
|
||||
|
|
|
|||
|
|
@ -528,6 +528,7 @@ namespace spot
|
|||
cur.assign(aut_->num_states(), false);
|
||||
|
||||
auto copy = make_twa_graph(aut_->get_dict());
|
||||
copy->copy_ap_of(aut_);
|
||||
copy->copy_acceptance_of(aut_);
|
||||
copy->prop_state_acc(aut_->prop_state_acc());
|
||||
transform_accessible(aut_, copy, [&](unsigned src,
|
||||
|
|
|
|||
|
|
@ -400,6 +400,7 @@ TESTS_python = \
|
|||
python/sbacc.py \
|
||||
python/sccfilter.py \
|
||||
python/sccinfo.py \
|
||||
python/sccsplit.py \
|
||||
python/semidet.py \
|
||||
python/setacc.py \
|
||||
python/setxor.py \
|
||||
|
|
|
|||
30
tests/python/sccsplit.py
Normal file
30
tests/python/sccsplit.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/python3
|
||||
# -*- mode: python; coding: utf-8 -*-
|
||||
# Copyright (C) 2018 Laboratoire de Recherche et Développement de
|
||||
# l'EPITA.
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
#
|
||||
# Spot is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Spot is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
# License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import spot
|
||||
|
||||
aut = spot.translate('GF(a <-> Xa) & GF(b <-> XXb)')
|
||||
si = spot.scc_info(aut)
|
||||
s = ""
|
||||
for aut2 in si.split_on_sets(0, [0]):
|
||||
# This call to to_str() used to fail because split_on_sets had not
|
||||
# registered the atomic propositions of aut
|
||||
s += aut2.to_str();
|
||||
assert spot.automaton(s).num_states() == 8
|
||||
Loading…
Add table
Add a link
Reference in a new issue