Revamp tgbaexplicit.hh

* src/tgba/tgbaexplicit.hh, src/tgba/tgbaexplicit.cc: Factor most of
the code in an explicit_graph<State, Type> that inherits from type.
The tgba_explicit type<State> now inherits from
explicit_graph<State,tgba>.
* src/ltlvisit/contain.cc, src/neverparse/neverclaimparse.yy
src/tgba/tgbareduc.cc, src/tgba/tgbareduc.hh, src/tgbaalgos/cutscc.cc,
src/tgbaalgos/dupexp.cc, src/tgbaalgos/dupexp.hh,
src/tgbaalgos/emptiness.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/ltl2tgba_fm.hh, src/tgbaalgos/minimize.cc,
src/tgbaalgos/powerset.cc, src/tgbaalgos/randomgraph.cc,
src/tgbaalgos/sccfilter.cc, src/tgbaparse/tgbaparse.yy,
src/tgbatest/complementation.cc, src/tgbatest/explicit.cc,
src/tgbatest/explprod.cc, src/tgbatest/ltl2tgba.cc,
src/tgbatest/mixprod.cc, src/tgbatest/powerset.cc,
src/tgbatest/tgbaread.cc, src/tgbatest/tripprod.cc:
Replace tgba_explicit* by the actual type used.
* src/tgbatest/explicit2.cc: New file.
* src/tgbatest/Makefile.am: Add it.
This commit is contained in:
Pierre PARUTTO 2012-03-06 00:13:15 +01:00 committed by Alexandre Duret-Lutz
parent 9e2b932fe6
commit a15aac2845
27 changed files with 810 additions and 708 deletions

View file

@ -53,8 +53,9 @@ namespace spot
}
void
random_labels(tgba_explicit* aut,
tgba_explicit::state* src, const tgba_explicit::state* dest,
random_labels(tgba_explicit_string* aut,
state_explicit_string* src,
const state_explicit_string* dest,
int* props, int props_n, float t,
const std::list<bdd>& accs, float a)
{
@ -84,7 +85,7 @@ namespace spot
if (drand() < a)
ac |= *i;
tgba_explicit::transition* u = aut->create_transition(src, dest);
state_explicit_string::transition* u = aut->create_transition(src, dest);
aut->add_conditions(u, p);
aut->add_acceptance_conditions(u, ac);
}
@ -107,7 +108,7 @@ namespace spot
i != ap->end(); ++i)
props[pi++] = dict->register_proposition(*i, res);
std::vector<tgba_explicit::state*> states(n);
std::vector<state_explicit_string*> states(n);
// Indirect access to state[] to help random selection of successors.
std::vector<int> state_randomizer(n);
@ -153,7 +154,7 @@ namespace spot
while (!nodes_to_process.empty())
{
tgba_explicit::state* src = states[*nodes_to_process.begin()];
state_explicit_string* src = states[*nodes_to_process.begin()];
nodes_to_process.erase(nodes_to_process.begin());
// Choose a random number of successors (at least one), using
@ -195,7 +196,7 @@ namespace spot
state_randomizer[index] = state_randomizer[possibilities];
state_randomizer[possibilities] = x;
tgba_explicit::state* dest = states[x];
state_explicit_string* dest = states[x];
random_labels(res, src, dest, props, props_n, t, accs, a);