Replace the constant_term visitor by a flag in the formulae.
* src/ltlast/formula.hh (formula::accepts_eword): New method. (formula::is.accepting_eword): New flag. * src/ltlast/formula.cc (print_formula_props): Display the new property. * src/ltlast/atomic_prop.cc, src/ltlast/automatop.cc, src/ltlast/binop.cc, src/ltlast/bunop.cc, src/ltlast/constant.cc, src/ltlast/multop.cc, src/ltlast/unop.cc: Update is.accepting_eword as appropriate. * src/ltltest/consterm.cc, src/tgbaalgos/ltl2tgba_fm.cc: Adjust to use accepts_eword(). * src/ltlvisit/consterm.cc, src/ltlvisit/consterm.hh: Delete. * src/ltlvisit/Makefile.am: Remove these files.
This commit is contained in:
parent
546260e7a0
commit
48cde88b9b
14 changed files with 73 additions and 268 deletions
|
|
@ -22,7 +22,6 @@
|
|||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include "ltlparse/public.hh"
|
||||
#include "ltlvisit/consterm.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
|
||||
void
|
||||
|
|
@ -44,7 +43,7 @@ main(int argc, char **argv)
|
|||
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
|
||||
return 2;
|
||||
|
||||
bool b = spot::ltl::constant_term_as_bool(f1);
|
||||
bool b = f1->accepts_eword();
|
||||
|
||||
std::cout << b << std::endl;
|
||||
|
||||
|
|
@ -52,6 +51,7 @@ main(int argc, char **argv)
|
|||
assert(spot::ltl::atomic_prop::instance_count() == 0);
|
||||
assert(spot::ltl::unop::instance_count() == 0);
|
||||
assert(spot::ltl::binop::instance_count() == 0);
|
||||
assert(spot::ltl::bunop::instance_count() == 0);
|
||||
assert(spot::ltl::multop::instance_count() == 0);
|
||||
return b;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue