Move the remaining reduce() logic into ltl_simplifier.

* src/ltlvisit/simplify.hh
(ltl_simplifier::negative_normal_form): Allow logical
unabbreviations during the NNF pass.
* src/ltlvisit/simplify.cc
(ltl_simplifier::negative_normal_form)
(negative_normal_form_visitor): Adjust.
(ltl_simplifier::simplify): Request unabbreviations.
* src/ltlvisit/reduce.cc (reduce): Remove most
of the code, leaving only a call ltl_simplifier
and some wrapper code to convert options.
* src/ltltest/reduccmp.test: Add more test cases.
This commit is contained in:
Alexandre Duret-Lutz 2011-08-24 17:40:22 +02:00
parent d4d4c0e7d3
commit c0085a8f30
4 changed files with 77 additions and 68 deletions

View file

@ -80,13 +80,11 @@ namespace spot
/// \param f The formula to normalize.
/// \param negated If \c true, return the negative normal form of
/// \c !f
///
/// Note that this will not remove abbreviated operators. If you
/// want to remove abbreviations, call spot::ltl::unabbreviate_logic
/// or spot::ltl::unabbreviate_ltl first. (Calling these functions
/// after spot::ltl::negative_normal_form would likely produce a
/// formula which is not in negative normal form.)
formula* negative_normal_form(const formula* f, bool negated = false);
/// \param lunabbrev If \c true, also remove Xor, Equiv, and Implies
/// operators. (It is faster than calling
/// spot::ltl::unabbreviate_ltl first.)
formula* negative_normal_form(const formula* f, bool negated = false,
bool lunabbrev = false);
private: