diff options
author | Clark Barrett <barrett@cs.nyu.edu> | 2012-11-13 02:28:05 +0000 |
---|---|---|
committer | Clark Barrett <barrett@cs.nyu.edu> | 2012-11-13 02:28:05 +0000 |
commit | c1ddfb10d4e8ed7ae1738647a67d28edb4ccdb55 (patch) | |
tree | 564cc5063b761186b32baa7a3bc70232b7d7733e /src/theory/arrays | |
parent | ea00241d1636fdf599a8f723d86742db1b7b6dd1 (diff) |
Fixed an array rewriting bug found by fuzzer
Diffstat (limited to 'src/theory/arrays')
-rw-r--r-- | src/theory/arrays/theory_arrays_rewriter.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/theory/arrays/theory_arrays_rewriter.h b/src/theory/arrays/theory_arrays_rewriter.h index dbbfd04dd..62782f90e 100644 --- a/src/theory/arrays/theory_arrays_rewriter.h +++ b/src/theory/arrays/theory_arrays_rewriter.h @@ -344,7 +344,14 @@ public: elements.push_back(store[2]); store = store[0]; } - n = nm->mkNode(kind::STORE, store, index, value); + if (value.getKind() == kind::SELECT && + value[0] == store && + value[1] == index) { + n = store; + } + else { + n = nm->mkNode(kind::STORE, store, index, value); + } while (!indices.empty()) { n = nm->mkNode(kind::STORE, n, indices.back(), elements.back()); indices.pop_back(); |