Now succ_iter() can fetch extra information from
the root of a product to reduce its number of successors. * src/tgba/Makefile.am (libtgba_la_SOURCES): Add tgba.cc. * src/tgba/tgba.hh (tgba::succ_iter): Add the global_state and global_automaton arguments. (tgba::support_conditions, tgba::support_variables, tgba::compute_support_conditions, tgba::compute_support_variables): New functions. (tgba::last_support_conditions_input_, tgba::last_support_conditions_output_, tgba::last_support_variables_input_, tgba::last_support_variables_output_): New attributes. * src/tgba/tgbabddconcrete.cc (tgba_bdd_concrete::succ_iter): Handle the two new arguments. (tgba_bdd_concrete::compute_support_conditions, tgba_bdd_concrete::compute_support_variables): Implement them. * src/tgba/tgbabddconcrete.hh: Adjust. * src/tgba/tgbaexplicit.cc (tgba_explicit::succ_iter): Ignore the two new arguments. (tgba_explicit::compute_support_conditions, tgba_explicit::compute_support_variables): Implement them. * src/tgba/tgbaexplicit.hh: Adjust. * src/tgba/tgbaproduct.cc (tgba_product::succ_iter): Handle the two new arguments. (tgba_product::compute_support_conditions, tgba_product::compute_support_variables): Implement them. * src/tgba/tgbaproduct.hh: Adjust. * iface/gspn/gspn.cc (tgba_gspn_private_::last_state_cond_input, tgba_gspn_private_::last_state_cond_output, (tgba_gspn_private_::tgba_gspn_private_): Set last_state_cond_input. (tgba_gspn_private_::~tgba_gspn_private_): Delete last_state_cond_input. (tgba_gspn_private_::state_conds): New function, eved out from tgba_gspn::succ_iter. (tgba_gspn::succ_iter): Use it. Use the two new arguments. (tgba_gspn::compute_support_conditions, tgba_gspn::compute_support_variables): New functions. * iface/gspn/gspn.hh: Adjust.
This commit is contained in:
parent
4bf6c52bea
commit
1d9c3d6409
13 changed files with 435 additions and 119 deletions
|
|
@ -206,14 +206,46 @@ namespace spot
|
|||
}
|
||||
|
||||
tgba_succ_iterator*
|
||||
tgba_explicit::succ_iter(const spot::state* state) const
|
||||
tgba_explicit::succ_iter(const spot::state* state,
|
||||
const spot::state* global_state,
|
||||
const tgba* global_automaton) const
|
||||
{
|
||||
const state_explicit* s = dynamic_cast<const state_explicit*>(state);
|
||||
assert(s);
|
||||
(void) global_state;
|
||||
(void) global_automaton;
|
||||
return new tgba_explicit_succ_iterator(s->get_state(),
|
||||
all_accepting_conditions());
|
||||
}
|
||||
|
||||
bdd
|
||||
tgba_explicit::compute_support_conditions(const spot::state* in) const
|
||||
{
|
||||
const state_explicit* s = dynamic_cast<const state_explicit*>(in);
|
||||
assert(s);
|
||||
const state* st = s->get_state();
|
||||
|
||||
bdd res = bddtrue;
|
||||
tgba_explicit::state::const_iterator i;
|
||||
for (i = st->begin(); i != st->end(); ++i)
|
||||
res |= (*i)->condition;
|
||||
return res;
|
||||
}
|
||||
|
||||
bdd
|
||||
tgba_explicit::compute_support_variables(const spot::state* in) const
|
||||
{
|
||||
const state_explicit* s = dynamic_cast<const state_explicit*>(in);
|
||||
assert(s);
|
||||
const state* st = s->get_state();
|
||||
|
||||
bdd res = bddtrue;
|
||||
tgba_explicit::state::const_iterator i;
|
||||
for (i = st->begin(); i != st->end(); ++i)
|
||||
res &= bdd_support((*i)->condition);
|
||||
return res;
|
||||
}
|
||||
|
||||
bdd_dict*
|
||||
tgba_explicit::get_dict() const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue