mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
local changes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
c61e9f27db
17 changed files with 254 additions and 123 deletions
|
@ -778,6 +778,8 @@ int iz3mgr::occurs_in(ast var, ast e){
|
|||
|
||||
|
||||
bool iz3mgr::solve_arith(const ast &v, const ast &x, const ast &y, ast &res){
|
||||
if(occurs_in(v,y))
|
||||
return false;
|
||||
if(op(x) == Plus){
|
||||
int n = num_args(x);
|
||||
for(int i = 0; i < n; i++){
|
||||
|
@ -801,8 +803,8 @@ iz3mgr::ast iz3mgr::cont_eq(stl_ext::hash_set<ast> &cont_eq_memo, bool truth, as
|
|||
return ast();
|
||||
cont_eq_memo.insert(e);
|
||||
if(!truth && op(e) == Equal){
|
||||
if(arg(e,0) == v) return(arg(e,1));
|
||||
if(arg(e,1) == v) return(arg(e,0));
|
||||
if(arg(e,0) == v && !occurs_in(v,arg(e,1))) return(arg(e,1));
|
||||
if(arg(e,1) == v && !occurs_in(v,arg(e,0))) return(arg(e,0));
|
||||
ast res;
|
||||
if(solve_arith(v,arg(e,0),arg(e,1),res)) return res;
|
||||
if(solve_arith(v,arg(e,1),arg(e,0),res)) return res;
|
||||
|
|
|
@ -278,7 +278,8 @@ class iz3mgr {
|
|||
}
|
||||
|
||||
symb sym(ast t){
|
||||
return to_app(t.raw())->get_decl();
|
||||
raw_ast *_ast = t.raw();
|
||||
return is_app(_ast) ? to_app(_ast)->get_decl() : 0;
|
||||
}
|
||||
|
||||
std::string string_of_symbol(symb s){
|
||||
|
|
|
@ -1027,7 +1027,7 @@ class iz3proof_itp_impl : public iz3proof_itp {
|
|||
linear_comb(Aineqs,coeff,make(Leq,make_int(rational(0)),make(Sub,term2,term1)));
|
||||
}
|
||||
else {
|
||||
ast pf = extract_rewrites(make(concat,mk_true(),rest),p1);
|
||||
ast pf = extract_rewrites(make(concat,mk_true(),last),p1);
|
||||
ast new_normal = fix_normal(term1,term2,pf);
|
||||
normals = merge_normal_chains(normals,cons_normal(new_normal,mk_true()), Aproves, Bproves);
|
||||
}
|
||||
|
@ -2747,7 +2747,8 @@ class iz3proof_itp_impl : public iz3proof_itp {
|
|||
ast orig_e = e;
|
||||
pf = make_refl(e); // proof that e = e
|
||||
|
||||
prover::range erng = pv->ast_scope(e);
|
||||
// prover::range erng =
|
||||
pv->ast_scope(e);
|
||||
#if 0
|
||||
if(!(erng.lo > erng.hi) && pv->ranges_intersect(pv->ast_scope(e),rng)){
|
||||
return e; // this term occurs in range, so it's O.K.
|
||||
|
|
|
@ -1712,11 +1712,17 @@ public:
|
|||
std::cout << "foo!\n";
|
||||
|
||||
// no idea why this shows up
|
||||
if(dk == PR_MODUS_PONENS_OEQ)
|
||||
if(dk == PR_MODUS_PONENS_OEQ){
|
||||
if(conc(prem(proof,0)) == con){
|
||||
res = translate_main(prem(proof,0),expect_clause);
|
||||
return res;
|
||||
}
|
||||
if(expect_clause && op(con) == Or){ // skolemization does this
|
||||
Iproof::node clause = translate_main(prem(proof,0),true);
|
||||
res = RewriteClause(clause,prem(proof,1));
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(1 && dk == PR_TRANSITIVITY && pr(prem(proof,1)) == PR_COMMUTATIVITY){
|
||||
|
@ -1800,7 +1806,9 @@ public:
|
|||
}
|
||||
break;
|
||||
}
|
||||
case PR_MONOTONICITY: {
|
||||
case PR_QUANT_INTRO:
|
||||
case PR_MONOTONICITY:
|
||||
{
|
||||
std::vector<ast> eqs; eqs.resize(args.size());
|
||||
for(unsigned i = 0; i < args.size(); i++)
|
||||
eqs[i] = conc(prem(proof,i));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue