mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-09 20:50:51 +00:00
Added support for Minisat::SimpSolver + ezSAT frezze() API
This commit is contained in:
parent
b76528d8a5
commit
dab1612f81
5 changed files with 79 additions and 11 deletions
|
@ -20,7 +20,7 @@
|
|||
#ifndef EZMINISAT_H
|
||||
#define EZMINISAT_H
|
||||
|
||||
#define EZMINISAT_SOLVER Minisat::Solver
|
||||
#define EZMINISAT_SIMPSOLVER 0
|
||||
#define EZMINISAT_VERBOSITY 0
|
||||
#define EZMINISAT_INCREMENTAL 1
|
||||
|
||||
|
@ -38,10 +38,19 @@ namespace Minisat {
|
|||
class ezMiniSAT : public ezSAT
|
||||
{
|
||||
private:
|
||||
EZMINISAT_SOLVER *minisatSolver;
|
||||
#if EZMINISAT_SIMPSOLVER
|
||||
typedef Minisat::SimpSolver Solver;
|
||||
#else
|
||||
typedef Minisat::Solver Solver;
|
||||
#endif
|
||||
Solver *minisatSolver;
|
||||
std::vector<int> minisatVars;
|
||||
bool foundContradiction;
|
||||
|
||||
#if EZMINISAT_SIMPSOLVER && EZMINISAT_INCREMENTAL
|
||||
std::set<int> cnfFrozenVars;
|
||||
#endif
|
||||
|
||||
static ezMiniSAT *alarmHandlerThis;
|
||||
static clock_t alarmHandlerTimeout;
|
||||
static void alarmHandler(int);
|
||||
|
@ -50,6 +59,9 @@ public:
|
|||
ezMiniSAT();
|
||||
virtual ~ezMiniSAT();
|
||||
virtual void clear();
|
||||
#if EZMINISAT_SIMPSOLVER && EZMINISAT_INCREMENTAL
|
||||
virtual void freeze(int id);
|
||||
#endif
|
||||
virtual bool solver(const std::vector<int> &modelExpressions, std::vector<bool> &modelValues, const std::vector<int> &assumptions);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue