* src/ltltest/Makefile.am (AM_CXXFLAGS): New variable.
* tgba/bdddict.hh (bdd_dict::register_propositions, bdd_dict::register_accepting_variables): New methods. * src/bdddict.cc: Likewise. * tgba/tgbaexplicit.cc (tgba_explicit::add_conditions, tgba_explicit::add_accepting_conditions): New methods. (tgba_explicit::get_init_state): Add an "empty" initial state to empty automata. * tgba/tgbaexplicit.hh: (tgba_explicit::add_conditions, tgba_explicit::add_accepting_conditions): New methods. * tgbaalgos/Makefiles.am (tgbaalgos_HEADERS, libtgbaalgos_la_SOURCES): Add dupexp.hh and dupexp.cc. * tgbaalgos/dupexp.hh, tgbaalgos/dupexp.cc: New files. * tgbatest/Makefile.am (AM_CXXFLAGS): New variable. (check_SCRIPTS): Add dupexp.test. (CLEANFILES): Add output1 and output2. * tgbatest/dupexp.test: New file. * tgbatest/ltl2tgba.cc: Handle -s and -S. * tgbatest/tgbaread.cc: Remove unused variable exit_code.
This commit is contained in:
parent
51ff9f8dda
commit
982c5efc6c
13 changed files with 271 additions and 8 deletions
|
|
@ -119,7 +119,7 @@ namespace spot
|
|||
|
||||
// The first state we add is the inititial state.
|
||||
// It can also be overridden with set_init_state().
|
||||
if (! init_)
|
||||
if (!init_)
|
||||
init_ = s;
|
||||
|
||||
return s;
|
||||
|
|
@ -170,6 +170,13 @@ namespace spot
|
|||
t->condition -= get_condition(f);
|
||||
}
|
||||
|
||||
void
|
||||
tgba_explicit::add_conditions(transition* t, bdd f)
|
||||
{
|
||||
dict_->register_propositions(f, this);
|
||||
t->condition &= f;
|
||||
}
|
||||
|
||||
void
|
||||
tgba_explicit::declare_accepting_condition(ltl::formula* f)
|
||||
{
|
||||
|
|
@ -245,9 +252,25 @@ namespace spot
|
|||
t->accepting_conditions |= c;
|
||||
}
|
||||
|
||||
void
|
||||
tgba_explicit::add_accepting_conditions(transition* t, bdd f)
|
||||
{
|
||||
bdd sup = bdd_support(f);
|
||||
dict_->register_accepting_variables(sup, this);
|
||||
while (sup != bddtrue)
|
||||
{
|
||||
neg_accepting_conditions_ &= bdd_nithvar(bdd_var(sup));
|
||||
sup = bdd_high(sup);
|
||||
}
|
||||
t->accepting_conditions |= f;
|
||||
}
|
||||
|
||||
state*
|
||||
tgba_explicit::get_init_state() const
|
||||
{
|
||||
// Fix empty automata by adding a lone initial state.
|
||||
if (!init_)
|
||||
const_cast<tgba_explicit*>(this)->add_state("empty");
|
||||
return new state_explicit(init_);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue