Simplify handling of disequalities in strings (#8047)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Thu, 3 Feb 2022 23:48:39 +0000 (17:48 -0600)
committerGitHub <noreply@github.com>
Thu, 3 Feb 2022 23:48:39 +0000 (23:48 +0000)
commit95d2c5905a913bfe2966f7d4c99e2b9f63f6d684
tree5563b9e791296aaf41f4187834bafb61cfa4ef12
parent72bf82dade6b72cea4cb8bf86d03a7f6b875b3a9
Simplify handling of disequalities in strings (#8047)

This simplifies how string disequalities are handled, and fixes a caching bug in our implementation of extensionality.

The simplifications are two-fold:
- We track disequalities via assertions, not via an equality engine callback
- We process disequalities by iterating on the disequality list, not via iterating on pairs of equivalence classes

Extensionality is fixed by not *explaining* disequalities, which leads to being out of sync with the cache (as the disequality could have a different explanation in another SAT context).

This fixes the last known issues with `--seq-array=X`.
src/theory/strings/core_solver.cpp
src/theory/strings/theory_strings.cpp
src/theory/strings/theory_strings.h
test/regress/CMakeLists.txt
test/regress/regress0/seq/wrong-model-020322.smt2 [new file with mode: 0644]
test/regress/regress0/seq/wrong-sat-020322.smt2 [new file with mode: 0644]