tgba_digraph: add a set_single_acceptance_set() method.

* src/tgba/tgbagraph.cc: New file.
* src/tgba/Makefile.am: Adjust.
* src/tgba/tgbagraph.hh (set_single_acceptance_set,
new_acc_transition): New methods.
(set_acceptance_conditions, merge_transitions): Move body
to tgbagraph.cc.
* src/tgbaalgos/complete.cc, src/tgbaalgos/degen.cc,
src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbacomp.cc,
src/neverparse/neverclaimparse.yy, src/dstarparse/dra2ba.cc,
src/dstarparse/nra2nba.cc: Simplify using these new methods.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-13 11:37:39 +02:00
parent 5739240c0f
commit 917f70073f
10 changed files with 144 additions and 145 deletions

View file

@ -18,7 +18,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "complete.hh"
#include "ltlast/constant.hh"
#include "dupexp.hh"
namespace spot
@ -33,10 +32,7 @@ namespace spot
// We cannot safely complete an automaton if it has no
// acceptance set as the added sink would become accepting.
// In this case, add an acceptance set to all transitions.
const ltl::formula* t = ltl::constant::true_instance();
int v = aut->get_dict()->register_acceptance_variable(t, aut);
allacc = bdd_ithvar(v);
aut->set_acceptance_conditions(allacc);
allacc = aut->set_single_acceptance_set();
for (auto& t: aut->transitions())
t.acc = allacc;
}