3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00
This commit is contained in:
Christoph M. Wintersteiger 2015-05-19 11:01:15 +01:00
parent 25f37c8a0c
commit 32fb679066
17 changed files with 141 additions and 142 deletions

View file

@ -292,14 +292,14 @@ bool iz3base::is_sat(const std::vector<ast> &q, ast &_proof, std::vector<ast> &v
void iz3base::find_children(const stl_ext::hash_set<ast> &cnsts_set,
const ast &tree,
std::vector<ast> &cnsts,
std::vector<int> &parents,
std::vector<ast> &conjuncts,
std::vector<int> &children,
std::vector<int> &pos_map,
bool merge
){
const ast &tree,
std::vector<ast> &cnsts,
std::vector<int> &parents,
std::vector<ast> &conjuncts,
std::vector<int> &children,
std::vector<int> &pos_map,
bool merge
){
std::vector<int> my_children;
std::vector<ast> my_conjuncts;
if(op(tree) == Interp){ // if we've hit an interpolation position...
@ -336,13 +336,13 @@ void iz3base::find_children(const stl_ext::hash_set<ast> &cnsts_set,
}
void iz3base::to_parents_vec_representation(const std::vector<ast> &_cnsts,
const ast &tree,
std::vector<ast> &cnsts,
std::vector<int> &parents,
std::vector<ast> &theory,
std::vector<int> &pos_map,
bool merge
){
const ast &tree,
std::vector<ast> &cnsts,
std::vector<int> &parents,
std::vector<ast> &theory,
std::vector<int> &pos_map,
bool merge
){
std::vector<int> my_children;
std::vector<ast> my_conjuncts;
hash_set<ast> cnsts_set;

View file

@ -144,7 +144,7 @@ struct iz3checker : iz3base {
hash_set<ast> tmemo;
for(unsigned j = 0; j < theory.size(); j++)
support(theory[j],common,tmemo); // all theory symbols allowed in interps
}
}
hash_set<ast> memo;
support(itp[i],Isup,memo);
std::set_difference(Isup.begin(),Isup.end(),common.begin(),common.end(),std::inserter(bad,bad.begin()));
@ -192,35 +192,35 @@ std::vector<T> to_std_vector(const ::vector<T> &v){
bool iz3check(ast_manager &_m_manager,
solver *s,
std::ostream &err,
const ptr_vector<ast> &cnsts,
const ::vector<int> &parents,
const ptr_vector<ast> &interps,
const ptr_vector<ast> &theory)
solver *s,
std::ostream &err,
const ptr_vector<ast> &cnsts,
const ::vector<int> &parents,
const ptr_vector<ast> &interps,
const ptr_vector<ast> &theory)
{
iz3checker chk(_m_manager);
return chk.check(s,err,chk.cook(cnsts),to_std_vector(parents),chk.cook(interps),chk.cook(theory));
}
bool iz3check(iz3mgr &mgr,
solver *s,
std::ostream &err,
const std::vector<iz3mgr::ast> &cnsts,
const std::vector<int> &parents,
const std::vector<iz3mgr::ast> &interps,
const std::vector<iz3mgr::ast> &theory)
solver *s,
std::ostream &err,
const std::vector<iz3mgr::ast> &cnsts,
const std::vector<int> &parents,
const std::vector<iz3mgr::ast> &interps,
const std::vector<iz3mgr::ast> &theory)
{
iz3checker chk(mgr);
return chk.check(s,err,cnsts,parents,interps,theory);
}
bool iz3check(ast_manager &_m_manager,
solver *s,
std::ostream &err,
const ptr_vector<ast> &_cnsts,
ast *tree,
const ptr_vector<ast> &interps)
solver *s,
std::ostream &err,
const ptr_vector<ast> &_cnsts,
ast *tree,
const ptr_vector<ast> &interps)
{
iz3checker chk(_m_manager);
return chk.check(s,err,chk.cook(_cnsts),chk.cook(tree),chk.cook(interps));

View file

@ -252,7 +252,7 @@ public:
// create a secondary prover
iz3secondary *sp = iz3foci::create(this,num,parents_vec.empty()?0:&parents_vec[0]);
sp_killer.set(sp); // kill this on exit
#define BINARY_INTERPOLATION
#ifndef BINARY_INTERPOLATION
// create a translator
@ -420,12 +420,12 @@ public:
void iz3interpolate(ast_manager &_m_manager,
ast *proof,
const ptr_vector<ast> &cnsts,
const ::vector<int> &parents,
ptr_vector<ast> &interps,
const ptr_vector<ast> &theory,
interpolation_options_struct * options)
ast *proof,
const ptr_vector<ast> &cnsts,
const ::vector<int> &parents,
ptr_vector<ast> &interps,
const ptr_vector<ast> &theory,
interpolation_options_struct * options)
{
iz3interp itp(_m_manager);
if(options)
@ -448,12 +448,12 @@ void iz3interpolate(ast_manager &_m_manager,
}
void iz3interpolate(ast_manager &_m_manager,
ast *proof,
const ::vector<ptr_vector<ast> > &cnsts,
const ::vector<int> &parents,
ptr_vector<ast> &interps,
const ptr_vector<ast> &theory,
interpolation_options_struct * options)
ast *proof,
const ::vector<ptr_vector<ast> > &cnsts,
const ::vector<int> &parents,
ptr_vector<ast> &interps,
const ptr_vector<ast> &theory,
interpolation_options_struct * options)
{
iz3interp itp(_m_manager);
if(options)
@ -477,11 +477,11 @@ void iz3interpolate(ast_manager &_m_manager,
}
void iz3interpolate(ast_manager &_m_manager,
ast *proof,
const ptr_vector<ast> &cnsts,
ast *tree,
ptr_vector<ast> &interps,
interpolation_options_struct * options)
ast *proof,
const ptr_vector<ast> &cnsts,
ast *tree,
ptr_vector<ast> &interps,
interpolation_options_struct * options)
{
iz3interp itp(_m_manager);
if(options)
@ -506,12 +506,12 @@ void iz3interpolate(ast_manager &_m_manager,
}
lbool iz3interpolate(ast_manager &_m_manager,
solver &s,
ast *tree,
ptr_vector<ast> &cnsts,
ptr_vector<ast> &interps,
model_ref &m,
interpolation_options_struct * options)
solver &s,
ast *tree,
ptr_vector<ast> &cnsts,
ptr_vector<ast> &interps,
model_ref &m,
interpolation_options_struct * options)
{
iz3interp itp(_m_manager);
if(options)

View file

@ -107,9 +107,9 @@ public:
};
void iz3pp(ast_manager &m,
const ptr_vector<expr> &cnsts_vec,
expr *tree,
std::ostream& out) {
const ptr_vector<expr> &cnsts_vec,
expr *tree,
std::ostream& out) {
unsigned sz = cnsts_vec.size();
expr* const* cnsts = &cnsts_vec[0];

View file

@ -778,7 +778,7 @@ class iz3proof_itp_impl : public iz3proof_itp {
sum_cond_ineq(ineq2,make_int("1"),yleqx,Aproves2,Bproves2);
ast Bcond = my_implies(Bproves1,my_and(Aproves1,z3_simplify(ineq2)));
// if(!is_true(Aproves1) || !is_true(Bproves1))
// std::cout << "foo!\n";;
// std::cout << "foo!\n";;
if(y == make_int(rational(0)) && op(x) == Plus && num_args(x) == 2){
if(get_term_type(arg(x,0)) == LitA){
ast iter = z3_simplify(make(Plus,arg(x,0),get_ineq_rhs(xleqy)));
@ -915,7 +915,7 @@ class iz3proof_itp_impl : public iz3proof_itp {
int ipos = pos.get_unsigned();
ast cond = mk_true();
ast equa = sep_cond(arg(pf,0),cond);
#if 0
#if 0
if(op(equa) == Equal){
ast pe = mk_not(neg_equality);
ast lhs = subst_in_arg_pos(ipos,arg(equa,0),arg(pe,0));
@ -2784,7 +2784,7 @@ class iz3proof_itp_impl : public iz3proof_itp {
}
else if(o == Plus || o == Times){ // don't want bound variables inside arith ops
// std::cout << "WARNING: non-local arithmetic\n";
// frng = erng; // this term will be localized
// frng = erng; // this term will be localized
}
else if(o == Select){ // treat the array term like a function symbol
prover::range srng = pv->ast_scope(arg(e,0));
@ -2805,7 +2805,7 @@ class iz3proof_itp_impl : public iz3proof_itp {
pfs.push_back(argpf);
}
}
e = clone(e,largs);
if(pfs.size())
pf = make_congruence(eqs,make_equiv(e,orig_e),pfs);

View file

@ -97,7 +97,7 @@ namespace std {
template <> inline
size_t stdext::hash_value<scopes::range_lo >(const scopes::range_lo& p)
{
{
std::hash<scopes::range_lo> h;
return h(p);
}
@ -133,7 +133,7 @@ namespace std {
template <> inline
size_t stdext::hash_value<range_op >(const range_op& p)
{
{
std::hash<range_op> h;
return h(p);
}

View file

@ -274,7 +274,7 @@ public:
ast neglit = mk_not(arg(con,i));
res.erase(neglit);
}
}
}
}
}
#if 0
@ -612,7 +612,7 @@ public:
rng = range_glb(rng,ast_scope(lit));
}
if(range_is_empty(rng)) return -1;
int hi = range_max(rng);
int hi = range_max(rng);
if(hi >= frames) return frames - 1;
return hi;
}
@ -2003,10 +2003,10 @@ public:
}
iz3translation_full(iz3mgr &mgr,
iz3secondary *_secondary,
iz3secondary *_secondary,
const std::vector<std::vector<ast> > &cnsts,
const std::vector<int> &parents,
const std::vector<ast> &theory)
const std::vector<int> &parents,
const std::vector<ast> &theory)
: iz3translation(mgr, cnsts, parents, theory)
{
frames = cnsts.size();
@ -2027,10 +2027,10 @@ public:
#ifdef IZ3_TRANSLATE_FULL
iz3translation *iz3translation::create(iz3mgr &mgr,
iz3secondary *secondary,
const std::vector<std::vector<ast> > &cnsts,
const std::vector<int> &parents,
const std::vector<ast> &theory){
iz3secondary *secondary,
const std::vector<std::vector<ast> > &cnsts,
const std::vector<int> &parents,
const std::vector<ast> &theory){
return new iz3translation_full(mgr,secondary,cnsts,parents,theory);
}

View file

@ -293,7 +293,7 @@ public:
ast neglit = mk_not(arg(con,i));
res.erase(neglit);
}
}
}
}
}
#if 0
@ -589,7 +589,7 @@ public:
rng = range_glb(rng,ast_scope(lit));
}
if(range_is_empty(rng)) return -1;
int hi = range_max(rng);
int hi = range_max(rng);
if(hi >= frames) return frames - 1;
return hi;
}
@ -881,7 +881,7 @@ public:
|| dk == PR_QUANT_INST
//|| dk == PR_UNIT_RESOLUTION
//|| dk == PR_LEMMA
)
)
return false;
if(dk == PR_HYPOTHESIS && hyps.find(con) != hyps.end())
; //std::cout << "blif!\n";
@ -1481,7 +1481,7 @@ public:
AstSet dummy;
collect_resolvent_lits(nll->proofs[i],dummy,reslits);
litset.insert(reslits.begin(),reslits.end());
}
}
}
if(to_keep.size() == nll->proofs.size()) return nll;
ResolventAppSet new_proofs;