From: Clark Barrett Date: Fri, 16 Jun 2017 00:11:22 +0000 (-0700) Subject: Fix for bug 639. X-Git-Tag: cvc5-1.0.0~5770 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0335ae596244853ba35f7ae8c09caacdcf01f320;p=cvc5.git Fix for bug 639. --- 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)