Speedup build_result() called by minimize_dfa().
* src/tgbaalgos/minimize.cc (build_result): Speed it up by removing one useless loop, creating many duplicate transitions that had to be merged.
This commit is contained in:
parent
4b75c9b8e6
commit
de4166f4c9
2 changed files with 18 additions and 9 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2011-03-04 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||
|
||||
Speedup build_result() called by minimize_dfa().
|
||||
|
||||
* src/tgbaalgos/minimize.cc (build_result): Speed it up by
|
||||
removing one useless loop, creating many duplicate transitions
|
||||
that had to be merged.
|
||||
|
||||
2011-03-01 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||
|
||||
* src/ltltest/genltl.cc: Add 10 more LTL formula classes.
|
||||
|
|
|
|||
|
|
@ -141,13 +141,15 @@ namespace spot
|
|||
{
|
||||
hash_set::iterator hit;
|
||||
hash_set* h = *sit;
|
||||
for (hit = h->begin(); hit != h->end(); ++hit)
|
||||
{
|
||||
const state* src = *hit;
|
||||
unsigned src_num = state_num[src];
|
||||
tgba_succ_iterator* succit = a->succ_iter(src);
|
||||
bool accepting = (final->find(src) != final->end());
|
||||
for (succit->first(); !succit->done(); succit->next())
|
||||
|
||||
// Pick one state.
|
||||
const state* src = *h->begin();
|
||||
unsigned src_num = state_num[src];
|
||||
bool accepting = (final->find(src) != final->end());
|
||||
|
||||
// Connect it to all destinations.
|
||||
tgba_succ_iterator* succit = a->succ_iter(src);
|
||||
for (succit->first(); !succit->done(); succit->next())
|
||||
{
|
||||
const state* dst = succit->current_state();
|
||||
hash_map::const_iterator i = state_num.find(dst);
|
||||
|
|
@ -159,8 +161,7 @@ namespace spot
|
|||
if (accepting)
|
||||
res->add_acceptance_condition(t, ltl::constant::true_instance());
|
||||
}
|
||||
delete succit;
|
||||
}
|
||||
delete succit;
|
||||
}
|
||||
res->merge_transitions();
|
||||
const state* init_state = a->get_init_state();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue