mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
patch UNSAT to UNKNOWN in cmd_context for theory_str
This commit is contained in:
parent
d3062a8eff
commit
2b8f165cc4
2 changed files with 22 additions and 0 deletions
|
@ -37,6 +37,7 @@ Revision History:
|
|||
#include"model_pp.h"
|
||||
#include"ast_smt2_pp.h"
|
||||
#include"ast_translation.h"
|
||||
#include"theory_str.h"
|
||||
|
||||
namespace smt {
|
||||
|
||||
|
@ -3086,6 +3087,25 @@ namespace smt {
|
|||
if (r == l_true && get_cancel_flag()) {
|
||||
r = l_undef;
|
||||
}
|
||||
|
||||
// PATCH for theory_str:
|
||||
// UNSAT + overlapping variables => UNKNOWN
|
||||
if (r == l_false) {
|
||||
ptr_vector<theory>::iterator it = m_theory_set.begin();
|
||||
ptr_vector<theory>::iterator end = m_theory_set.end();
|
||||
for (; it != end; ++it) {
|
||||
theory * th = *it;
|
||||
if (strcmp(th->get_name(), "strings") == 0) {
|
||||
theory_str * str = (theory_str*)th;
|
||||
if (str->overlapping_variables_detected()) {
|
||||
TRACE("t_str", tout << "WARNING: overlapping variables detected, UNSAT changed to UNKNOWN!" << std::endl;);
|
||||
r = l_undef;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue