postproc: add support for co-Büchi output
* spot/twaalgos/cobuchi.cc, spot/twaalgos/cobuchi.hh (to_nca): New function. (weak_to_cobuchi): New internal function, used in to_nca and to_dca when appropriate. * spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Implement the CoBuchi option. * python/spot/__init__.py: Support it in Python. * bin/common_post.cc: Add support for --buchi. * bin/autfilt.cc: Remove the --dca option. * tests/core/dca.test, tests/python/automata.ipynb: Adjust and add more tests. In particular, add more complex persistence and recurrence formulas to the list of dca.test. * tests/python/dca.test: Adjust and rename to... * tests/core/dca2.test: ... this. Add more tests, to the point that this is now failing, as described in issue #317. * tests/python/dca.py: Remove. * tests/Makefile.am: Adjust.
This commit is contained in:
parent
9464043d39
commit
61b0a542f1
14 changed files with 618 additions and 531 deletions
75
tests/core/dca2.test
Executable file
75
tests/core/dca2.test
Executable file
|
|
@ -0,0 +1,75 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2017, 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/>.
|
||||
|
||||
. ./defs
|
||||
set -e
|
||||
|
||||
cat >l_formulas <<'EOF'
|
||||
FG!b
|
||||
FGc
|
||||
F(a | Gb)
|
||||
XF(b & Ga)
|
||||
a | c | FG(!b & !c)
|
||||
!a | FGb
|
||||
F((!a & ((c & F!b) | (!c & Gb))) | (a & ((c & Gb) | (!c & F!b))))
|
||||
F((c & F!b) | (!c & Gb))
|
||||
F((!c R a) W G!b)
|
||||
FG(((!b | (c M b)) & X(c & Xa)) | (b & (!c W !b) & X(!c | X!a)))
|
||||
(Ga M c) M ((!b & Fb) M F(a | !b))
|
||||
(Gb | X(!b M X!b)) M ((b & c) | (!b & !c))
|
||||
F(c R (X!c W Fb))
|
||||
XF!c & F(Fb R a)
|
||||
(!c M F(b & Ga)) W (b U a)
|
||||
EOF
|
||||
|
||||
cat >r_formulas <<'EOF'
|
||||
GF(b | GF!c)
|
||||
!b & G(G!c | XFc)
|
||||
GF(b | c | (!c & XFb))
|
||||
GFc | G(!b | !c)
|
||||
G(Gb | Fc)
|
||||
G(c | (c R Xc) | XF(b & !c))
|
||||
Gc R XFb
|
||||
G(c | (!b M (GFc | G!c)))
|
||||
F(((c W Xb) & F(b R !c)) | ((!c M X!b) & G(!b U c)))
|
||||
EOF
|
||||
|
||||
while read l_f; do
|
||||
ltl2tgba --parity='max odd' "$l_f" > l.hoa
|
||||
autfilt -q --acceptance-is='Fin(0) | Inf(1)' l.hoa
|
||||
while read r_f; do
|
||||
# Dualizing a deterministic transition-based parity automaton
|
||||
# to obtain a transition-based deterministic streett
|
||||
# automaton. What we want to avoid as much as possible is
|
||||
# weak automata, because l.hoa is already weak and that would
|
||||
# make the sum/product weak as well.
|
||||
ltl2tgba "$r_f" -D --parity='min odd' | autfilt --dualize --gsa > r.hoa
|
||||
# Streett & Streett
|
||||
autfilt r.hoa --name="($l_f)&!($r_f)" --product=l.hoa -S > and.hoa
|
||||
autfilt -q --acceptance-is=Streett and.hoa
|
||||
# Streett | Streett
|
||||
autfilt r.hoa --name="($l_f)|!($r_f)" --product-or=l.hoa -S > or.hoa
|
||||
autfilt -q -v --acceptance-is=Streett or.hoa
|
||||
|
||||
autcross --language-preserved --verbose -F or.hoa -F and.hoa \
|
||||
'autfilt %H --stats=%M | ltl2tgba >%O' \
|
||||
'autfilt --cobuchi' 'autfilt --cobuchi -D'
|
||||
done <r_formulas
|
||||
done <l_formulas
|
||||
Loading…
Add table
Add a link
Reference in a new issue