Simplify copying of atomic propositions in new tgba_digraph.

* src/tgba/bdddict.cc, src/tgba/bdddict.hh
(register_all_propositions_of): New method.
* src/tgba/tgbagraph.hh (copy_ap_of): New method.
* src/dstarparse/dra2ba.cc, src/dstarparse/nra2nba.cc,
src/dstarparse/nsa2tgba.cc, src/tgbaalgos/degen.cc,
src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/dupexp.cc, src/tgbaalgos/emptiness.cc,
src/tgbaalgos/minimize.cc, src/tgbaalgos/powerset.cc,
src/tgbaalgos/sccfilter.cc, src/tgbaalgos/simulation.cc,
src/tgbaalgos/stripacc.cc: Simplify using copy_ap_of.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-13 14:21:16 +02:00
parent 917f70073f
commit 10e5c62386
16 changed files with 65 additions and 61 deletions

View file

@ -245,18 +245,31 @@ namespace spot
bdd_dict::register_all_variables_of(const void* from_other,
const void* for_me)
{
bdd_info_map::iterator i;
for (i = bdd_map.begin(); i != bdd_map.end(); ++i)
auto j = priv_->free_anonymous_list_of.find(from_other);
if (j != priv_->free_anonymous_list_of.end())
priv_->free_anonymous_list_of[for_me] = j->second;
for (auto& i: bdd_map)
{
ref_set& s = i->refs;
ref_set& s = i.refs;
if (s.find(from_other) != s.end())
s.insert(for_me);
}
bdd_dict_priv::free_anonymous_list_of_type::const_iterator j =
priv_->free_anonymous_list_of.find(from_other);
if (j != priv_->free_anonymous_list_of.end())
priv_->free_anonymous_list_of[for_me] = j->second;
}
void
bdd_dict::register_all_propositions_of(const void* from_other,
const void* for_me)
{
for (auto& i: bdd_map)
{
if (i.type != var_type::var)
continue;
ref_set& s = i.refs;
if (s.find(from_other) != s.end())
s.insert(for_me);
}
}
void