ltlcross: adjust to work with generic acceptance

* src/bin/ltlcross.cc: Remove Fin-acceptance before
doing checks.  More --verbose output.
* src/tgba/acc.cc, src/tgba/acc.hh: Add an eval_sets() function
to find the set of acceptance sets needed to satisfy the condition
in an accepting SCC.
* src/tgbaalgos/gtec/ce.cc: Use eval_sets() when computing
a counter example.
* src/tgbaalgos/gtec/gtec.cc: Raise an exception when called
on an acceptance that contains Fin.
* src/tgbatest/ltl2dstar3.test, src/tgbatest/ltlcrossce2.test:
New files.
* src/tgbatest/Makefile.am: Add them.
* src/tgba/tgba.cc (is_empty): Call remove_fin if needed.
* src/tgbaalgos/product.cc, src/tgbaalgos/dtgbacomp.cc: Adjust
to work with generic acceptance.
This commit is contained in:
Alexandre Duret-Lutz 2015-02-25 08:57:49 +01:00
parent 9ccbc34964
commit 717c857794
11 changed files with 293 additions and 17 deletions

View file

@ -21,7 +21,9 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "tgba.hh"
#include "tgbagraph.hh"
#include "tgbaalgos/gtec/gtec.hh"
#include "tgbaalgos/remfin.hh"
#include <utility>
namespace spot
@ -80,7 +82,15 @@ namespace spot
// FIXME: This should be improved based on properties of the
// automaton. For instance we do not need couvreur99 is we know
// the automaton is weak.
return !couvreur99(shared_from_this())->check();
auto a = shared_from_this();
if (a->acc().uses_fin_acceptance())
{
auto aa = std::dynamic_pointer_cast<const tgba_digraph>(a);
if (!aa)
aa = make_tgba_digraph(a, prop_set::all());
a = remove_fin(aa);
}
return !couvreur99(a)->check();
}
void