Check that reductions are legitimates with containment.
* src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh (are_equivalent): Export this function from the cache. * src/ltltest/reduc.cc, src/ltltest/equals.cc: Use are_equivalent() to check that the reductions are legitimate.
This commit is contained in:
parent
cd9369c186
commit
7f7627bf22
4 changed files with 100 additions and 55 deletions
|
|
@ -244,7 +244,8 @@ namespace spot
|
|||
// If right==false, true if !f1 => f2, false otherwise.
|
||||
// If right==true, true if f1 => !f2, false otherwise.
|
||||
bool
|
||||
syntactic_implication_neg(const formula* f1, const formula* f2, bool right);
|
||||
syntactic_implication_neg(const formula* f1, const formula* f2,
|
||||
bool right);
|
||||
|
||||
// Return true if f1 => !f2
|
||||
bool contained_neg(const formula* f1, const formula* f2)
|
||||
|
|
@ -2862,11 +2863,17 @@ namespace spot
|
|||
}
|
||||
|
||||
bool
|
||||
ltl_simplifier::syntactic_implication_neg(const formula* f1, const formula* f2,
|
||||
bool right)
|
||||
ltl_simplifier::syntactic_implication_neg(const formula* f1,
|
||||
const formula* f2, bool right)
|
||||
{
|
||||
return cache_->syntactic_implication_neg(f1, f2, right);
|
||||
}
|
||||
|
||||
bool
|
||||
ltl_simplifier::are_equivalent(const formula* f, const formula* g)
|
||||
{
|
||||
return cache_->lcc.equal(f, g);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ namespace spot
|
|||
ltl_simplifier(ltl_simplifier_options& opt);
|
||||
~ltl_simplifier();
|
||||
|
||||
/// Simplify the formula \a f (using options supplied to the constructor).
|
||||
/// Simplify the formula \a f (using options supplied to the
|
||||
/// constructor).
|
||||
formula* simplify(const formula* f);
|
||||
|
||||
/// Build the negative normal form of formula \a f.
|
||||
|
|
@ -108,7 +109,15 @@ namespace spot
|
|||
/// If \a right is true, this method returns whether
|
||||
/// \a f implies !\a g. If \a right is false, this returns
|
||||
/// whether !\a g implies \a g.
|
||||
bool syntactic_implication_neg(const formula* f, const formula* g, bool right);
|
||||
bool syntactic_implication_neg(const formula* f, const formula* g,
|
||||
bool right);
|
||||
|
||||
/// \brief check whether two formulae are equivalent.
|
||||
///
|
||||
/// This costly check performs up to four translations,
|
||||
/// two products, and two emptiness checks.
|
||||
bool are_equivalent(const formula* f, const formula* g);
|
||||
|
||||
|
||||
private:
|
||||
ltl_simplifier_cache* cache_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue