merge tunnabrev/lunnabrev/wmunabbrev into a single function

* src/ltlvisit/lunabbrev.cc, src/ltlvisit/lunabbrev.hh,
src/ltlvisit/tunabbrev.cc, src/ltlvisit/tunabbrev.hh,
src/ltlvisit/wmunabbrev.cc, src/ltlvisit/wmunabbrev.hh: Delete.
* src/ltlvisit/unabbrev.cc, src/ltlvisit/unabbrev.hh: New files.
* src/ltlvisit/Makefile.am: Adjust.
* src/ltlvisit/print.cc, src/tests/equalsf.cc, src/tests/Makefile.am,
src/twaalgos/ltl2taa.cc, wrap/python/spot_impl.i, src/bin/ltlfilt.cc:
Adjust callers.
* src/ltlvisit/contain.cc, src/tests/syntimpl.cc: Remove useless
include.
* wrap/python/tests/formulas.ipynb: New test cases.
* doc/tl/tl.tex: Group all rules in a single section.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2015-08-17 15:26:42 +02:00
parent 314a016547
commit d1f915c748
20 changed files with 427 additions and 594 deletions

View file

@ -27,8 +27,7 @@
#include <cstring>
#include "ltlast/allnodes.hh"
#include "ltlast/visitor.hh"
#include "lunabbrev.hh"
#include "wmunabbrev.hh"
#include "unabbrev.hh"
#include "print.hh"
#include "misc/escape.hh"
@ -985,11 +984,7 @@ namespace spot
std::ostream&
print_spin_ltl(std::ostream& os, const formula* f, bool full_parent)
{
// Rewrite xor.
const formula* fu = unabbreviate_logic(f, "^");
// Also remove W and M.
f = unabbreviate_wm(fu);
fu->destroy();
f = unabbreviate(f, "^MW");
to_string_visitor v(os, full_parent, false, spin_kw);
f->accept(v);
f->destroy();
@ -1007,8 +1002,7 @@ namespace spot
std::ostream&
print_wring_ltl(std::ostream& os, const formula* f)
{
// Remove W and M.
f = unabbreviate_wm(f);
f = unabbreviate(f, "MW");
to_string_visitor v(os, true, false, wring_kw);
f->accept(v);
f->destroy();