tgbadigraph: delegate useful graph methods

* src/tgba/tgbagraph.hh (new_state, new_states, new_transitions, out,
trans_data): Delegate these useful graph methods so we do not have to
call get_graph().
* src/graphtest/tgbagraph.cc, src/tgbaalgos/dtbasat.cc,
src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/dupexp.cc,
src/tgbaalgos/emptiness.cc, src/tgbaalgos/lbtt.cc,
src/tgbaalgos/powerset.cc, src/tgbaalgos/randomgraph.cc,
src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/sccinfo.cc,src/tgbaalgos/simulation.cc: Simplify.
This commit is contained in:
Alexandre Duret-Lutz 2014-07-10 10:23:48 +02:00
parent 18f6fe772b
commit 1a93166d15
12 changed files with 92 additions and 75 deletions

View file

@ -177,8 +177,7 @@ namespace spot
{
auto aut = std::unique_ptr<tgba_digraph>(new tgba_digraph(dict));
acc_mapper_int acc_b(aut.get(), num_acc, envacc);
auto& g = aut->get_graph();
g.new_states(num_states);
aut->new_states(num_states);
for (unsigned n = 0; n < num_states; ++n)
{
@ -229,7 +228,7 @@ namespace spot
}
bdd cond = formula_to_bdd(f, dict, aut.get());
f->destroy();
g.new_transition(src_state, dst_state, cond, acc);
aut->new_transition(src_state, dst_state, cond, acc);
}
}
return aut.release();
@ -243,8 +242,7 @@ namespace spot
{
auto aut = std::unique_ptr<tgba_digraph>(new tgba_digraph(dict));
acc_mapper_int acc_b(aut.get(), num_acc, envacc);
auto& g = aut->get_graph();
g.new_states(num_states);
aut->new_states(num_states);
for (unsigned n = 0; n < num_states; ++n)
{
@ -295,7 +293,7 @@ namespace spot
}
bdd cond = formula_to_bdd(f, dict, aut.get());
f->destroy();
g.new_transition(src_state, dst_state, cond, acc);
aut->new_transition(src_state, dst_state, cond, acc);
}
}
return aut.release();