* src/tgba/succiterconcrete.hh (next_succ_set_): Rename as ...
(succ_set_left_): ... this. (current_base_, current_base_left_): New variables. * src/tgba/succiterconcrete.cc (tgba_succ_iterator_concrete::first): Reset current_. (tgba_succ_iterator_concrete::next): Rewrite. (tgba_succ_iterator_concrete::current_state): Simplify. (tgba_succ_iterator_concrete::current_accepting_conditions): Remove atomic proposition with universal quantification. * src/tgba/ltl2tgba.cc (ltl_to_tgba): Normalize the formula. * src/tgba/tgbabddconcrete.cc (tgba_bdd_concrete::set_init_state): Complete the initial state. (tgba_bdd_concrete::succ_iter): Do not remove Now variable from the BDD passed to the iterator. * tgba/tgbabddcoredata.hh (notnow_set, var_set): New variables. * tgba/tgbabddcoredata.cc, tgba/tgbabddtranslatefactory.cc: Adjust to update notnow_set and var_set.
This commit is contained in:
parent
35be07c472
commit
6d0546c317
8 changed files with 216 additions and 32 deletions
|
|
@ -1,5 +1,8 @@
|
|||
#include "ltlast/visitor.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
#include "ltlvisit/lunabbrev.hh"
|
||||
#include "ltlvisit/nenoform.hh"
|
||||
#include "ltlvisit/destroy.hh"
|
||||
#include "tgbabddconcretefactory.hh"
|
||||
#include <cassert>
|
||||
|
||||
|
|
@ -211,12 +214,23 @@ namespace spot
|
|||
tgba_bdd_concrete
|
||||
ltl_to_tgba(const ltl::formula* f)
|
||||
{
|
||||
// Normalize the formula. We want all the negation on
|
||||
// the atomic proposition. We also suppress logic
|
||||
// abbreviation such as <=>, =>, or XOR, since they
|
||||
// would involve negations at the BDD level.
|
||||
const ltl::formula* f1 = ltl::unabbreviate_logic(f);
|
||||
const ltl::formula* f2 = ltl::negative_normal_form(f1);
|
||||
ltl::destroy(f1);
|
||||
|
||||
// Traverse the formula and draft the automaton in a factory.
|
||||
tgba_bdd_concrete_factory fact;
|
||||
ltl_trad_visitor v(fact);
|
||||
f->accept(v);
|
||||
f2->accept(v);
|
||||
ltl::destroy(f2);
|
||||
fact.finish();
|
||||
tgba_bdd_concrete g(fact);
|
||||
g.set_init_state(v.result());
|
||||
|
||||
// Finally setup the resulting automaton.
|
||||
tgba_bdd_concrete g(fact, v.result());
|
||||
return g;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue