Move (optional) rewrite from TrustSubstitutionMap to SubstitutionMap. (#5992)
authorGereon Kremer <gereon.kremer@cs.rwth-aachen.de>
Thu, 25 Feb 2021 23:46:17 +0000 (00:46 +0100)
committerGitHub <noreply@github.com>
Thu, 25 Feb 2021 23:46:17 +0000 (00:46 +0100)
commit1c7ed68156cb3cf19ef036cbbfff18bcc4e45c36
treee7e5a8daf5a07174a3c7180e437d711ea243bba1
parentac30758787c01f532774501a06b5cbdc713074dd
Move (optional) rewrite from TrustSubstitutionMap to SubstitutionMap. (#5992)

This PR adds optional rewriting to the SubstitutionMap class. Before, only the new TrustSubstitutionMap added optional rewriting, leading to unexpected inconsistencies between the two. In particular, cases exist where the substitution and the rewriting cancel each other (see #5943).
This PR moves the optional rewriting from TrustSubstitutionMap into SubstitutionMap. While the former enables it by default, it is disabled by default for the latter and thus does not change current behavior.
We now use this new option in an assertion in the non-clausal simplification.
Fixes #5943.
src/preprocessing/passes/non_clausal_simp.cpp
src/theory/substitutions.cpp
src/theory/substitutions.h
src/theory/trust_substitutions.cpp
test/regress/CMakeLists.txt
test/regress/regress0/preprocess/issue5943-non-clausal-simp.smt2 [new file with mode: 0644]