Skip to content

Fix SPLIT_EQ_STRIP_R/SPLIT_EQ_STRIP_L rewrites#6550

Merged
4tXJ7f merged 2 commits intocvc5:masterfrom
4tXJ7f:fix6520
May 17, 2021
Merged

Fix SPLIT_EQ_STRIP_R/SPLIT_EQ_STRIP_L rewrites#6550
4tXJ7f merged 2 commits intocvc5:masterfrom
4tXJ7f:fix6520

Conversation

@4tXJ7f
Copy link
Copy Markdown
Member

@4tXJ7f 4tXJ7f commented May 17, 2021

Fixes #6520. The SPLIT_EQ_STRIP_R/SPLIT_EQ_STRIP_L rewrites were
applied too aggressively. Those rewrites attempt to rewrite string
equalities between concatenations where the prefix on one side is
provably shorter than the prefix on the other side. The length of the
shorter prefix is then stripped from the longer prefix. However, cvc5
was not checking whether it was able to strip the length of the full
prefix. If cvc5 cannot strip the full length of the shorter prefix, then
the rewrite does not apply because parts of the shorter prefix would
have to be kept. This commit adds an additional condition that checks
whether the length of the full prefix was stripped.

Fixes cvc5#6520. The `SPLIT_EQ_STRIP_R`/`SPLIT_EQ_STRIP_L` rewrites were
applied too aggressively. Those rewrites attempt to rewrite string
equalities between concatenations where the prefix on one side is
provably shorter than the prefix on the other side. The length of the
shorter prefix is then stripped from the longer prefix. However, cvc5
was not checking whether it was able to strip the length of the full
prefix. If cvc5 cannot strip the full length of the shorter prefix, then
the rewrite does not apply because parts of the shorter prefix would
have to be kept. This commit adds an additional condition that checks
whether the length of the full prefix was stripped.
@4tXJ7f 4tXJ7f added major Priority simple Complexity labels May 17, 2021
@4tXJ7f 4tXJ7f requested a review from ajreynol May 17, 2021 17:57
@4tXJ7f 4tXJ7f enabled auto-merge (squash) May 17, 2021 18:01
@4tXJ7f 4tXJ7f merged commit 59d935b into cvc5:master May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major Priority simple Complexity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(ext-rew-prep) refutation unsoundness on string formula

3 participants