Safra: Fix usage of multiple acceptance conditions and fix text output.

* src/tgba/tgbasafracomplement.cc
(tgba_safra_complement::tgba_safra_complement)
(tgba_safra_complement::succ_iter): Correct the declaration and
use of multiple acceptance conditions.
(state_complement::to_string): Output the L set, not U.  The previous
code caused different states to share the same names, causing issues
with the text-based output (state with identical names get merged).
* src/tgba/tgbasafracomplement.hh
(tgba_safra_complement::acceptance_cond_vec_): Adjust type to
store BDDs.
* src/tgbatest/complementation.cc: Implement a new "-b" option
to output automata in Spot's syntax.
* src/tgbatest/complementation.test: Add a test-case supplied
by Martin Dieguez Lodeiro.
* THANKS: Add Martin.
This commit is contained in:
Alexandre Duret-Lutz 2011-10-23 23:06:35 +02:00
parent ff3c02f51d
commit a4d1e18bf3
6 changed files with 77 additions and 23 deletions

View file

@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (C) 2009 Laboratoire de Recherche et Développement
# Copyright (C) 2009, 2011 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -42,3 +42,25 @@ GFa&&FGa
[] (p2 -> ((! p0 && ! p1) U (p1 || ((p0 && ! p1) U (p1 || ((! p0 && ! p1) \
U (p1 || ((p0 && ! p1) U ((p1 || (! p0 U (p1 || [] ! p0))) || [] p0)))))))))
EOF
# The following test-case was supplied by Martin Dieguez Lodeiro to
# demonstrate a bug in our Safra implementation.
cat >x.tgba <<EOF
acc = "1";
"1", "1", "1",;
"1", "2", "p",;
"2", "3", "p", "1";
"2", "2", "1",;
"3", "3", "p", "1";
"3", "2", "1",;
EOF
# x.tgba accepts some run
run 0 ../ltl2tgba -X -e x.tgba
# so does its complement
run 0 ../complement -b -S -a x.tgba > nx.tgba
run 0 ../ltl2tgba -X -e nx.tgba
# however the intersection of both should not
# accept any run.
run 0 ../ltl2tgba -X -E -Pnx.tgba x.tgba