22 #include <spot/misc/common.hh> 23 #include <spot/misc/tmpfile.hh> 27 #include <initializer_list> 80 void adjust_nvars(
int nvars);
83 void set_nassumptions_vars(
int nassumptions_vars);
86 void add(std::initializer_list<int> values);
92 int get_nb_clauses()
const;
95 int get_nb_vars()
const;
98 std::pair<int, int> stats();
103 void comment_rec(T single);
107 template<
typename T,
typename... Args>
108 void comment_rec(T first, Args... args);
113 void comment(T single);
117 template<
typename T,
typename... Args>
118 void comment(T first, Args... args);
122 void assume(
int lit);
124 typedef std::vector<bool> solution;
125 typedef std::pair<int, solution> solution_pair;
128 solution_pair get_solution();
140 picosat_get_sol(
int res);
144 satsolver_get_sol(
const char* filename);
157 std::ostream* cnf_stream_;
160 int nassumptions_vars_;
171 std::ofstream* xcnf_tmp_;
172 std::ofstream* xcnf_stream_;
177 SPOT_API std::vector<int>
178 satsolver_get_solution(
const char* filename);
188 *cnf_stream_ <<
' ' << single;
191 template<
typename T,
typename... Args>
197 *cnf_stream_ <<
' ' << first;
198 comment_rec(args...);
207 *cnf_stream_ <<
"c " << single;
210 template<
typename T,
typename... Args>
216 *cnf_stream_ <<
"c " << first;
217 comment_rec(args...);
Temporary file name.
Definition: tmpfile.hh:49
bool command_given()
Return true if a satsolver is given, false otherwise.
void comment_rec(T single)
Add a comment. It should be used only in debug mode after providing a satsolver.
Definition: satsolver.hh:185
Interface with a given sat solver.
Definition: satsolver.hh:43
void comment(T single)
Add a comment. It will start with "c ". It should be used only in debug mode after providing a satsol...
Definition: satsolver.hh:204
Definition: formater.hh:32
Interface with a SAT solver.
Definition: satsolver.hh:70
int run(printable *in, printable *out)
Run the given satsolver.