-
Notifications
You must be signed in to change notification settings - Fork 1
/
mathsat_interface.h
61 lines (58 loc) · 1.68 KB
/
mathsat_interface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#include <mathsat.h>
#include <vector>
#include <string>
#include <map>
class IMathSAT {
msat_config cfg;
msat_env env;
public:
typedef msat_term term;
typedef msat_type type;
typedef msat_decl decl;
typedef int interp_group;
class model_iterator;
IMathSAT(const char* logic, bool interpolation=true);
~IMathSAT();
type bool_type();
type int_type();
term error_term();
bool is_error_term(term t);
decl make_decl(const std::string& name,type tp);
term make_var(decl d);
term make_eq(const std::vector<term>& args);
term make_true();
term make_false();
term make_and(const std::vector<term>& args);
term make_or(const std::vector<term>& args);
term make_implication(const std::vector<term>& args);
term make_not(term t);
term make_ite(term c,term t,term f);
term make_number(std::string& str);
term make_lt(term t1,term t2);
term make_leq(term t1,term t2);
term make_gt(term t1,term t2);
term make_geq(term t1,term t2);
term make_plus(const std::vector<term>& args);
term make_times(term t1,term t2);
term make_minus(term t1,term t2);
std::string term_to_string(term t);
void assert(term t);
void push();
void pop();
bool check_sat();
interp_group create_interp_group();
void set_interp_group(interp_group grp);
term interpolate(const std::vector<interp_group>& grps);
term translate_term(term t,std::map<decl,decl>& translation);
model_iterator create_model_iterator();
class model_iterator {
msat_model_iterator it_;
public:
model_iterator(msat_model_iterator it);
~model_iterator();
bool has_next();
void next(term*t,term*v);
};
};
bool operator<(const IMathSAT::decl,const IMathSAT::decl);