summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.stanford.edu>2017-06-15 17:11:22 -0700
committerClark Barrett <barrett@cs.stanford.edu>2017-06-15 17:11:41 -0700
commit0335ae596244853ba35f7ae8c09caacdcf01f320 (patch)
tree7f2d5d4023d0641782368241151d05ebb1ba4250
parent06b31fab6b9968ea1d6a58435cf210af5e6f540a (diff)
Fix for bug 639.
-rw-r--r--src/theory/arrays/theory_arrays.cpp2
-rw-r--r--src/theory/arrays/theory_arrays.h7
-rw-r--r--test/regress/regress0/Makefile.am5
-rw-r--r--test/regress/regress0/bug639.smt22
4 files changed, 9 insertions, 7 deletions
diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp
index 2c7418a77..e712a51b6 100644
--- a/src/theory/arrays/theory_arrays.cpp
+++ b/src/theory/arrays/theory_arrays.cpp
@@ -1704,7 +1704,7 @@ void TheoryArrays::mergeArrays(TNode a, TNode b)
// so we take its representative to be safe.
a = d_equalityEngine.getRepresentative(a);
Assert(d_equalityEngine.getRepresentative(b) == a);
- Trace("arrays-merge") << spaces(getSatContext()->getLevel()) << "Arrays::merge: " << a << "," << b << ")\n";
+ Trace("arrays-merge") << spaces(getSatContext()->getLevel()) << "Arrays::merge: (" << a << ", " << b << ")\n";
if (options::arraysLazyRIntro1() && !options::arraysWeakEquivalence()) {
checkRIntro1(a, b);
diff --git a/src/theory/arrays/theory_arrays.h b/src/theory/arrays/theory_arrays.h
index 574702368..48da4c681 100644
--- a/src/theory/arrays/theory_arrays.h
+++ b/src/theory/arrays/theory_arrays.h
@@ -309,7 +309,6 @@ class TheoryArrays : public Theory {
Debug("arrays::propagate") << spaces(d_arrays.getSatContext()->getLevel()) << "NotifyClass::eqNotifyTriggerTermEquality(" << t1 << ", " << t2 << ", " << (value ? "true" : "false") << ")" << std::endl;
if (value) {
if (t1.getType().isArray()) {
- d_arrays.mergeArrays(t1, t2);
if (!d_arrays.isShared(t1) || !d_arrays.isShared(t2)) {
return true;
}
@@ -334,7 +333,11 @@ class TheoryArrays : public Theory {
void eqNotifyNewClass(TNode t) { }
void eqNotifyPreMerge(TNode t1, TNode t2) { }
- void eqNotifyPostMerge(TNode t1, TNode t2) { }
+ void eqNotifyPostMerge(TNode t1, TNode t2) {
+ if (t1.getType().isArray()) {
+ d_arrays.mergeArrays(t1, t2);
+ }
+ }
void eqNotifyDisequal(TNode t1, TNode t2, TNode reason) { }
};
diff --git a/test/regress/regress0/Makefile.am b/test/regress/regress0/Makefile.am
index 1d2cc9f45..20bafbc77 100644
--- a/test/regress/regress0/Makefile.am
+++ b/test/regress/regress0/Makefile.am
@@ -178,6 +178,7 @@ BUG_TESTS = \
bug596.cvc \
bug596b.cvc \
bug605.cvc \
+ bug639.smt2 \
bt-test-00.smt2 \
bt-test-01.smt2
#bug590.smt2
@@ -188,9 +189,7 @@ TESTS = $(SMT_TESTS) $(SMT2_TESTS) $(CVC_TESTS) $(TPTP_TESTS) $(BUG_TESTS)
# we have a minimized version still getting tested
# bug639 -- still fails, reopened bug
DISABLED_TESTS = \
- bug512.smt2 \
- bug639.smt2
-
+ bug512.smt2
EXTRA_DIST = $(TESTS) \
simplification_bug4.smt2.expect \
diff --git a/test/regress/regress0/bug639.smt2 b/test/regress/regress0/bug639.smt2
index 9e31e75cd..907568d73 100644
--- a/test/regress/regress0/bug639.smt2
+++ b/test/regress/regress0/bug639.smt2
@@ -1,4 +1,4 @@
-(set-logic QF_AUFLIA)
+(set-logic QF_AUFNIA)
(set-info :status unsat)
(declare-fun i () Int)
(declare-fun j () Int)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback