Simplify the construction of TA.
* src/ltlvisit/apcollect.cc, src/ltlvisit/apcollect.hh: Add a version that builds a BDD. * src/tgbatest/ltl2tgba.cc: Use it.
This commit is contained in:
parent
8e1438c98f
commit
20c3f9f8ba
3 changed files with 27 additions and 12 deletions
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "apcollect.hh"
|
||||
#include "ltlvisit/postfix.hh"
|
||||
#include "tgba/tgba.hh"
|
||||
#include "tgba/bdddict.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -63,6 +65,19 @@ namespace spot
|
|||
return s;
|
||||
}
|
||||
|
||||
bdd
|
||||
atomic_prop_collect_as_bdd(const formula* f, tgba* a)
|
||||
{
|
||||
spot::ltl::atomic_prop_set aps;
|
||||
atomic_prop_collect(f, &aps);
|
||||
bdd_dict* d = a->get_dict();
|
||||
bdd res = bddtrue;
|
||||
for (atomic_prop_set::const_iterator i = aps.begin();
|
||||
i != aps.end(); ++i)
|
||||
res &= bdd_ithvar(d->register_proposition(*i, a));
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue