implement conversion to GRA and GSA

Fixes #174.

* spot/twaalgos/totgba.hh, spot/twaalgos/totgba.cc
(to_generalized_streett, to_generalized_rabin): New functions.
* spot/twa/acc.hh: Declare more methods as static.
* bin/autfilt.cc: Implement --generalized-rabin and
--generalized-streett options.
* NEWS: Mention these.
* tests/core/gragsa.test: New file.
* tests/Makefile.am: Add it.
This commit is contained in:
Alexandre Duret-Lutz 2016-08-04 22:24:30 +02:00
parent 736003057c
commit 14bee1ae7f
7 changed files with 338 additions and 11 deletions

View file

@ -207,6 +207,7 @@ TESTS_twa = \
core/complete.test \
core/complement.test \
core/remfin.test \
core/gragsa.test \
core/dstar.test \
core/readsave.test \
core/ltldo.test \

31
tests/core/gragsa.test Executable file
View file

@ -0,0 +1,31 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2016 Laboratoire de Recherche
# et Développement de l'Epita (LRDE).
#
# 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/>.
. ./defs
set -e
randltl -n 100 p1 p2 p3 --tree-size 5..15 --seed=200 |
ltlcross --timeout=60 \
"ltl2tgba %f > %T" \
"ltl2tgba -G -D %f > %T" \
"ltl2tgba -G -D %f | autfilt --gsa=unique-fin > %T" \
"ltl2tgba -G -D %f | autfilt --gra=unique-inf > %T" \
"ltl2tgba -G -D %f | autfilt --gsa=share-fin > %T" \
"ltl2tgba -G -D %f | autfilt --gra=share-inf > %T"