postproc: Add option to output Complete automata.

* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh: Tweak set_pref()
to also accept Any|Complete, Small|Complete, or Deterministic|Complete.
* src/bin/common_post.hh, src/bin/common_post.cc: Add option --complete
and set comp.
* src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc: Pass
comp to set_pref().
* src/tgbaalgos/complete.cc: Preserve state-based acceptance.
* src/tgbatest/dstar.test, src/tgbatest/ltlcross2.test,
src/tgbatest/nondet.test: Augment tests.
* doc/org/dstar2tgba.org, doc/org/ltl2tgba.org, NEWS: Document.
This commit is contained in:
Alexandre Duret-Lutz 2013-08-26 15:46:51 +02:00
parent b31facffb1
commit 1ab46b0864
14 changed files with 139 additions and 49 deletions

View file

@ -80,12 +80,19 @@ namespace spot
{
// add a transition to a sink state if the state is not complete.
bdd all = bddtrue;
for (i->first(); !i->done(); i->next())
bdd acc = bddfalse;
i->first();
// In case the automaton use state-based acceptance, propagate
// the acceptance of the first transition to the one we add.
if (!i->done())
acc = i->current_acceptance_conditions();
for (; !i->done(); i->next())
all -= i->current_condition();
if (all != bddfalse)
{
trans* t = out_->create_transition(n, 0);
t->condition = all;
t->acceptance_conditions = acc | addacc_;
}
}