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
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