3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-29 18:52:29 +00:00

fixed problem with nullary background constants in duality

This commit is contained in:
Ken McMillan 2013-06-10 14:46:15 -07:00
parent c21cd6ffa5
commit 30a4627a1e
2 changed files with 42 additions and 8 deletions

View file

@ -79,10 +79,6 @@ namespace Duality {
int CumulativeDecisions();
Term SubstBoundRec(hash_map<int,hash_map<ast,Term> > &memo, hash_map<int,Term> &subst, int level, const Term &t);
Term SubstBound(hash_map<int,Term> &subst, const Term &t);
private:
void SummarizeRec(hash_set<ast> &memo, std::vector<expr> &lits, int &ops, const Term &t);
@ -162,6 +158,12 @@ namespace Duality {
bool weak = false
) = 0;
/** Declare a constant in the background theory. */
virtual void declare_constant(const func_decl &f) = 0;
/** Is this a background constant? */
virtual bool is_constant(const func_decl &f) = 0;
/** Assert a background axiom. */
virtual void assert_axiom(const expr &axiom) = 0;
@ -224,10 +226,24 @@ namespace Duality {
islvr->write_interpolation_problem(file_name,assumptions,theory);
#endif
}
/** Declare a constant in the background theory. */
virtual void declare_constant(const func_decl &f){
bckg.insert(f);
}
/** Is this a background constant? */
virtual bool is_constant(const func_decl &f){
return bckg.find(f) != bckg.end();
}
~iZ3LogicSolver(){
// delete ictx;
delete islvr;
}
private:
hash_set<func_decl> bckg;
};
#if 0
@ -478,6 +494,10 @@ namespace Duality {
void AssertNode(Node *n);
/** Declare a constant in the background theory. */
void DeclareConstant(const FuncDecl &f);
/** Assert a background axiom. Background axioms can be used to provide the
* theory of auxilliary functions or relations. All symbols appearing in
* background axioms are considered global, and may appear in both transformer
@ -771,6 +791,12 @@ namespace Duality {
void GetLabelsRec(hash_map<ast,int> &memo, const Term &f, std::vector<symbol> &labels,
hash_set<ast> *done, bool truth);
Term SubstBoundRec(hash_map<int,hash_map<ast,Term> > &memo, hash_map<int,Term> &subst, int level, const Term &t);
Term SubstBound(hash_map<int,Term> &subst, const Term &t);
};
/** RPFP solver base class. */