summaryrefslogtreecommitdiff
path: root/src/theory/arrays
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.nyu.edu>2012-11-13 01:24:27 +0000
committerClark Barrett <barrett@cs.nyu.edu>2012-11-13 01:24:27 +0000
commit75c6e785cf9173a27c9d367f16c85e1889e245d5 (patch)
treee9ada04c349137696d62899526f8b0bb9ee17f71 /src/theory/arrays
parent79b80442e5df070fe838de3fe4c09b235f6bddf5 (diff)
Fixed bug in array constant normalization found by fuzzer.
Diffstat (limited to 'src/theory/arrays')
-rw-r--r--src/theory/arrays/theory_arrays_rewriter.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/theory/arrays/theory_arrays_rewriter.h b/src/theory/arrays/theory_arrays_rewriter.h
index f2632c739..dbbfd04dd 100644
--- a/src/theory/arrays/theory_arrays_rewriter.h
+++ b/src/theory/arrays/theory_arrays_rewriter.h
@@ -94,6 +94,7 @@ class TheoryArraysRewriter {
// replaced, we can just return node[0]
return node[0];
}
+ // else rebuild the store without the replaced write and then exit
}
else {
n = nm->mkNode(kind::STORE, n, index, value);
@@ -106,6 +107,11 @@ class TheoryArraysRewriter {
elements.pop_back();
}
+ // Ready to exit if write was to the default value (see previous comment)
+ if (value == defaultValue) {
+ return n;
+ }
+
Cardinality indexCard = index.getType().getCardinality();
if (indexCard.isInfinite()) {
return n;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback