From: Andres Noetzli Date: Wed, 2 Jun 2021 13:50:51 +0000 (-0700) Subject: Make `STRINGS_CTN_DECOMPOSE` an explicit conflict (#6663) X-Git-Tag: cvc5-1.0.0~1658 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c54fe84863ce4257bd466a95ec42d7a6100d3c19;p=cvc5.git Make `STRINGS_CTN_DECOMPOSE` an explicit conflict (#6663) Fixes #6643. The STRINGS_CTN_DECOMPOSE inference is always a conflict but we sometimes sent it as an inference. To make sure that the inference manager actually recognizes the inference as a conflict, this commit ensures that the conclusion is always false and modifies the explanation accordingly. --- diff --git a/src/theory/strings/extf_solver.cpp b/src/theory/strings/extf_solver.cpp index 8b5e35023..fc8fb15b0 100644 --- a/src/theory/strings/extf_solver.cpp +++ b/src/theory/strings/extf_solver.cpp @@ -547,7 +547,9 @@ void ExtfSolver::checkExtfInference(Node n, if (d_state.areEqual(conc, d_false)) { // we are in conflict - d_im.sendInference(in.d_exp, conc, InferenceId::STRINGS_CTN_DECOMPOSE); + d_im.addToExplanation(conc, d_false, in.d_exp); + d_im.sendInference( + in.d_exp, d_false, InferenceId::STRINGS_CTN_DECOMPOSE); Assert(d_state.isInConflict()); return; } diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 3adb3ebbb..daa28580a 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -1150,6 +1150,7 @@ set(regress_0_tests regress0/strings/issue6520.smt2 regress0/strings/issue6560-indexof-reduction.smt2 regress0/strings/issue6604-re-elim.smt2 + regress0/strings/issue6643-ctn-decompose-conflict.smt2 regress0/strings/itos-entail.smt2 regress0/strings/large-model.smt2 regress0/strings/leadingzero001.smt2 diff --git a/test/regress/regress0/strings/issue6643-ctn-decompose-conflict.smt2 b/test/regress/regress0/strings/issue6643-ctn-decompose-conflict.smt2 new file mode 100644 index 000000000..41a515640 --- /dev/null +++ b/test/regress/regress0/strings/issue6643-ctn-decompose-conflict.smt2 @@ -0,0 +1,7 @@ +; COMMAND-LINE: --strings-exp +(set-logic QF_SLIA) +(declare-fun y () String) +(declare-fun z () String) +(assert (not (= (str.contains y (str.replace "A" "" z)) (str.contains y "A")))) +(set-info :status sat) +(check-sat)