Add rewrites for `seq.update`/`seq.nth` (#7966)
authorAndres Noetzli <andres.noetzli@gmail.com>
Wed, 19 Jan 2022 23:45:21 +0000 (15:45 -0800)
committerGitHub <noreply@github.com>
Wed, 19 Jan 2022 23:45:21 +0000 (23:45 +0000)
commitf2ef41253381cc4a5cd7ba1d62a9443535f8a3dd
treed4ad93ef1dca6f24cadb93c6953312e411fa42b5
parent8d9d3f84a5036a0254b00e99ebe00b5fad85b14b
Add rewrites for `seq.update`/`seq.nth` (#7966)

This commit adds rewrites for `seq.update` and `seq.nth`. It adds a
rewrite to check if an update is out of bounds and it adds rewrites to
evaluate these operators using `stripSymbolicLength()`. This allows us
for example to evaluate updates on concatenations of non-constant
`seq.unit`s.
src/theory/strings/arith_entail.cpp
src/theory/strings/rewrites.cpp
src/theory/strings/rewrites.h
src/theory/strings/sequences_rewriter.cpp
test/unit/theory/sequences_rewriter_white.cpp