From 1bbf239843e2f9a0ef6283758977bbe2a6837bc4 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 10 Jan 2016 21:04:17 -0800 Subject: Experiments with SAT-based mapping. --- src/sat/bsat/satSolver.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/sat') diff --git a/src/sat/bsat/satSolver.h b/src/sat/bsat/satSolver.h index f1738eb5..fc92e557 100644 --- a/src/sat/bsat/satSolver.h +++ b/src/sat/bsat/satSolver.h @@ -301,6 +301,15 @@ static inline void sat_solver_start_cardinality(sat_solver* s, int nSize) s->nCard = nSize; s->nCardClauses = 0; } +static void sat_solver_set_polarity(sat_solver* s, int * pVars, int nVars ) +{ + int i; + for ( i = 0; i < s->size; i++ ) + s->polarity[i] = 0; + for ( i = 0; i < nVars; i++ ) + s->polarity[pVars[i]] = 1; +} + static inline int sat_solver_add_const( sat_solver * pSat, int iVar, int fCompl ) { lit Lits[1]; -- cgit v1.2.3