#ifndef _basesolver_hpp_INCLUDED #define _basesolver_hpp_INCLUDED #include "../light.hpp" #include "../utils/vec.hpp" #include "clause.hpp" #include #include #include #include class sharer; class basesolver { public: virtual void add(int l) = 0; virtual int solve() = 0; virtual int val(int l) = 0; virtual void terminate() = 0; virtual void configure(const char* name, int id) = 0; virtual int get_conflicts() = 0; virtual void parse_from_CNF(char* filename) = 0; virtual void parse_from_PAR(preprocess* pre) = 0; virtual void get_model(vec &model) = 0; virtual void exp_clause(void *cl, int lbd) = 0; virtual bool imp_clause(clause_store *cls, void *cl) = 0; virtual void export_clauses_to(vec &clauses) = 0; virtual void import_clauses_from(vec &clauses) = 0; virtual void broaden_export_limit() = 0; virtual void restrict_export_limit() = 0; virtual double get_waiting_time() = 0; light * controller; int id; sharer* in_sharer; boost::lockfree::spsc_queue> import_clause; boost::lockfree::spsc_queue> export_clause; basesolver(int sid, light* light) : id(sid), controller(light) {} ~basesolver() { if (controller) { controller = NULL; } } }; #endif