abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
aigRepar.c File Reference
#include "aig.h"
#include "sat/cnf/cnf.h"
#include "sat/bsat/satSolver2.h"

Go to the source code of this file.

Functions

static
ABC_NAMESPACE_IMPL_START void 
Aig_ManInterAddBuffer (sat_solver2 *pSat, int iVarA, int iVarB, int fCompl, int fMark)
 DECLARATIONS ///. More...
 
static void Aig_ManInterAddXor (sat_solver2 *pSat, int iVarA, int iVarB, int iVarC, int fCompl, int fMark)
 
void Aig_ManInterTest (Aig_Man_t *pMan, int fVerbose)
 
void Aig_ManAppend (Aig_Man_t *pBase, Aig_Man_t *pNew)
 
Aig_Man_tAig_ManInterRepar (Aig_Man_t *pMan, int fVerbose)
 

Function Documentation

void Aig_ManAppend ( Aig_Man_t pBase,
Aig_Man_t pNew 
)

Function*************************************************************

Synopsis [Duplicates AIG while mapping PIs into the given array.]

Description []

SideEffects []

SeeAlso []

Definition at line 215 of file aigRepar.c.

216 {
217  Aig_Obj_t * pObj;
218  int i;
219  assert( Aig_ManCoNum(pNew) == 1 );
220  assert( Aig_ManCiNum(pNew) == Aig_ManCiNum(pBase) );
221  // create the PIs
222  Aig_ManCleanData( pNew );
223  Aig_ManConst1(pNew)->pData = Aig_ManConst1(pBase);
224  Aig_ManForEachCi( pNew, pObj, i )
225  pObj->pData = Aig_IthVar(pBase, i);
226  // duplicate internal nodes
227  Aig_ManForEachNode( pNew, pObj, i )
228  pObj->pData = Aig_And( pBase, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
229  // add one PO to base
230  pObj = Aig_ManCo( pNew, 0 );
231  Aig_ObjCreateCo( pBase, Aig_ObjChild0Copy(pObj) );
232 }
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition: aigObj.c:66
void * pData
Definition: aig.h:87
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition: aigOper.c:104
static int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
Aig_Obj_t * Aig_IthVar(Aig_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
Definition: aigOper.c:63
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Definition: aig.h:313
Definition: aig.h:69
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
Definition: aig.h:312
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
#define assert(ex)
Definition: util_old.h:213
void Aig_ManCleanData(Aig_Man_t *p)
Definition: aigUtil.c:205
static ABC_NAMESPACE_IMPL_START void Aig_ManInterAddBuffer ( sat_solver2 pSat,
int  iVarA,
int  iVarB,
int  fCompl,
int  fMark 
)
inlinestatic

DECLARATIONS ///.

CFile****************************************************************

FileName [aigRepar.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [AIG package.]

Synopsis [Interpolation-based reparametrization.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - April 28, 2007.]

Revision [

Id:
aigRepar.c,v 1.00 2007/04/28 00:00:00 alanmi Exp

]FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Adds buffer to the solver.]

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file aigRepar.c.

48 {
49  lit Lits[2];
50  int Cid;
51  assert( iVarA >= 0 && iVarB >= 0 );
52 
53  Lits[0] = toLitCond( iVarA, 0 );
54  Lits[1] = toLitCond( iVarB, !fCompl );
55  Cid = sat_solver2_addclause( pSat, Lits, Lits + 2, 0 );
56  if ( fMark )
57  clause2_set_partA( pSat, Cid, 1 );
58 
59  Lits[0] = toLitCond( iVarA, 1 );
60  Lits[1] = toLitCond( iVarB, fCompl );
61  Cid = sat_solver2_addclause( pSat, Lits, Lits + 2, 0 );
62  if ( fMark )
63  clause2_set_partA( pSat, Cid, 1 );
64 }
int sat_solver2_addclause(sat_solver2 *s, lit *begin, lit *end, int Id)
Definition: satSolver2.c:1287
int lit
Definition: satVec.h:130
static lit toLitCond(int v, int c)
Definition: satVec.h:143
static void clause2_set_partA(sat_solver2 *s, int h, int partA)
Definition: satSolver2.h:183
#define assert(ex)
Definition: util_old.h:213
static void Aig_ManInterAddXor ( sat_solver2 pSat,
int  iVarA,
int  iVarB,
int  iVarC,
int  fCompl,
int  fMark 
)
inlinestatic

Function*************************************************************

Synopsis [Adds constraints for the two-input AND-gate.]

Description []

SideEffects []

SeeAlso []

Definition at line 77 of file aigRepar.c.

78 {
79  lit Lits[3];
80  int Cid;
81  assert( iVarA >= 0 && iVarB >= 0 && iVarC >= 0 );
82 
83  Lits[0] = toLitCond( iVarA, !fCompl );
84  Lits[1] = toLitCond( iVarB, 1 );
85  Lits[2] = toLitCond( iVarC, 1 );
86  Cid = sat_solver2_addclause( pSat, Lits, Lits + 3, 0 );
87  if ( fMark )
88  clause2_set_partA( pSat, Cid, 1 );
89 
90  Lits[0] = toLitCond( iVarA, !fCompl );
91  Lits[1] = toLitCond( iVarB, 0 );
92  Lits[2] = toLitCond( iVarC, 0 );
93  Cid = sat_solver2_addclause( pSat, Lits, Lits + 3, 0 );
94  if ( fMark )
95  clause2_set_partA( pSat, Cid, 1 );
96 
97  Lits[0] = toLitCond( iVarA, fCompl );
98  Lits[1] = toLitCond( iVarB, 1 );
99  Lits[2] = toLitCond( iVarC, 0 );
100  Cid = sat_solver2_addclause( pSat, Lits, Lits + 3, 0 );
101  if ( fMark )
102  clause2_set_partA( pSat, Cid, 1 );
103 
104  Lits[0] = toLitCond( iVarA, fCompl );
105  Lits[1] = toLitCond( iVarB, 0 );
106  Lits[2] = toLitCond( iVarC, 1 );
107  Cid = sat_solver2_addclause( pSat, Lits, Lits + 3, 0 );
108  if ( fMark )
109  clause2_set_partA( pSat, Cid, 1 );
110 }
int sat_solver2_addclause(sat_solver2 *s, lit *begin, lit *end, int Id)
Definition: satSolver2.c:1287
int lit
Definition: satVec.h:130
static lit toLitCond(int v, int c)
Definition: satVec.h:143
static void clause2_set_partA(sat_solver2 *s, int h, int partA)
Definition: satSolver2.h:183
#define assert(ex)
Definition: util_old.h:213
Aig_Man_t* Aig_ManInterRepar ( Aig_Man_t pMan,
int  fVerbose 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 245 of file aigRepar.c.

246 {
247  Aig_Man_t * pAigTemp, * pInter, * pBase = NULL;
248  sat_solver2 * pSat;
249  Vec_Int_t * vVars;
250  Cnf_Dat_t * pCnf, * pCnfInter;
251  Aig_Obj_t * pObj;
252  int nOuts = Aig_ManCoNum(pMan);
253  int ShiftP[2], ShiftCnf[2], ShiftOr[2], ShiftAssume;
254  int Cid, Lit, status, i, k, c;
255  clock_t clk = clock();
256  assert( Aig_ManRegNum(pMan) == 0 );
257 
258  // derive CNFs
259  pCnf = Cnf_Derive( pMan, nOuts );
260 
261  // start the solver
262  pSat = sat_solver2_new();
263  sat_solver2_setnvars( pSat, 4*pCnf->nVars + 6*nOuts );
264  // vars: pGlobal + (p0 + A1 + A2 + or0) + (p1 + B1 + B2 + or1) + pAssume;
265  ShiftP[0] = nOuts;
266  ShiftP[1] = 2*pCnf->nVars + 3*nOuts;
267  ShiftCnf[0] = ShiftP[0] + nOuts;
268  ShiftCnf[1] = ShiftP[1] + nOuts;
269  ShiftOr[0] = ShiftCnf[0] + 2*pCnf->nVars;
270  ShiftOr[1] = ShiftCnf[1] + 2*pCnf->nVars;
271  ShiftAssume = ShiftOr[1] + nOuts;
272  assert( ShiftAssume + nOuts == pSat->size );
273 
274  // mark variables of A
275  for ( i = ShiftCnf[0]; i < ShiftP[1]; i++ )
276  var_set_partA( pSat, i, 1 );
277 
278  // add clauses of A, then B
279  vVars = Vec_IntAlloc( 2*nOuts );
280  for ( k = 0; k < 2; k++ )
281  {
282  // copy A1
283  Cnf_DataLift( pCnf, ShiftCnf[k] );
284  for ( i = 0; i < pCnf->nClauses; i++ )
285  {
286  Cid = sat_solver2_addclause( pSat, pCnf->pClauses[i], pCnf->pClauses[i+1], 0 );
287  clause2_set_partA( pSat, Cid, k==0 );
288  }
289  // add equality p[k] == A1/B1
290  Aig_ManForEachCo( pMan, pObj, i )
291  Aig_ManInterAddBuffer( pSat, ShiftP[k] + i, pCnf->pVarNums[pObj->Id], k==1, k==0 );
292  // copy A2
293  Cnf_DataLift( pCnf, pCnf->nVars );
294  for ( i = 0; i < pCnf->nClauses; i++ )
295  {
296  Cid = sat_solver2_addclause( pSat, pCnf->pClauses[i], pCnf->pClauses[i+1], 0 );
297  clause2_set_partA( pSat, Cid, k==0 );
298  }
299  // add comparator (!p[k] ^ A2/B2) == or[k]
300  Vec_IntClear( vVars );
301  Aig_ManForEachCo( pMan, pObj, i )
302  {
303  Aig_ManInterAddXor( pSat, ShiftP[k] + i, pCnf->pVarNums[pObj->Id], ShiftOr[k] + i, k==1, k==0 );
304  Vec_IntPush( vVars, toLitCond(ShiftOr[k] + i, 1) );
305  }
306  Cid = sat_solver2_addclause( pSat, Vec_IntArray(vVars), Vec_IntArray(vVars) + Vec_IntSize(vVars), 0 );
307  clause2_set_partA( pSat, Cid, k==0 );
308  // return to normal
309  Cnf_DataLift( pCnf, -ShiftCnf[k]-pCnf->nVars );
310  }
311  // add clauses to constrain p[0] and p[1]
312  for ( k = 0; k < nOuts; k++ )
313  Aig_ManInterAddXor( pSat, ShiftP[0] + k, ShiftP[1] + k, ShiftAssume + k, 0, 0 );
314 
315  // start the interpolant
316  pBase = Aig_ManStart( 1000 );
317  pBase->pName = Abc_UtilStrsav( "repar" );
318  for ( k = 0; k < 2*nOuts; k++ )
319  Aig_IthVar(pBase, i);
320 
321  // start global variables (pGlobal and p[0])
322  Vec_IntClear( vVars );
323  for ( k = 0; k < 2*nOuts; k++ )
324  Vec_IntPush( vVars, k );
325 
326  // perform iterative solving
327  // vars: pGlobal + (p0 + A1 + A2 + or0) + (p1 + B1 + B2 + or1) + pAssume;
328  for ( k = 0; k < nOuts; k++ )
329  {
330  // swap k-th variables
331  int Temp = Vec_IntEntry( vVars, k );
332  Vec_IntWriteEntry( vVars, k, Vec_IntEntry(vVars, nOuts+k) );
333  Vec_IntWriteEntry( vVars, nOuts+k, Temp );
334 
335  // solve incrementally
336  Lit = toLitCond( ShiftAssume + k, 1 ); // XOR output is 0 ==> p1 == p2
337  status = sat_solver2_solve( pSat, &Lit, &Lit + 1, 0, 0, 0, 0 );
338  assert( status == l_False );
339  Sat_Solver2PrintStats( stdout, pSat );
340 
341  // derive interpolant
342  pInter = (Aig_Man_t *)Sat_ProofInterpolant( pSat, vVars );
343  Aig_ManPrintStats( pInter );
344  // make sure interpolant does not depend on useless vars
345  Aig_ManForEachCi( pInter, pObj, i )
346  assert( i <= k || Aig_ObjRefs(pObj) == 0 );
347 
348  // simplify
349  pInter = Dar_ManRwsat( pAigTemp = pInter, 1, 0 );
350  Aig_ManStop( pAigTemp );
351 
352  // add interpolant to the solver
353  pCnfInter = Cnf_Derive( pInter, 1 );
354  Cnf_DataLift( pCnfInter, pSat->size );
355  sat_solver2_setnvars( pSat, pSat->size + 2*pCnfInter->nVars );
356  for ( i = 0; i < pCnfInter->nVars; i++ )
357  var_set_partA( pSat, pSat->size-2*pCnfInter->nVars + i, 1 );
358  for ( c = 0; c < 2; c++ )
359  {
360  if ( c == 1 )
361  Cnf_DataLift( pCnfInter, pCnfInter->nVars );
362  // add to A
363  for ( i = 0; i < pCnfInter->nClauses; i++ )
364  {
365  Cid = sat_solver2_addclause( pSat, pCnfInter->pClauses[i], pCnfInter->pClauses[i+1], 0 );
366  clause2_set_partA( pSat, Cid, c==0 );
367  }
368  // connect to the inputs
369  Aig_ManForEachCi( pInter, pObj, i )
370  if ( i <= k )
371  Aig_ManInterAddBuffer( pSat, i, pCnf->pVarNums[pObj->Id], 0, c==0 );
372  // connect to the outputs
373  pObj = Aig_ManCo(pInter, 0);
374  Aig_ManInterAddBuffer( pSat, ShiftP[c] + k, pCnf->pVarNums[pObj->Id], 0, c==0 );
375  if ( c == 1 )
376  Cnf_DataLift( pCnfInter, -pCnfInter->nVars );
377  }
378  Cnf_DataFree( pCnfInter );
379 
380  // accumulate
381  Aig_ManAppend( pBase, pInter );
382  Aig_ManStop( pInter );
383 
384  // update global variables
385  Temp = Vec_IntEntry( vVars, k );
386  Vec_IntWriteEntry( vVars, k, Vec_IntEntry(vVars, nOuts+k) );
387  Vec_IntWriteEntry( vVars, nOuts+k, Temp );
388  }
389 
390  Vec_IntFree( vVars );
391  Cnf_DataFree( pCnf );
392  sat_solver2_delete( pSat );
393  ABC_PRT( "Reparameterization time", clock() - clk );
394  return pBase;
395 }
static int * Vec_IntArray(Vec_Int_t *p)
Definition: vecInt.h:328
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
Definition: cnfCore.c:165
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
int nClauses
Definition: cnf.h:61
void sat_solver2_delete(sat_solver2 *s)
Definition: satSolver2.c:1225
int nVars
Definition: cnf.h:59
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition: aigMan.c:47
void Aig_ManPrintStats(Aig_Man_t *p)
Definition: aigMan.c:379
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
int * pVarNums
Definition: cnf.h:63
#define Aig_ManForEachCo(p, pObj, i)
Definition: aig.h:398
sat_solver2 * sat_solver2_new(void)
Definition: satSolver2.c:1109
void * Sat_ProofInterpolant(sat_solver2 *s, void *pGloVars)
void Sat_Solver2PrintStats(FILE *pFile, sat_solver2 *p)
Definition: satUtil.c:210
int sat_solver2_addclause(sat_solver2 *s, lit *begin, lit *end, int Id)
Definition: satSolver2.c:1287
Definition: cnf.h:56
ABC_NAMESPACE_IMPL_START Aig_Man_t * Dar_ManRwsat(Aig_Man_t *pAig, int fBalance, int fVerbose)
DECLARATIONS ///.
Definition: darScript.c:71
for(p=first;p->value< newval;p=p->next)
void sat_solver2_setnvars(sat_solver2 *s, int n)
Definition: satSolver2.c:1170
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
int ** pClauses
Definition: cnf.h:62
void var_set_partA(sat_solver2 *s, int v, int partA)
Definition: satSolver2.c:85
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
Aig_Obj_t * Aig_IthVar(Aig_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
Definition: aigOper.c:63
static lit toLitCond(int v, int c)
Definition: satVec.h:143
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
if(last==0)
Definition: sparse_int.h:34
static void Aig_ManInterAddXor(sat_solver2 *pSat, int iVarA, int iVarB, int iVarC, int fCompl, int fMark)
Definition: aigRepar.c:77
static int size
Definition: cuddSign.c:86
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
void Cnf_DataLift(Cnf_Dat_t *p, int nVarsPlus)
Definition: cnfMan.c:205
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
void Aig_ManAppend(Aig_Man_t *pBase, Aig_Man_t *pNew)
Definition: aigRepar.c:215
#define ABC_PRT(a, t)
Definition: abc_global.h:220
static void clause2_set_partA(sat_solver2 *s, int h, int partA)
Definition: satSolver2.h:183
#define l_False
Definition: SolverTypes.h:85
static ABC_NAMESPACE_IMPL_START void Aig_ManInterAddBuffer(sat_solver2 *pSat, int iVarA, int iVarB, int fCompl, int fMark)
DECLARATIONS ///.
Definition: aigRepar.c:47
void Cnf_DataFree(Cnf_Dat_t *p)
Definition: cnfMan.c:180
int sat_solver2_solve(sat_solver2 *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
Definition: satSolver2.c:1835
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjRefs(Aig_Obj_t *pObj)
Definition: aig.h:300
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
int Id
Definition: aig.h:85
void Aig_ManInterTest ( Aig_Man_t pMan,
int  fVerbose 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 123 of file aigRepar.c.

124 {
125  sat_solver2 * pSat;
126 // Aig_Man_t * pInter;
127  word * pInter;
128  Vec_Int_t * vVars;
129  Cnf_Dat_t * pCnf;
130  Aig_Obj_t * pObj;
131  int Lit, Cid, Var, status, i;
132  clock_t clk = clock();
133  assert( Aig_ManRegNum(pMan) == 0 );
134  assert( Aig_ManCoNum(pMan) == 1 );
135 
136  // derive CNFs
137  pCnf = Cnf_Derive( pMan, 1 );
138 
139  // start the solver
140  pSat = sat_solver2_new();
141  sat_solver2_setnvars( pSat, 2*pCnf->nVars+1 );
142  // set A-variables (all used except PI/PO)
143  Aig_ManForEachObj( pMan, pObj, i )
144  {
145  if ( pCnf->pVarNums[pObj->Id] < 0 )
146  continue;
147  if ( !Aig_ObjIsCi(pObj) && !Aig_ObjIsCo(pObj) )
148  var_set_partA( pSat, pCnf->pVarNums[pObj->Id], 1 );
149  }
150 
151  // add clauses of A
152  for ( i = 0; i < pCnf->nClauses; i++ )
153  {
154  Cid = sat_solver2_addclause( pSat, pCnf->pClauses[i], pCnf->pClauses[i+1], 0 );
155  clause2_set_partA( pSat, Cid, 1 );
156  }
157 
158  // add clauses of B
159  Cnf_DataLift( pCnf, pCnf->nVars );
160  for ( i = 0; i < pCnf->nClauses; i++ )
161  sat_solver2_addclause( pSat, pCnf->pClauses[i], pCnf->pClauses[i+1], 0 );
162  Cnf_DataLift( pCnf, -pCnf->nVars );
163 
164  // add PI equality clauses
165  vVars = Vec_IntAlloc( Aig_ManCoNum(pMan)+1 );
166  Aig_ManForEachCi( pMan, pObj, i )
167  {
168  if ( Aig_ObjRefs(pObj) == 0 )
169  continue;
170  Var = pCnf->pVarNums[pObj->Id];
171  Aig_ManInterAddBuffer( pSat, Var, pCnf->nVars + Var, 0, 0 );
172  Vec_IntPush( vVars, Var );
173  }
174 
175  // add an XOR clause in the end
176  Var = pCnf->pVarNums[Aig_ManCo(pMan,0)->Id];
177  Aig_ManInterAddXor( pSat, Var, pCnf->nVars + Var, 2*pCnf->nVars, 0, 0 );
178  Vec_IntPush( vVars, Var );
179 
180  // solve the problem
181  Lit = toLitCond( 2*pCnf->nVars, 0 );
182  status = sat_solver2_solve( pSat, &Lit, &Lit + 1, 0, 0, 0, 0 );
183  assert( status == l_False );
184  Sat_Solver2PrintStats( stdout, pSat );
185 
186  // derive interpolant
187 // pInter = Sat_ProofInterpolant( pSat, vVars );
188 // Aig_ManPrintStats( pInter );
189 // Aig_ManDumpBlif( pInter, "int.blif", NULL, NULL );
190 //pInter = Sat_ProofInterpolantTruth( pSat, vVars );
191  pInter = NULL;
192 // Extra_PrintHex( stdout, pInter, Vec_IntSize(vVars) ); printf( "\n" );
193 
194  // clean up
195 // Aig_ManStop( pInter );
196  ABC_FREE( pInter );
197 
198  Vec_IntFree( vVars );
199  Cnf_DataFree( pCnf );
200  sat_solver2_delete( pSat );
201  ABC_PRT( "Total interpolation time", clock() - clk );
202 }
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
Definition: cnfCore.c:165
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
int nClauses
Definition: cnf.h:61
void sat_solver2_delete(sat_solver2 *s)
Definition: satSolver2.c:1225
int nVars
Definition: cnf.h:59
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
int * pVarNums
Definition: cnf.h:63
sat_solver2 * sat_solver2_new(void)
Definition: satSolver2.c:1109
void Sat_Solver2PrintStats(FILE *pFile, sat_solver2 *p)
Definition: satUtil.c:210
int sat_solver2_addclause(sat_solver2 *s, lit *begin, lit *end, int Id)
Definition: satSolver2.c:1287
Definition: cnf.h:56
void sat_solver2_setnvars(sat_solver2 *s, int n)
Definition: satSolver2.c:1170
static int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
int ** pClauses
Definition: cnf.h:62
void var_set_partA(sat_solver2 *s, int v, int partA)
Definition: satSolver2.c:85
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static lit toLitCond(int v, int c)
Definition: satVec.h:143
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static void Aig_ManInterAddXor(sat_solver2 *pSat, int iVarA, int iVarB, int iVarC, int fCompl, int fMark)
Definition: aigRepar.c:77
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
void Cnf_DataLift(Cnf_Dat_t *p, int nVarsPlus)
Definition: cnfMan.c:205
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
#define Aig_ManForEachObj(p, pObj, i)
Definition: aig.h:403
#define ABC_FREE(obj)
Definition: abc_global.h:232
#define ABC_PRT(a, t)
Definition: abc_global.h:220
static void clause2_set_partA(sat_solver2 *s, int h, int partA)
Definition: satSolver2.h:183
#define l_False
Definition: SolverTypes.h:85
int Var
Definition: SolverTypes.h:42
static ABC_NAMESPACE_IMPL_START void Aig_ManInterAddBuffer(sat_solver2 *pSat, int iVarA, int iVarB, int fCompl, int fMark)
DECLARATIONS ///.
Definition: aigRepar.c:47
void Cnf_DataFree(Cnf_Dat_t *p)
Definition: cnfMan.c:180
int sat_solver2_solve(sat_solver2 *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
Definition: satSolver2.c:1835
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjRefs(Aig_Obj_t *pObj)
Definition: aig.h:300
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
Definition: aig.h:275
int Id
Definition: aig.h:85
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276