3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-18 02:16:40 +00:00

prevent creating some useless solvers in duality

This commit is contained in:
Ken McMillan 2014-10-08 13:56:46 -07:00
parent e8985ff33d
commit bbdc8b33e0
2 changed files with 21 additions and 29 deletions

View file

@ -802,6 +802,15 @@ namespace Duality {
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;
/** See if the solution might be bounded. */
@ -1453,16 +1462,18 @@ namespace Duality {
slvr.pop(1);
delete checker;
#else
RPFP_caching::scoped_solver_for_edge ssfe(gen_cands_rpfp,edge,true /* models */, true /*axioms*/);
gen_cands_rpfp->Push();
Node *root = CheckerForEdgeClone(edge,gen_cands_rpfp);
if(gen_cands_rpfp->Check(root) != unsat){
Candidate candidate;
ExtractCandidateFromCex(edge,gen_cands_rpfp,root,candidate);
reporter->InductionFailure(edge,candidate.Children);
candidates.push_back(candidate);
if(!NodeSolutionFromIndSetFull(edge->Parent)){
RPFP_caching::scoped_solver_for_edge ssfe(gen_cands_rpfp,edge,true /* models */, true /*axioms*/);
gen_cands_rpfp->Push();
Node *root = CheckerForEdgeClone(edge,gen_cands_rpfp);
if(gen_cands_rpfp->Check(root) != unsat){
Candidate candidate;
ExtractCandidateFromCex(edge,gen_cands_rpfp,root,candidate);
reporter->InductionFailure(edge,candidate.Children);
candidates.push_back(candidate);
}
gen_cands_rpfp->Pop(1);
}
gen_cands_rpfp->Pop(1);
#endif
}
updated_nodes.clear();