summaryrefslogtreecommitdiff
path: root/src/theory/arrays
diff options
context:
space:
mode:
authorPaul Meng <baolmeng@gmail.com>2016-10-11 13:54:20 -0500
committerPaul Meng <baolmeng@gmail.com>2016-10-11 13:54:20 -0500
commit3395c5c13cd61d98aec0d9806e3b9bc3d707968a (patch)
tree0eadad9799862ec77d29f7abe03a46c300d80de8 /src/theory/arrays
parent773e7d27d606b71ff0f78e84efe1deef2653f016 (diff)
parent5f415d4585134612bc24e9a823289fee35541a01 (diff)
Merge branch 'origin' of https://github.com/CVC4/CVC4.git
Conflicts: src/options/quantifiers_options
Diffstat (limited to 'src/theory/arrays')
-rw-r--r--src/theory/arrays/array_proof_reconstruction.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/theory/arrays/array_proof_reconstruction.cpp b/src/theory/arrays/array_proof_reconstruction.cpp
index 8dd7fe782..5ecccdd53 100644
--- a/src/theory/arrays/array_proof_reconstruction.cpp
+++ b/src/theory/arrays/array_proof_reconstruction.cpp
@@ -107,7 +107,14 @@ void ArrayProofReconstruction::notify(unsigned reasonType, Node reason, Node a,
// It could be that the guard condition is a constant disequality. In this case,
// we need to change it to a different format.
- if (childProof->d_id == theory::eq::MERGED_THROUGH_CONSTANTS) {
+ bool haveNegChild = false;
+ for (unsigned i = 0; i < childProof->d_children.size(); ++i) {
+ if (childProof->d_children[i]->d_node.getKind() == kind::NOT)
+ haveNegChild = true;
+ }
+
+ if ((childProof->d_children.size() != 0) &&
+ (childProof->d_id == theory::eq::MERGED_THROUGH_CONSTANTS || !haveNegChild)) {
// The proof has two children, explaining why each index is a (different) constant.
Assert(childProof->d_children.size() == 2);
@@ -117,7 +124,7 @@ void ArrayProofReconstruction::notify(unsigned reasonType, Node reason, Node a,
if (childProof->d_children[0]->d_id == theory::eq::MERGED_THROUGH_REFLEXIVITY) {
constantOne = childProof->d_children[0]->d_node;
} else {
- Assert(childProof->d_children[0]->d_id == theory::eq::MERGED_THROUGH_EQUALITY);
+ Assert(childProof->d_children[0]->d_node.getKind() == kind::EQUAL);
if ((childProof->d_children[0]->d_node[0] == indexOne) ||
(childProof->d_children[0]->d_node[0] == indexTwo)) {
constantOne = childProof->d_children[0]->d_node[1];
@@ -129,7 +136,7 @@ void ArrayProofReconstruction::notify(unsigned reasonType, Node reason, Node a,
if (childProof->d_children[1]->d_id == theory::eq::MERGED_THROUGH_REFLEXIVITY) {
constantTwo = childProof->d_children[1]->d_node;
} else {
- Assert(childProof->d_children[1]->d_id == theory::eq::MERGED_THROUGH_EQUALITY);
+ Assert(childProof->d_children[1]->d_node.getKind() == kind::EQUAL);
if ((childProof->d_children[1]->d_node[0] == indexOne) ||
(childProof->d_children[1]->d_node[0] == indexTwo)) {
constantTwo = childProof->d_children[1]->d_node[1];
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback