summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/theory/quantifiers/alpha_equivalence.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/theory/quantifiers/alpha_equivalence.cpp b/src/theory/quantifiers/alpha_equivalence.cpp
index 4bdc6698d..20fcaad49 100644
--- a/src/theory/quantifiers/alpha_equivalence.cpp
+++ b/src/theory/quantifiers/alpha_equivalence.cpp
@@ -17,12 +17,12 @@
#include "theory/quantifiers_engine.h"
-using namespace CVC4;
-using namespace std;
-using namespace CVC4::theory;
-using namespace CVC4::theory::quantifiers;
using namespace CVC4::kind;
+namespace CVC4 {
+namespace theory {
+namespace quantifiers {
+
struct sortTypeOrder {
expr::TermCanonize* d_tu;
bool operator() (TypeNode i, TypeNode j) {
@@ -142,15 +142,23 @@ Node AlphaEquivalence::reduceQuantifier(Node q)
Node lem;
if (ret != q)
{
- // do not reduce annotated quantified formulas based on alpha equivalence
- if (q.getNumChildren() == 2)
+ // lemma ( q <=> d_quant )
+ // Notice that we infer this equivalence regardless of whether q or ret
+ // have annotations (e.g. user patterns, names, etc.).
+ Trace("alpha-eq") << "Alpha equivalent : " << std::endl;
+ Trace("alpha-eq") << " " << q << std::endl;
+ Trace("alpha-eq") << " " << ret << std::endl;
+ lem = q.eqNode(ret);
+ if (q.getNumChildren() == 3)
{
- // lemma ( q <=> d_quant )
- Trace("alpha-eq") << "Alpha equivalent : " << std::endl;
- Trace("alpha-eq") << " " << q << std::endl;
- Trace("alpha-eq") << " " << ret << std::endl;
- lem = q.eqNode(ret);
+ Notice() << "Ignoring annotated quantified formula based on alpha "
+ "equivalence: "
+ << q << std::endl;
}
}
return lem;
}
+
+} // namespace quantifiers
+} // namespace theory
+} // namespace CVC4
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback