mirror of
https://github.com/Z3Prover/z3
synced 2025-05-05 23:05:46 +00:00
working on smt2 and api
This commit is contained in:
parent
2b93537366
commit
78848f3ddd
30 changed files with 1307 additions and 94 deletions
|
@ -130,7 +130,7 @@ namespace std {
|
|||
class less<ast_r> {
|
||||
public:
|
||||
size_t operator()(const ast_r &s, const ast_r &t) const {
|
||||
return s.raw()->get_id() < t.raw()->get_id();
|
||||
return s.raw() < t.raw(); // s.raw()->get_id() < t.raw()->get_id();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -161,6 +161,7 @@ class iz3mgr {
|
|||
Distinct,
|
||||
Xor,
|
||||
Oeq,
|
||||
Interp,
|
||||
Leq,
|
||||
Geq,
|
||||
Lt,
|
||||
|
@ -196,7 +197,7 @@ class iz3mgr {
|
|||
Other
|
||||
};
|
||||
|
||||
opr op(ast &t);
|
||||
opr op(const ast &t);
|
||||
|
||||
unsigned ast_id(const ast &x)
|
||||
{
|
||||
|
@ -208,9 +209,9 @@ class iz3mgr {
|
|||
ast make_var(const std::string &name, type ty);
|
||||
ast make(opr op, const std::vector<ast> &args);
|
||||
ast make(opr op);
|
||||
ast make(opr op, ast &arg0);
|
||||
ast make(opr op, const ast &arg0);
|
||||
ast make(opr op, const ast &arg0, const ast &arg1);
|
||||
ast make(opr op, ast &arg0, ast &arg1, ast &arg2);
|
||||
ast make(opr op, const ast &arg0, const ast &arg1, const ast &arg2);
|
||||
ast make(symb sym, const std::vector<ast> &args);
|
||||
ast make(symb sym);
|
||||
ast make(symb sym, ast &arg0);
|
||||
|
@ -223,6 +224,13 @@ class iz3mgr {
|
|||
|
||||
ast cook(raw_ast *a) {return ast(&m_manager,a);}
|
||||
|
||||
std::vector<ast> cook(ptr_vector<raw_ast> v) {
|
||||
std::vector<ast> _v(v.size());
|
||||
for(unsigned i = 0; i < v.size(); i++)
|
||||
_v[i] = cook(v[i]);
|
||||
return _v;
|
||||
}
|
||||
|
||||
raw_ast *uncook(const ast &a) {
|
||||
m_manager.inc_ref(a.raw());
|
||||
return a.raw();
|
||||
|
@ -245,7 +253,7 @@ class iz3mgr {
|
|||
assert(0);
|
||||
}
|
||||
|
||||
ast arg(ast t, int i){
|
||||
ast arg(const ast &t, int i){
|
||||
ast_kind dk = t.raw()->get_kind();
|
||||
switch(dk){
|
||||
case AST_APP:
|
||||
|
@ -427,6 +435,8 @@ class iz3mgr {
|
|||
|
||||
void print_clause(std::ostream &s, std::vector<ast> &cls);
|
||||
|
||||
void print_sat_problem(std::ostream &out, const ast &t);
|
||||
|
||||
void show_clause(std::vector<ast> &cls);
|
||||
|
||||
static void pretty_print(std::ostream &f, const std::string &s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue