#ifndef MINISATSOLVER_H
#define MINISATSOLVER_H

#include "core/Solver.h"
#include "core/SolverTypes.h"

#include "util/ksatinstance.h"
#include "util/minisatresult.h"
#include "util/minisatstats.h"

namespace satlab
{
    
class MinisatSolver : public Minisat::Solver
{
private:
    using MINISAT_CLAUSE = Minisat::vec<Minisat::Lit>;
    using BASE = Minisat::Solver;
    
public:
    MinisatSolver(const KSATinstance& ksat);
    
    bool solve();
    
    void addClause(const KSATinstance::CLAUSE& clause);
    
    MinisatResult getResult() const;
    MinisatStats getStats() const;
    
private:
    bool satisfiable;
    void addMissingVars(const MINISAT_CLAUSE& clause);
};

}

#endif // MINISATSOLVER_H
