* src/tgba/tgbaexplicit.cc, src/tgba/tgbaexplicit.hh
(tgba_explicit::merge_transitions): New method. * src/tgbaalgos/ltl2tgba_fm.cc (ltl_to_tgba_fm): Factorize all variables (not just Next and A) when computing prime implicants, and then call merge_transitions().
This commit is contained in:
parent
9b0ab316c2
commit
d07c66944e
4 changed files with 68 additions and 1 deletions
|
|
@ -220,6 +220,37 @@ namespace spot
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
tgba_explicit::merge_transitions()
|
||||
{
|
||||
ns_map::iterator i;
|
||||
for (i = name_state_map_.begin(); i != name_state_map_.end(); ++i)
|
||||
{
|
||||
state::iterator t1;
|
||||
for (t1 = i->second->begin(); t1 != i->second->end(); ++t1)
|
||||
{
|
||||
bdd acc = (*t1)->acceptance_conditions;
|
||||
state* dest = (*t1)->dest;
|
||||
|
||||
// Find another transition with the same destination and
|
||||
// acceptance conditions.
|
||||
state::iterator t2 = t1;
|
||||
++t2;
|
||||
while (t2 != i->second->end())
|
||||
{
|
||||
state::iterator t2copy = t2++;
|
||||
if ((*t2copy)->acceptance_conditions == acc
|
||||
&& (*t2copy)->dest == dest)
|
||||
{
|
||||
(*t1)->condition |= (*t2copy)->condition;
|
||||
delete *t2copy;
|
||||
i->second->erase(t2copy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
tgba_explicit::has_acceptance_condition(const ltl::formula* f) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ namespace spot
|
|||
/// This assumes that all acceptance conditions in \a f are known from dict.
|
||||
void add_acceptance_conditions(transition* t, bdd f);
|
||||
void complement_all_acceptance_conditions();
|
||||
void merge_transitions();
|
||||
|
||||
// tgba interface
|
||||
virtual ~tgba_explicit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue