summaryrefslogtreecommitdiff
path: root/src/theory/arrays/theory_arrays.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-08-21 17:53:46 -0500
committerGitHub <noreply@github.com>2020-08-21 15:53:46 -0700
commit9ea213066b989a8154b1ebd40ebea3bc7e18c42d (patch)
treec4179264e0f6407d161fc1187a6e2d0c3110a278 /src/theory/arrays/theory_arrays.cpp
parent05c6ae0bda064083efb7941e1ceb0869cb1b1090 (diff)
Limit trigger terms to shared terms in arrays (#4932)
There is a non-standard use of trigger terms in the array theory via `EqualityEngine::addTriggerTerm`. Trigger terms are only supposed to be shared terms, and are added to the equality engine for the sake of propagating equalities between shared terms. The array theory does two non-standard things: (1) it registers (possibly) non-shared terms as triggers in its `preRegisterInternal` method, (2) it filters propagations between anything except non-shared arrays in its `eqNotifyTriggerTermEquality` method. The latter is only necessary because of the former. It is unnecessary to do *either* of these things. Instead, the array theory should simply add the terms to the equality engine (as non-triggers) during preRegisterInternal. Note that it additionally correctly adds trigger terms in its `notifySharedTerm` method. With this commit, the array theory uses the equality engine (wrt propagation) in a standard way.
Diffstat (limited to 'src/theory/arrays/theory_arrays.cpp')
-rw-r--r--src/theory/arrays/theory_arrays.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/theory/arrays/theory_arrays.cpp b/src/theory/arrays/theory_arrays.cpp
index d659aff11..34c4fd156 100644
--- a/src/theory/arrays/theory_arrays.cpp
+++ b/src/theory/arrays/theory_arrays.cpp
@@ -721,7 +721,7 @@ void TheoryArrays::preRegisterTermInternal(TNode node)
if (node.getType().isArray())
{
d_mayEqualEqualityEngine.addTerm(node);
- d_equalityEngine->addTriggerTerm(node, THEORY_ARRAYS);
+ d_equalityEngine->addTerm(node);
}
else
{
@@ -765,7 +765,7 @@ void TheoryArrays::preRegisterTermInternal(TNode node)
{
break;
}
- d_equalityEngine->addTriggerTerm(node, THEORY_ARRAYS);
+ d_equalityEngine->addTerm(node);
TNode a = d_equalityEngine->getRepresentative(node[0]);
@@ -828,7 +828,7 @@ void TheoryArrays::preRegisterTermInternal(TNode node)
d_infoMap.setConstArr(node, node);
d_mayEqualEqualityEngine.addTerm(node);
Assert(d_mayEqualEqualityEngine.getRepresentative(node) == node);
- d_equalityEngine->addTriggerTerm(node, THEORY_ARRAYS);
+ d_equalityEngine->addTerm(node);
d_defValues[node] = defaultValue;
break;
}
@@ -837,7 +837,7 @@ void TheoryArrays::preRegisterTermInternal(TNode node)
if (node.getType().isArray()) {
// The may equal needs the node
d_mayEqualEqualityEngine.addTerm(node);
- d_equalityEngine->addTriggerTerm(node, THEORY_ARRAYS);
+ d_equalityEngine->addTerm(node);
Assert(d_equalityEngine->getSize(node) == 1);
}
else {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback