Generalize the previous patch to accepting states in SBA.
* src/tgba/tgbatba.cc (tgba_tba_proxy_succ_iterator::sync_): Move the optimization step added by the previous patch outside the before the bddtrue check, so that it also applies to accepting states in SBA.
This commit is contained in:
parent
8405838347
commit
52faa81a77
2 changed files with 22 additions and 15 deletions
|
|
@ -1,3 +1,12 @@
|
||||||
|
2010-03-05 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
|
Generalize the previous patch to accepting states in SBA.
|
||||||
|
|
||||||
|
* src/tgba/tgbatba.cc (tgba_tba_proxy_succ_iterator::sync_): Move
|
||||||
|
the optimization step added by the previous patch outside the
|
||||||
|
before the bddtrue check, so that it also applies to accepting
|
||||||
|
states in SBA.
|
||||||
|
|
||||||
2010-03-03 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
2010-03-03 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||||
|
|
||||||
Optimize tgba_tba_proxy and tgba_sba_proxy for states that share
|
Optimize tgba_tba_proxy and tgba_sba_proxy for states that share
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,19 @@ namespace spot
|
||||||
|
|
||||||
bdd acc = it_->current_acceptance_conditions();
|
bdd acc = it_->current_acceptance_conditions();
|
||||||
|
|
||||||
|
// As an extra optimization step, gather the acceptance
|
||||||
|
// conditions common to all outgoing transitions of the
|
||||||
|
// destination state, and pretend they are already present
|
||||||
|
// on this transition.
|
||||||
|
bdd common = aut_->all_acceptance_conditions();
|
||||||
|
state* dest = it_->current_state();
|
||||||
|
tgba_succ_iterator* dest_it = aut_->succ_iter(dest);
|
||||||
|
for (dest_it->first(); !dest_it->done(); dest_it->next())
|
||||||
|
common &= dest_it->current_acceptance_conditions();
|
||||||
|
acc |= common;
|
||||||
|
delete dest_it;
|
||||||
|
delete dest;
|
||||||
|
|
||||||
// bddtrue is a special condition used for tgba_sba_proxy
|
// bddtrue is a special condition used for tgba_sba_proxy
|
||||||
// to denote the (N+1)th copy of the state, after all acceptance
|
// to denote the (N+1)th copy of the state, after all acceptance
|
||||||
// conditions have been traversed. Such state is always accepting,
|
// conditions have been traversed. Such state is always accepting,
|
||||||
|
|
@ -205,21 +218,6 @@ namespace spot
|
||||||
// address= {Paris, France},
|
// address= {Paris, France},
|
||||||
// month = {December}
|
// month = {December}
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
// As an extra optimization step, gather the acceptance
|
|
||||||
// conditions common to all outgoing transitions of the
|
|
||||||
// destination state, and pretend they are already present
|
|
||||||
// on this transition.
|
|
||||||
bdd common = aut_->all_acceptance_conditions();
|
|
||||||
state* dest = it_->current_state();
|
|
||||||
tgba_succ_iterator* dest_it = aut_->succ_iter(dest);
|
|
||||||
for (dest_it->first(); !dest_it->done(); dest_it->next())
|
|
||||||
common &= dest_it->current_acceptance_conditions();
|
|
||||||
acc |= common;
|
|
||||||
delete dest_it;
|
|
||||||
delete dest;
|
|
||||||
|
|
||||||
next_ = expected_;
|
next_ = expected_;
|
||||||
while (next_ != cycle_.end() && (acc & *next_) == *next_)
|
while (next_ != cycle_.end() && (acc & *next_) == *next_)
|
||||||
++next_;
|
++next_;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue