mirror of
https://github.com/Z3Prover/z3
synced 2025-06-04 05:11:21 +00:00
prevent creating some useless solvers in duality
This commit is contained in:
parent
e8985ff33d
commit
bbdc8b33e0
2 changed files with 21 additions and 29 deletions
|
@ -802,6 +802,15 @@ namespace Duality {
|
||||||
annot.Simplify();
|
annot.Simplify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NodeSolutionFromIndSetFull(Node *node){
|
||||||
|
std::vector<Node *> &insts = insts_of_node[node];
|
||||||
|
for(unsigned j = 0; j < insts.size(); j++)
|
||||||
|
if(indset->Contains(insts[j]))
|
||||||
|
if(insts[j]->Annotation.IsFull())
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool recursionBounded;
|
bool recursionBounded;
|
||||||
|
|
||||||
/** See if the solution might be bounded. */
|
/** See if the solution might be bounded. */
|
||||||
|
@ -1453,16 +1462,18 @@ namespace Duality {
|
||||||
slvr.pop(1);
|
slvr.pop(1);
|
||||||
delete checker;
|
delete checker;
|
||||||
#else
|
#else
|
||||||
RPFP_caching::scoped_solver_for_edge ssfe(gen_cands_rpfp,edge,true /* models */, true /*axioms*/);
|
if(!NodeSolutionFromIndSetFull(edge->Parent)){
|
||||||
gen_cands_rpfp->Push();
|
RPFP_caching::scoped_solver_for_edge ssfe(gen_cands_rpfp,edge,true /* models */, true /*axioms*/);
|
||||||
Node *root = CheckerForEdgeClone(edge,gen_cands_rpfp);
|
gen_cands_rpfp->Push();
|
||||||
if(gen_cands_rpfp->Check(root) != unsat){
|
Node *root = CheckerForEdgeClone(edge,gen_cands_rpfp);
|
||||||
Candidate candidate;
|
if(gen_cands_rpfp->Check(root) != unsat){
|
||||||
ExtractCandidateFromCex(edge,gen_cands_rpfp,root,candidate);
|
Candidate candidate;
|
||||||
reporter->InductionFailure(edge,candidate.Children);
|
ExtractCandidateFromCex(edge,gen_cands_rpfp,root,candidate);
|
||||||
candidates.push_back(candidate);
|
reporter->InductionFailure(edge,candidate.Children);
|
||||||
|
candidates.push_back(candidate);
|
||||||
|
}
|
||||||
|
gen_cands_rpfp->Pop(1);
|
||||||
}
|
}
|
||||||
gen_cands_rpfp->Pop(1);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
updated_nodes.clear();
|
updated_nodes.clear();
|
||||||
|
|
|
@ -158,26 +158,7 @@ lbool dl_interface::query(::expr * query) {
|
||||||
vector<unsigned> bounds;
|
vector<unsigned> bounds;
|
||||||
// m_ctx.get_rules_as_formulas(rules, names);
|
// m_ctx.get_rules_as_formulas(rules, names);
|
||||||
|
|
||||||
expr_ref query_ref(m_ctx.get_manager());
|
m_ctx.get_raw_rule_formulas(rules, names, bounds);
|
||||||
if(****){
|
|
||||||
m_ctx.flush_add_rules();
|
|
||||||
datalog::rule_manager& rm = m_ctx.get_rule_manager();
|
|
||||||
rm.mk_query(query, m_ctx.get_rules());
|
|
||||||
apply_default_transformation(m_ctx);
|
|
||||||
rule_set &rs = m_ctx.get_rules();
|
|
||||||
if(m_ctx.get_rules().get_output_predicates().empty())
|
|
||||||
query_ref = m_ctx.get_manager().mk_true();
|
|
||||||
else {
|
|
||||||
query_pred = m_ctx.get_rules().get_output_predicate();
|
|
||||||
func_decl_ref query_pred(m_ctx.get_manager());
|
|
||||||
query_pred = m_ctx.get_rules().get_output_predicate();
|
|
||||||
ptr_vector<sort> sorts;
|
|
||||||
unsi
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
m_ctx.get_raw_rule_formulas(rules, names, bounds);
|
|
||||||
|
|
||||||
// get all the rules as clauses
|
// get all the rules as clauses
|
||||||
std::vector<expr> &clauses = _d->clauses;
|
std::vector<expr> &clauses = _d->clauses;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue