#include "classlist.h"
class IncrementalSolver {
- public:
- IncrementalSolver();
- ~IncrementalSolver();
- void addClauseLiteral(int literal);
- void finishedClauses();
- void freeze(int variable);
- int solve();
+public:
+ IncrementalSolver();
+ ~IncrementalSolver();
+ void addClauseLiteral(int literal);
+ void finishedClauses();
+ void freeze(int variable);
+ int solve();
void startSolve();
int getSolution();
bool getValue(int variable);
- void reset();
+ void reset();
MEMALLOC;
-
- private:
- void createSolver();
- void killSolver();
- void flushBuffer();
- int readIntSolver();
- void readSolver(void * buffer, ssize_t size);
- int * buffer;
- int * solution;
- int solutionsize;
- int offset;
- pid_t solver_pid;
- int to_solver_fd;
- int from_solver_fd;
+
+private:
+ void createSolver();
+ void killSolver();
+ void flushBuffer();
+ int readIntSolver();
+ void readSolver(void * buffer, ssize_t size);
+ int * buffer;
+ int * solution;
+ int solutionsize;
+ int offset;
+ pid_t solver_pid;
+ int to_solver_fd;
+ int from_solver_fd;
};
#endif