mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
relaxing condition for assumptions, add theory-assumption to skolem functions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
e02392c0e3
commit
3ae722025f
|
@ -3115,11 +3115,18 @@ namespace smt {
|
|||
}
|
||||
|
||||
bool is_valid_assumption(ast_manager & m, expr * assumption) {
|
||||
expr* arg;
|
||||
if (!m.is_bool(assumption))
|
||||
return false;
|
||||
if (is_uninterp_const(assumption))
|
||||
return true;
|
||||
if (m.is_not(assumption) && is_uninterp_const(to_app(assumption)->get_arg(0)))
|
||||
if (m.is_not(assumption, arg) && is_uninterp_const(arg))
|
||||
return true;
|
||||
if (!is_app(assumption))
|
||||
return false;
|
||||
if (to_app(assumption)->get_num_args() == 0)
|
||||
return true;
|
||||
if (m.is_not(assumption, arg) && is_app(arg) && to_app(arg)->get_num_args() == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -7351,10 +7351,10 @@ namespace smt {
|
|||
|
||||
void theory_str::add_theory_assumptions(expr_ref_vector & assumptions) {
|
||||
TRACE("str", tout << "add overlap assumption for theory_str" << std::endl;);
|
||||
symbol strOverlap("!!TheoryStrOverlapAssumption!!");
|
||||
char* strOverlap = "!!TheoryStrOverlapAssumption!!";
|
||||
seq_util m_sequtil(get_manager());
|
||||
sort * s = get_manager().mk_bool_sort();
|
||||
m_theoryStrOverlapAssumption_term = expr_ref(get_manager().mk_const(strOverlap, s), get_manager());
|
||||
m_theoryStrOverlapAssumption_term = expr_ref(mk_fresh_const(strOverlap, s), get_manager());
|
||||
assumptions.push_back(get_manager().mk_not(m_theoryStrOverlapAssumption_term));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue