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:
Alexandre Duret-Lutz 2010-12-09 10:15:19 +01:00
parent 546260e7a0
commit 48cde88b9b
14 changed files with 73 additions and 268 deletions

View file

@ -35,16 +35,21 @@ namespace spot
{
props = child->get_props();
is.boolean = false;
is.ltl_formula = false;
is.eltl_formula = false;
is.eventual = false;
is.universal = false;
switch (op_)
{
case Equal:
case Star:
if (min_ == 0)
is.accepting_eword = true;
break;
case Equal:
case Goto:
is.boolean = false;
is.ltl_formula = false;
is.eltl_formula = false;
is.eventual = false;
is.universal = false;
is.accepting_eword = (min_ == 0);
break;
}
}