ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
bmcBmcS.c
Go to the documentation of this file.
1
20
21#include "bmc.h"
22#include "sat/cnf/cnf.h"
23#include "sat/satoko/satoko.h"
24
25
26//#define ABC_USE_EXT_SOLVERS 1
27
28#ifdef ABC_USE_EXT_SOLVERS
29 #include "extsat/bmc/bmcApi.h"
30 #define l_Undef -1
31 #define l_True 1
32 #define l_False 0
33#else
34 #define l_Undef 0
35 #define l_True 1
36 #define l_False -1
37 #define bmc_sat_solver satoko_t
38 #define bmc_sat_solver_start(type) satoko_create()
39 #define bmc_sat_solver_stop satoko_destroy
40 #define bmc_sat_solver_addclause satoko_add_clause
41 #define bmc_sat_solver_addvar(s) satoko_add_variable(s, 0)
42 #define bmc_sat_solver_solve satoko_solve_assumptions
43 #define bmc_sat_solver_read_cex_varvalue satoko_read_cex_varvalue
44 #define bmc_sat_solver_setstop satoko_set_stop
45#endif
46
47
48
49#ifdef ABC_USE_PTHREADS
50
51#ifdef _WIN32
52 #include "../lib/pthread.h"
53#else
54 #include <pthread.h>
55 #include <unistd.h>
56#endif
57
58#endif
59
60
62
66
67#define PAR_THR_MAX 100
68
69typedef struct Bmcs_Man_t_ Bmcs_Man_t;
71{
72 Bmc_AndPar_t * pPars; // parameters
73 Gia_Man_t * pGia; // user's AIG
74 Gia_Man_t * pFrames; // unfolded AIG (pFrames->vCopies point to pClean)
75 Gia_Man_t * pClean; // incremental AIG (pClean->Value point to pFrames)
76 Vec_Ptr_t vGia2Fr; // copies of GIA in each timeframe
77 Vec_Int_t vFr2Sat; // mapping of objects in pFrames into SAT variables
78 Vec_Int_t vCiMap; // maps CIs of pFrames into CIs/frames of GIA
79 bmc_sat_solver * pSats[PAR_THR_MAX]; // concurrent SAT solvers
80 int nSatVars; // number of SAT variables used
81 int nSatVarsOld; // number of SAT variables used
82 int fStopNow; // signal when it is time to stop
83 abctime timeUnf; // runtime of unfolding
84 abctime timeCnf; // runtime of CNF generation
85 abctime timeSat; // runtime of the solvers
86 abctime timeOth; // other runtime
87};
88
89//static inline int * Bmcs_ManCopies( Bmcs_Man_t * p, int f ) { return (int*)Vec_PtrEntry(&p->vGia2Fr, f % Vec_PtrSize(&p->vGia2Fr)); }
90static inline int * Bmcs_ManCopies( Bmcs_Man_t * p, int f ) { return (int*)Vec_PtrEntry(&p->vGia2Fr, f); }
91
95
107void Bmc_SuperBuildTents_rec( Gia_Man_t * p, int iObj, Vec_Int_t * vIns, Vec_Int_t * vCuts, Vec_Int_t * vFlops, Vec_Int_t * vObjs, Vec_Int_t * vRankIns, Vec_Int_t * vRankCuts, int Rank )
108{
109 Gia_Obj_t * pObj;
110 if ( iObj == 0 )
111 return;
112 if ( Gia_ObjIsTravIdCurrentId(p, iObj) )
113 return;
114 Gia_ObjSetTravIdCurrentId(p, iObj);
115 pObj = Gia_ManObj( p, iObj );
116 if ( pObj->fMark0 )
117 {
118 if ( !pObj->fMark1 )
119 return;
120 Vec_IntPush( vCuts, iObj );
121 Vec_IntPush( vRankCuts, Rank );
122 pObj->fMark1 = 1;
123 return;
124 }
125 pObj->fMark0 = 1;
126 if ( Gia_ObjIsPi(p, pObj) )
127 {
128 Vec_IntPush( vIns, iObj );
129 Vec_IntPush( vRankIns, Rank );
130 pObj->fMark1 = 1;
131 return;
132 }
133 if ( Gia_ObjIsCi(pObj) )
134 {
135 Vec_IntPush( vFlops, iObj );
136 return;
137 }
138 assert( Gia_ObjIsAnd(pObj) );
139 Bmc_SuperBuildTents_rec( p, Gia_ObjFaninId0(pObj, iObj), vIns, vCuts, vFlops, vObjs, vRankIns, vRankCuts, Rank );
140 Bmc_SuperBuildTents_rec( p, Gia_ObjFaninId1(pObj, iObj), vIns, vCuts, vFlops, vObjs, vRankIns, vRankCuts, Rank );
141 Vec_IntPush( vObjs, iObj );
142}
144{
145 Vec_Int_t * vIns = Vec_IntAlloc( 1000 );
146 Vec_Int_t * vCuts = Vec_IntAlloc( 1000 );
147 Vec_Int_t * vFlops = Vec_IntAlloc( 1000 );
148 Vec_Int_t * vObjs = Vec_IntAlloc( 1000 );
149 Vec_Int_t * vLimIns = Vec_IntAlloc( 1000 );
150 Vec_Int_t * vLimCuts = Vec_IntAlloc( 1000 );
151 Vec_Int_t * vLimFlops = Vec_IntAlloc( 1000 );
152 Vec_Int_t * vLimObjs = Vec_IntAlloc( 1000 );
153 Vec_Int_t * vRankIns = Vec_IntAlloc( 1000 );
154 Vec_Int_t * vRankCuts = Vec_IntAlloc( 1000 );
155 Vec_Int_t * vMap = Vec_IntAlloc( 1000 );
156 Gia_Man_t * pNew, * pTemp;
157 Gia_Obj_t * pObj;
158 int i, r, Entry, Rank, iPrev, iThis = 0;
159 // collect internal nodes
160 Gia_ManForEachPo( p, pObj, i )
161 Vec_IntPush( vFlops, Gia_ObjId(p, pObj) );
163 for ( Rank = 0; iThis < Vec_IntEntryLast(vFlops); Rank++ )
164 {
165 Vec_IntPush( vLimIns, Vec_IntSize(vIns) );
166 Vec_IntPush( vLimCuts, Vec_IntSize(vCuts) );
167 Vec_IntPush( vLimFlops, Vec_IntSize(vFlops) );
168 Vec_IntPush( vLimObjs, Vec_IntSize(vObjs) );
169 iPrev = iThis;
170 iThis = Vec_IntEntryLast(vFlops);
171 Vec_IntForEachEntryStartStop( vFlops, Entry, i, iPrev, iThis )
172 {
174 Bmc_SuperBuildTents_rec( p, Gia_ObjFaninId0(Gia_ManObj(p, iPrev), iPrev), vIns, vCuts, vFlops, vObjs, vRankIns, vRankCuts, Rank );
175 }
176 }
178 Vec_IntPush( vLimIns, Vec_IntSize(vIns) );
179 Vec_IntPush( vLimCuts, Vec_IntSize(vCuts) );
180 Vec_IntPush( vLimFlops, Vec_IntSize(vFlops) );
181 Vec_IntPush( vLimObjs, Vec_IntSize(vObjs) );
182 // create new GIA
183 pNew = Gia_ManStart( Gia_ManObjNum(p) );
184 pNew->pName = Abc_UtilStrsav( p->pName );
185 pNew->pSpec = Abc_UtilStrsav( p->pSpec );
187 Gia_ManConst0(p)->Value = 0;
188 Gia_ManForEachObjVec( vIns, p, pObj, i )
189 pObj->Value = Gia_ManAppendCi(pNew);
190 Gia_ManForEachObjVec( vCuts, p, pObj, i )
191 pObj->Value = Gia_ManAppendCi(pNew);
192 for ( r = Rank; r >= 0; r-- )
193 {
194 Vec_IntForEachEntryStartStop( vFlops, Entry, i, Vec_IntEntry(vLimFlops, r), Vec_IntEntry(vLimFlops, r+1) )
195 {
196 pObj = Gia_ManObj(p, Entry);
197 pObj->Value = Gia_ObjFanin0Copy(pObj);
198 }
199 Vec_IntForEachEntryStartStop( vObjs, Entry, i, Vec_IntEntry(vLimObjs, r), Vec_IntEntry(vLimObjs, r+1) )
200 {
201 pObj = Gia_ManObj(p, Entry);
202 pObj->Value = Gia_ObjFanin0Copy(pObj);
203 }
204 }
205 Gia_ManForEachPo( p, pObj, i )
206 Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
207 Gia_ManForEachObjVec( vCuts, p, pObj, i )
208 Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
209 Gia_ManSetRegNum( pNew, Vec_IntSize(vCuts) );
210
211 // create map
212 Vec_IntForEachEntryTwo( vIns, vRankIns, Entry, Rank, i )
213 Vec_IntPushTwo( vMap, Entry, Rank );
214 Vec_IntForEachEntryTwo( vCuts, vRankCuts, Entry, Rank, i )
215 Vec_IntPushTwo( vMap, Entry, Rank );
216
217 Vec_IntFree( vIns );
218 Vec_IntFree( vCuts );
219 Vec_IntFree( vFlops );
220 Vec_IntFree( vObjs );
221
222 Vec_IntFree( vLimIns );
223 Vec_IntFree( vLimCuts );
224 Vec_IntFree( vLimFlops );
225 Vec_IntFree( vLimObjs );
226
227 Vec_IntFree( vRankIns );
228 Vec_IntFree( vRankCuts );
229
230 if ( pvMap )
231 *pvMap = vMap;
232 else
233 Vec_IntFree( vMap );
234
235 pNew = Gia_ManCleanup( pTemp = pNew );
236 Gia_ManStop( pTemp );
237 return pNew;
238}
239
240
241
253void Gia_ManCountTents_rec( Gia_Man_t * p, int iObj, Vec_Int_t * vRoots )
254{
255 Gia_Obj_t * pObj;
256 if ( Gia_ObjIsTravIdCurrentId(p, iObj) )
257 return;
258 Gia_ObjSetTravIdCurrentId(p, iObj);
259 pObj = Gia_ManObj( p, iObj );
260 if ( Gia_ObjIsAnd(pObj) )
261 {
262 Gia_ManCountTents_rec( p, Gia_ObjFaninId0(pObj, iObj), vRoots );
263 Gia_ManCountTents_rec( p, Gia_ObjFaninId1(pObj, iObj), vRoots );
264 }
265 else if ( Gia_ObjIsRo(p, pObj) )
266 Vec_IntPush( vRoots, Gia_ObjFaninId0p(p, Gia_ObjRoToRi(p, pObj)) );
267 else if ( !Gia_ObjIsPi(p, pObj) )
268 assert( 0 );
269}
271{
272 Vec_Int_t * vRoots;
273 Gia_Obj_t * pObj;
274 int t, i, iObj, nSizeCurr = 0;
275 assert( Gia_ManPoNum(p) > 0 );
277 Gia_ObjSetTravIdCurrentId( p, 0 );
278 vRoots = Vec_IntAlloc( 100 );
279 Gia_ManForEachPo( p, pObj, i )
280 Vec_IntPush( vRoots, Gia_ObjFaninId0p(p, pObj) );
281 for ( t = 0; nSizeCurr < Vec_IntSize(vRoots); t++ )
282 {
283 int nSizePrev = nSizeCurr;
284 nSizeCurr = Vec_IntSize(vRoots);
285 Vec_IntForEachEntryStartStop( vRoots, iObj, i, nSizePrev, nSizeCurr )
286 Gia_ManCountTents_rec( p, iObj, vRoots );
287 }
288 Vec_IntFree( vRoots );
289 return t;
290}
291
303void Gia_ManCountRanks_rec( Gia_Man_t * p, int iObj, Vec_Int_t * vRoots, Vec_Int_t * vRanks, Vec_Int_t * vCands, int Rank )
304{
305 Gia_Obj_t * pObj;
306 if ( Gia_ObjIsTravIdCurrentId(p, iObj) )
307 {
308 if ( Vec_IntEntry(vRanks, iObj) < Rank )
309 Vec_IntWriteEntry( vCands, iObj, 1 );
310 return;
311 }
312 Gia_ObjSetTravIdCurrentId(p, iObj);
313 Vec_IntWriteEntry( vRanks, iObj, Rank );
314 pObj = Gia_ManObj( p, iObj );
315 if ( Gia_ObjIsAnd(pObj) )
316 {
317 Gia_ManCountRanks_rec( p, Gia_ObjFaninId0(pObj, iObj), vRoots, vRanks, vCands, Rank );
318 Gia_ManCountRanks_rec( p, Gia_ObjFaninId1(pObj, iObj), vRoots, vRanks, vCands, Rank );
319 }
320 else if ( Gia_ObjIsRo(p, pObj) )
321 Vec_IntPush( vRoots, Gia_ObjFaninId0p(p, Gia_ObjRoToRi(p, pObj)) );
322 else if ( !Gia_ObjIsPi(p, pObj) )
323 assert( 0 );
324}
326{
327 Vec_Int_t * vRoots;
328 Vec_Int_t * vRanks = Vec_IntStartFull( Gia_ManObjNum(p) );
329 Vec_Int_t * vCands = Vec_IntStart( Gia_ManObjNum(p) );
330 Gia_Obj_t * pObj;
331 int t, i, iObj, nSizeCurr = 0;
332 assert( Gia_ManPoNum(p) > 0 );
334 Gia_ObjSetTravIdCurrentId( p, 0 );
335 vRoots = Vec_IntAlloc( 100 );
336 Gia_ManForEachPo( p, pObj, i )
337 Vec_IntPush( vRoots, Gia_ObjFaninId0p(p, pObj) );
338 for ( t = 0; nSizeCurr < Vec_IntSize(vRoots); t++ )
339 {
340 int nSizePrev = nSizeCurr;
341 nSizeCurr = Vec_IntSize(vRoots);
342 Vec_IntForEachEntryStartStop( vRoots, iObj, i, nSizePrev, nSizeCurr )
343 Gia_ManCountRanks_rec( p, iObj, vRoots, vRanks, vCands, t );
344 }
345 Vec_IntWriteEntry( vCands, 0, 0 );
346 printf( "Tents = %6d. Cands = %6d. %10.2f %%\n", t, Vec_IntSum(vCands), 100.0*Vec_IntSum(vCands)/Gia_ManCandNum(p) );
347 Vec_IntFree( vRoots );
348 Vec_IntFree( vRanks );
349 Vec_IntFree( vCands );
350 return t;
351}
352
353
366{
368 int i, Lit = Abc_Var2Lit( 0, 1 );
369 satoko_opts_t opts;
370 satoko_default_opts(&opts);
371 opts.conf_limit = pPars->nConfLimit;
372 assert( Gia_ManRegNum(pGia) > 0 );
373 p->pPars = pPars;
374 p->pGia = pGia;
375 p->pFrames = Gia_ManStart( 3*Gia_ManObjNum(pGia) ); Gia_ManHashStart(p->pFrames);
376 p->pClean = NULL;
377// Vec_PtrFill( &p->vGia2Fr, Gia_ManCountTents(pGia)+1, NULL );
378// for ( i = 0; i < Vec_PtrSize(&p->vGia2Fr); i++ )
379// Vec_PtrWriteEntry( &p->vGia2Fr, i, ABC_FALLOC(int, Gia_ManObjNum(pGia)) );
380 Vec_PtrGrow( &p->vGia2Fr, 1000 );
381 Vec_IntGrow( &p->vFr2Sat, 3*Gia_ManCiNum(pGia) );
382 Vec_IntPush( &p->vFr2Sat, 0 );
383 Vec_IntGrow( &p->vCiMap, 3*Gia_ManCiNum(pGia) );
384 for ( i = 0; i < pPars->nProcs; i++ )
385 {
386 // modify parameters to get different SAT solvers
387 opts.f_rst = 0.8 - i * 0.05;
388 opts.b_rst = 1.4 - i * 0.05;
389 opts.garbage_max_ratio = (float) 0.3 + i * 0.05;
390 // create SAT solvers
391 p->pSats[i] = bmc_sat_solver_start( i );
392#ifdef ABC_USE_EXT_SOLVERS
393 p->pSats[i]->SolverType = i;
394#else
395 satoko_configure(p->pSats[i], &opts);
396#endif
397 bmc_sat_solver_addvar( p->pSats[i] );
398 bmc_sat_solver_addclause( p->pSats[i], &Lit, 1 );
399 bmc_sat_solver_setstop( p->pSats[i], &p->fStopNow );
400 }
401 p->nSatVars = 1;
402 return p;
403}
405{
406 int i;
407 Gia_ManStopP( &p->pFrames );
408 Gia_ManStopP( &p->pClean );
409 Vec_PtrFreeData( &p->vGia2Fr );
410 Vec_PtrErase( &p->vGia2Fr );
411 Vec_IntErase( &p->vFr2Sat );
412 Vec_IntErase( &p->vCiMap );
413 for ( i = 0; i < p->pPars->nProcs; i++ )
414 if ( p->pSats[i] )
415 bmc_sat_solver_stop( p->pSats[i] );
416 ABC_FREE( p );
417}
418
419
431int Bmcs_ManUnfold_rec( Bmcs_Man_t * p, int iObj, int f )
432{
433 Gia_Obj_t * pObj;
434 int iLit = 0, * pCopies = Bmcs_ManCopies( p, f );
435 if ( pCopies[iObj] >= 0 )
436 return pCopies[iObj];
437 pObj = Gia_ManObj( p->pGia, iObj );
438 if ( Gia_ObjIsCi(pObj) )
439 {
440 if ( Gia_ObjIsPi(p->pGia, pObj) )
441 {
442 Vec_IntPushTwo( &p->vCiMap, Gia_ObjCioId(pObj), f );
443 iLit = Gia_ManAppendCi( p->pFrames );
444 }
445 else if ( f > 0 )
446 {
447 pObj = Gia_ObjRoToRi( p->pGia, pObj );
448 iLit = Bmcs_ManUnfold_rec( p, Gia_ObjFaninId0p(p->pGia, pObj), f-1 );
449 iLit = Abc_LitNotCond( iLit, Gia_ObjFaninC0(pObj) );
450 }
451 }
452 else if ( Gia_ObjIsAnd(pObj) )
453 {
454 iLit = Bmcs_ManUnfold_rec( p, Gia_ObjFaninId0(pObj, iObj), f );
455 iLit = Abc_LitNotCond( iLit, Gia_ObjFaninC0(pObj) );
456 if ( iLit > 0 )
457 {
458 int iNew;
459 iNew = Bmcs_ManUnfold_rec( p, Gia_ObjFaninId1(pObj, iObj), f );
460 iNew = Abc_LitNotCond( iNew, Gia_ObjFaninC1(pObj) );
461 iLit = Gia_ManHashAnd( p->pFrames, iLit, iNew );
462 }
463 }
464 else assert( 0 );
465 return (pCopies[iObj] = iLit);
466}
468{
469 Gia_Obj_t * pObj;
470 int iSatVar, iLitClean = Gia_ObjCopyArray( p->pFrames, iObj );
471 if ( iLitClean >= 0 )
472 return iLitClean;
473 pObj = Gia_ManObj( p->pFrames, iObj );
474 iSatVar = Vec_IntEntry( &p->vFr2Sat, iObj );
475 if ( iSatVar > 0 || Gia_ObjIsCi(pObj) )
476 iLitClean = Gia_ManAppendCi( p->pClean );
477 else if ( Gia_ObjIsAnd(pObj) )
478 {
479 int iLit0 = Bmcs_ManCollect_rec( p, Gia_ObjFaninId0(pObj, iObj) );
480 int iLit1 = Bmcs_ManCollect_rec( p, Gia_ObjFaninId1(pObj, iObj) );
481 iLit0 = Abc_LitNotCond( iLit0, Gia_ObjFaninC0(pObj) );
482 iLit1 = Abc_LitNotCond( iLit1, Gia_ObjFaninC1(pObj) );
483 iLitClean = Gia_ManAppendAnd( p->pClean, iLit0, iLit1 );
484 }
485 else assert( 0 );
486 assert( !Abc_LitIsCompl(iLitClean) );
487 Gia_ManObj( p->pClean, Abc_Lit2Var(iLitClean) )->Value = iObj;
488 Gia_ObjSetCopyArray( p->pFrames, iObj, iLitClean );
489 return iLitClean;
490}
491Gia_Man_t * Bmcs_ManUnfold( Bmcs_Man_t * p, int f, int nFramesAdd )
492{
493 Gia_Man_t * pNew = NULL; Gia_Obj_t * pObj;
494 int i, k, iLitFrame, iLitClean, fTrivial = 1;
495 int * pCopies, nFrameObjs = Gia_ManObjNum(p->pFrames);
496 assert( Gia_ManPoNum(p->pFrames) == f * Gia_ManPoNum(p->pGia) );
497 for ( k = 0; k < nFramesAdd; k++ )
498 {
499 // unfold this timeframe
500 Vec_PtrPush( &p->vGia2Fr, ABC_FALLOC(int, Gia_ManObjNum(p->pGia)) );
501 assert( Vec_PtrSize(&p->vGia2Fr) == f+k+1 );
502 pCopies = Bmcs_ManCopies( p, f+k );
503 //memset( pCopies, 0xFF, sizeof(int)*Gia_ManObjNum(p->pGia) );
504 pCopies[0] = 0;
505 Gia_ManForEachPo( p->pGia, pObj, i )
506 {
507 iLitFrame = Bmcs_ManUnfold_rec( p, Gia_ObjFaninId0p(p->pGia, pObj), f+k );
508 iLitFrame = Abc_LitNotCond( iLitFrame, Gia_ObjFaninC0(pObj) );
509 pCopies[Gia_ObjId(p->pGia, pObj)] = Gia_ManAppendCo( p->pFrames, iLitFrame );
510 fTrivial &= (iLitFrame == 0);
511 }
512 }
513 if ( fTrivial )
514 return NULL;
515 // create a clean copy of the new nodes of this timeframe
516 Vec_IntFillExtra( &p->vFr2Sat, Gia_ManObjNum(p->pFrames), -1 );
517 Vec_IntFillExtra( &p->pFrames->vCopies, Gia_ManObjNum(p->pFrames), -1 );
518 //assert( Vec_IntCountEntry(&p->pFrames->vCopies, -1) == Vec_IntSize(&p->pFrames->vCopies) );
519 Gia_ManStopP( &p->pClean );
520 p->pClean = Gia_ManStart( Gia_ManObjNum(p->pFrames) - nFrameObjs + 1000 );
521 Gia_ObjSetCopyArray( p->pFrames, 0, 0 );
522 for ( k = 0; k < nFramesAdd; k++ )
523 for ( i = 0; i < Gia_ManPoNum(p->pGia); i++ )
524 {
525 pObj = Gia_ManCo( p->pFrames, (f+k) * Gia_ManPoNum(p->pGia) + i );
526 iLitClean = Bmcs_ManCollect_rec( p, Gia_ObjFaninId0p(p->pFrames, pObj) );
527 iLitClean = Abc_LitNotCond( iLitClean, Gia_ObjFaninC0(pObj) );
528 iLitClean = Gia_ManAppendCo( p->pClean, iLitClean );
529 Gia_ManObj( p->pClean, Abc_Lit2Var(iLitClean) )->Value = Gia_ObjId(p->pFrames, pObj);
530 Gia_ObjSetCopyArray( p->pFrames, Gia_ObjId(p->pFrames, pObj), iLitClean );
531 }
532 pNew = p->pClean; p->pClean = NULL;
533 Gia_ManForEachObj( pNew, pObj, i )
534 Gia_ObjSetCopyArray( p->pFrames, pObj->Value, -1 );
535 return pNew;
536}
537Cnf_Dat_t * Bmcs_ManAddNewCnf( Bmcs_Man_t * p, int f, int nFramesAdd )
538{
539 abctime clk = Abc_Clock();
540 Gia_Man_t * pNew = Bmcs_ManUnfold( p, f, nFramesAdd );
541 Cnf_Dat_t * pCnf;
542 Gia_Obj_t * pObj;
543 int i, iVar, * pMap;
544 p->timeUnf += Abc_Clock() - clk;
545 if ( pNew == NULL )
546 return NULL;
547 clk = Abc_Clock();
548 pCnf = (Cnf_Dat_t *) Mf_ManGenerateCnf( pNew, 8, 1, 0, 0, 0 );
549 pMap = ABC_FALLOC( int, Gia_ManObjNum(pNew) );
550 pMap[0] = 0;
551 Gia_ManForEachObj1( pNew, pObj, i )
552 {
553 if ( pCnf->pObj2Count[i] <= 0 && !Gia_ObjIsCi(pObj) )
554 continue;
555 iVar = Vec_IntEntry( &p->vFr2Sat, pObj->Value );
556 if ( iVar == -1 )
557 Vec_IntWriteEntry( &p->vFr2Sat, pObj->Value, (iVar = p->nSatVars++) );
558 pMap[i] = iVar;
559 }
560 Gia_ManStop( pNew );
561 for ( i = 0; i < pCnf->nLiterals; i++ )
562 pCnf->pClauses[0][i] = Abc_Lit2LitV( pMap, pCnf->pClauses[0][i] );
563 ABC_FREE( pMap );
564 p->timeCnf += Abc_Clock() - clk;
565 return pCnf;
566}
567
579void Bmcs_ManPrintFrame( Bmcs_Man_t * p, int f, int nClauses, int Solver, abctime clkStart )
580{
581 int fUnfinished = 0;
582 if ( !p->pPars->fVerbose )
583 return;
584 Abc_Print( 1, "%4d %s : ", f, fUnfinished ? "-" : "+" );
585#ifndef ABC_USE_EXT_SOLVERS
586 Abc_Print( 1, "Var =%8.0f. ", (double)satoko_varnum(p->pSats[0]) );
587 Abc_Print( 1, "Cla =%9.0f. ", (double)satoko_clausenum(p->pSats[0]) );
588 Abc_Print( 1, "Learn =%9.0f. ",(double)satoko_learntnum(p->pSats[0]) );
589 Abc_Print( 1, "Conf =%9.0f. ", (double)satoko_conflictnum(p->pSats[0]) );
590#else
591 Abc_Print( 1, "Var =%8.0f. ", (double)p->nSatVars );
592 Abc_Print( 1, "Cla =%9.0f. ", (double)nClauses );
593#endif
594 if ( p->pPars->nProcs > 1 )
595 Abc_Print( 1, "S = %3d. ", Solver );
596 Abc_Print( 1, "%4.0f MB", 1.0*((int)Gia_ManMemory(p->pFrames) + Vec_IntMemory(&p->vFr2Sat))/(1<<20) );
597 Abc_Print( 1, "%9.2f sec ", (float)(Abc_Clock() - clkStart)/(float)(CLOCKS_PER_SEC) );
598 printf( "\n" );
599 fflush( stdout );
600}
602{
603 abctime clkTotal = p->timeUnf + p->timeCnf + p->timeSat + p->timeOth;
604 if ( !p->pPars->fVerbose )
605 return;
606 ABC_PRTP( "Unfolding ", p->timeUnf, clkTotal );
607 ABC_PRTP( "CNF generation", p->timeCnf, clkTotal );
608 ABC_PRTP( "SAT solving ", p->timeSat, clkTotal );
609 ABC_PRTP( "Other ", p->timeOth, clkTotal );
610 ABC_PRTP( "TOTAL ", clkTotal , clkTotal );
611}
612Abc_Cex_t * Bmcs_ManGenerateCex( Bmcs_Man_t * p, int i, int f, int s )
613{
614 Abc_Cex_t * pCex = Abc_CexMakeTriv( Gia_ManRegNum(p->pGia), Gia_ManPiNum(p->pGia), Gia_ManPoNum(p->pGia), f*Gia_ManPoNum(p->pGia)+i );
615 Gia_Obj_t * pObj; int k;
616 Gia_ManForEachPi( p->pFrames, pObj, k )
617 {
618 int iSatVar = Vec_IntEntry( &p->vFr2Sat, Gia_ObjId(p->pFrames, pObj) );
619 if ( iSatVar > 0 && bmc_sat_solver_read_cex_varvalue(p->pSats[s], iSatVar) ) // 1 bit
620 {
621 int iCiId = Vec_IntEntry( &p->vCiMap, 2*k+0 );
622 int iFrame = Vec_IntEntry( &p->vCiMap, 2*k+1 );
623 Abc_InfoSetBit( pCex->pData, Gia_ManRegNum(p->pGia) + iFrame * Gia_ManPiNum(p->pGia) + iCiId );
624 }
625 }
626 return pCex;
627}
629{
630 int i;
631 for ( i = p->nSatVarsOld; i < p->nSatVars; i++ )
632 bmc_sat_solver_addvar( pSat );
633 for ( i = 0; i < pCnf->nClauses; i++ )
634 if ( !bmc_sat_solver_addclause( pSat, pCnf->pClauses[i], pCnf->pClauses[i+1]-pCnf->pClauses[i] ) )
635 assert( 0 );
636}
638{
639 abctime clkStart = Abc_Clock();
640 Bmcs_Man_t * p = Bmcs_ManStart( pGia, pPars );
641 int f, k = 0, i = Gia_ManPoNum(pGia), status, RetValue = -1, nClauses = 0;
642 Abc_CexFreeP( &pGia->pCexSeq );
643 for ( f = 0; !pPars->nFramesMax || f < pPars->nFramesMax; f += pPars->nFramesAdd )
644 {
645 Cnf_Dat_t * pCnf = Bmcs_ManAddNewCnf( p, f, pPars->nFramesAdd );
646 if ( pCnf == NULL )
647 {
648 Bmcs_ManPrintFrame( p, f, nClauses, -1, clkStart );
649 if( pPars->pFuncOnFrameDone)
650 for ( k = 0; k < pPars->nFramesAdd; k++ )
651 for ( i = 0; i < Gia_ManPoNum(pGia); i++ )
652 pPars->pFuncOnFrameDone(f+k, i, 0);
653 continue;
654 }
655 nClauses += pCnf->nClauses;
656 Bmcs_ManAddCnf( p, p->pSats[0], pCnf );
657 p->nSatVarsOld = p->nSatVars;
658 Cnf_DataFree( pCnf );
659 assert( Gia_ManPoNum(p->pFrames) == (f + pPars->nFramesAdd) * Gia_ManPoNum(pGia) );
660 for ( k = 0; k < pPars->nFramesAdd; k++ )
661 {
662 for ( i = 0; i < Gia_ManPoNum(pGia); i++ )
663 {
664 abctime clk = Abc_Clock();
665 int iObj = Gia_ObjId( p->pFrames, Gia_ManCo(p->pFrames, (f+k) * Gia_ManPoNum(pGia) + i) );
666 int iLit = Abc_Var2Lit( Vec_IntEntry(&p->vFr2Sat, iObj), 0 );
667 if ( pPars->nTimeOut && (Abc_Clock() - clkStart)/CLOCKS_PER_SEC >= pPars->nTimeOut )
668 break;
669 status = bmc_sat_solver_solve( p->pSats[0], &iLit, 1 );
670 p->timeSat += Abc_Clock() - clk;
671 if ( status == l_False ) // unsat
672 {
673 if ( i == Gia_ManPoNum(pGia)-1 )
674 Bmcs_ManPrintFrame( p, f+k, nClauses, -1, clkStart );
675 if( pPars->pFuncOnFrameDone)
676 pPars->pFuncOnFrameDone(f+k, i, 0);
677 continue;
678 }
679 if ( status == l_True ) // sat
680 {
681 RetValue = 0;
682 pPars->iFrame = f+k;
683 pGia->pCexSeq = Bmcs_ManGenerateCex( p, i, f+k, 0 );
684 pPars->nFailOuts++;
685 Bmcs_ManPrintFrame( p, f+k, nClauses, -1, clkStart );
686 if ( !pPars->fNotVerbose )
687 {
688 int nOutDigits = Abc_Base10Log( Gia_ManPoNum(pGia) );
689 Abc_Print( 1, "Output %*d was asserted in frame %2d (solved %*d out of %*d outputs). ",
690 nOutDigits, i, f+k, nOutDigits, pPars->nFailOuts, nOutDigits, Gia_ManPoNum(pGia) );
691 fflush( stdout );
692 }
693 if( pPars->pFuncOnFrameDone)
694 pPars->pFuncOnFrameDone(f+k, i, 1);
695 }
696 break;
697 }
698 if ( i < Gia_ManPoNum(pGia) || f+k == pPars->nFramesMax-1 )
699 break;
700 }
701 if ( k < pPars->nFramesAdd )
702 break;
703 }
704 p->timeOth = Abc_Clock() - clkStart - p->timeUnf - p->timeCnf - p->timeSat;
705 if ( RetValue == -1 && !pPars->fNotVerbose )
706 printf( "No output failed in %d frames. ", f + (k < pPars->nFramesAdd ? k+1 : 0) );
707 Abc_PrintTime( 1, "Time", Abc_Clock() - clkStart );
709 Bmcs_ManStop( p );
710 return RetValue;
711}
712
713
714
726#ifndef ABC_USE_PTHREADS
727
728int Bmcs_ManPerformMulti( Gia_Man_t * pGia, Bmc_AndPar_t * pPars ) { return Bmcs_ManPerformOne(pGia, pPars); }
729
730#else // pthreads are used
731
732
733typedef struct Par_ThData_t_
734{
735 bmc_sat_solver * pSat;
736 int iLit;
737 int iThread;
738 int fWorking;
739 int status;
740} Par_ThData_t;
741
742void * Bmcs_ManWorkerThread( void * pArg )
743{
744 Par_ThData_t * pThData = (Par_ThData_t *)pArg;
745 volatile int * pPlace = &pThData->fWorking;
746 while ( 1 )
747 {
748 while ( *pPlace == 0 );
749 assert( pThData->fWorking );
750 if ( pThData->pSat == NULL )
751 {
752 pthread_exit( NULL );
753 assert( 0 );
754 return NULL;
755 }
756
757 pThData->status = bmc_sat_solver_solve( pThData->pSat, &pThData->iLit, 1 );
758
759 //printf( "Thread %d finished with status %d\n", pThData->iThread, pThData->status );
760
761 pThData->fWorking = 0;
762 }
763 assert( 0 );
764 return NULL;
765}
766
767int Bmcs_ManPerform_Solve( Bmcs_Man_t * p, int iLit, pthread_t * WorkerThread, Par_ThData_t * ThData, int nProcs, int * pSolver )
768{
769 int i, status = -1;
770 // set new problem
771 for ( i = 0; i < nProcs; i++ )
772 {
773 ThData[i].iLit = iLit;
774 assert( ThData[i].fWorking == 0 );
775 }
776 // start solvers on a new problem
777 for ( i = 0; i < nProcs; i++ )
778 ThData[i].fWorking = 1;
779 // check if any of the solvers finished
780 while ( i == nProcs )
781 {
782 for ( i = 0; i < nProcs; i++ )
783 {
784 if ( ThData[i].fWorking )
785 continue;
786 // set stop request
787 p->fStopNow = 1;
788 // remember status
789 status = ThData[i].status;
790 //printf( "Solver %d returned status %d.\n", i, status );
791 *pSolver = i;
792 break;
793 }
794 }
795 // wait till threads finish
796 while ( i < nProcs )
797 {
798 for ( i = 0; i < nProcs; i++ )
799 if ( ThData[i].fWorking )
800 break;
801 }
802 for ( i = 0; i < nProcs; i++ )
803 {
804 ThData[i].iLit = -1;
805 assert( ThData[i].fWorking == 0 );
806 }
807 // reset stop request
808 p->fStopNow = 0;
809 return status;
810}
811
812int Bmcs_ManPerformMulti( Gia_Man_t * pGia, Bmc_AndPar_t * pPars )
813{
814 abctime clkStart = Abc_Clock();
815 pthread_t WorkerThread[PAR_THR_MAX];
816 Par_ThData_t ThData[PAR_THR_MAX];
817 Bmcs_Man_t * p = Bmcs_ManStart( pGia, pPars );
818 int f, k = 0, i = Gia_ManPoNum(pGia), status, RetValue = -1, nClauses = 0, Solver = 0;
819 Abc_CexFreeP( &pGia->pCexSeq );
820 // start threads
821 for ( i = 0; i < pPars->nProcs; i++ )
822 {
823 ThData[i].pSat = p->pSats[i];
824 ThData[i].iLit = -1;
825 ThData[i].iThread = i;
826 ThData[i].fWorking = 0;
827 ThData[i].status = -1;
828 status = pthread_create( WorkerThread + i, NULL, Bmcs_ManWorkerThread, (void *)(ThData + i) ); assert( status == 0 );
829 }
830 // solve properties in each timeframe
831 for ( f = 0; !pPars->nFramesMax || f < pPars->nFramesMax; f += pPars->nFramesAdd )
832 {
833 Cnf_Dat_t * pCnf = Bmcs_ManAddNewCnf( p, f, pPars->nFramesAdd );
834 if ( pCnf == NULL )
835 {
836 Bmcs_ManPrintFrame( p, f, nClauses, 0, clkStart );
837 if( pPars->pFuncOnFrameDone )
838 for ( k = 0; k < pPars->nFramesAdd; k++ )
839 for ( i = 0; i < Gia_ManPoNum(pGia); i++ )
840 pPars->pFuncOnFrameDone(f+k, i, 0);
841 continue;
842 }
843 // load CNF into solvers
844 nClauses += pCnf->nClauses;
845 for ( i = 0; i < pPars->nProcs; i++ )
846 Bmcs_ManAddCnf( p, p->pSats[i], pCnf );
847 p->nSatVarsOld = p->nSatVars;
848 Cnf_DataFree( pCnf );
849 // solve outputs
850 assert( Gia_ManPoNum(p->pFrames) == (f + pPars->nFramesAdd) * Gia_ManPoNum(pGia) );
851 for ( k = 0; k < pPars->nFramesAdd; k++ )
852 {
853 for ( i = 0; i < Gia_ManPoNum(pGia); i++ )
854 {
855 abctime clk = Abc_Clock();
856 int iObj = Gia_ObjId( p->pFrames, Gia_ManCo(p->pFrames, (f+k) * Gia_ManPoNum(pGia) + i) );
857 int iLit = Abc_Var2Lit( Vec_IntEntry(&p->vFr2Sat, iObj), 0 );
858 if ( pPars->nTimeOut && (Abc_Clock() - clkStart)/CLOCKS_PER_SEC >= pPars->nTimeOut )
859 break;
860 status = Bmcs_ManPerform_Solve( p, iLit, WorkerThread, ThData, pPars->nProcs, &Solver );
861 p->timeSat += Abc_Clock() - clk;
862 if ( status == l_False ) // unsat
863 {
864 if ( i == Gia_ManPoNum(pGia)-1 )
865 Bmcs_ManPrintFrame( p, f+k, nClauses, Solver, clkStart );
866 if( pPars->pFuncOnFrameDone )
867 pPars->pFuncOnFrameDone(f+k, i, 0);
868 continue;
869 }
870 if ( status == l_True ) // sat
871 {
872 RetValue = 0;
873 pPars->iFrame = f+k;
874 pGia->pCexSeq = Bmcs_ManGenerateCex( p, i, f+k, Solver );
875 pPars->nFailOuts++;
876 Bmcs_ManPrintFrame( p, f+k, nClauses, Solver, clkStart );
877 if ( !pPars->fNotVerbose )
878 {
879 int nOutDigits = Abc_Base10Log( Gia_ManPoNum(pGia) );
880 Abc_Print( 1, "Output %*d was asserted in frame %2d (solved %*d out of %*d outputs). ",
881 nOutDigits, i, f+k, nOutDigits, pPars->nFailOuts, nOutDigits, Gia_ManPoNum(pGia) );
882 fflush( stdout );
883 }
884 if( pPars->pFuncOnFrameDone )
885 pPars->pFuncOnFrameDone(f+k, i, 1);
886 }
887 break;
888 }
889 if ( i < Gia_ManPoNum(pGia) || f+k == pPars->nFramesMax-1 )
890 break;
891 }
892 if ( k < pPars->nFramesAdd )
893 break;
894 }
895 // stop threads
896 for ( i = 0; i < pPars->nProcs; i++ )
897 {
898 assert( !ThData[i].fWorking );
899 ThData[i].pSat = NULL;
900 ThData[i].fWorking = 1;
901 }
902 p->timeOth = Abc_Clock() - clkStart - p->timeUnf - p->timeCnf - p->timeSat;
903 if ( RetValue == -1 && !pPars->fNotVerbose )
904 printf( "No output failed in %d frames. ", f + (k < pPars->nFramesAdd ? k+1 : 0) );
905 Abc_PrintTime( 1, "Time", Abc_Clock() - clkStart );
907 Bmcs_ManStop( p );
908 return RetValue;
909}
910
911#endif // pthreads are used
912
913
926{
927 assert( pPars->nProcs < PAR_THR_MAX );
928 if ( pPars->nProcs == 1 )
929 return Bmcs_ManPerformOne( pGia, pPars );
930 else
931 return Bmcs_ManPerformMulti( pGia, pPars );
932}
933
937
938
940
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_FALLOC(type, num)
Definition abc_global.h:266
#define ABC_PRTP(a, t, T)
Definition abc_global.h:258
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
#define PAR_THR_MAX
DECLARATIONS ///.
Definition bmcBmcG.c:31
Gia_Man_t * Bmc_SuperBuildTents(Gia_Man_t *p, Vec_Int_t **pvMap)
Definition bmcBmcS.c:143
int Bmcs_ManUnfold_rec(Bmcs_Man_t *p, int iObj, int f)
Definition bmcBmcS.c:431
#define bmc_sat_solver_solve
Definition bmcBmcS.c:42
#define bmc_sat_solver_addclause
Definition bmcBmcS.c:40
void Gia_ManCountTents_rec(Gia_Man_t *p, int iObj, Vec_Int_t *vRoots)
Definition bmcBmcS.c:253
Cnf_Dat_t * Bmcs_ManAddNewCnf(Bmcs_Man_t *p, int f, int nFramesAdd)
Definition bmcBmcS.c:537
#define bmc_sat_solver_setstop
Definition bmcBmcS.c:44
int Bmcs_ManPerform(Gia_Man_t *pGia, Bmc_AndPar_t *pPars)
Definition bmcBmcS.c:925
#define bmc_sat_solver_start(type)
Definition bmcBmcS.c:38
#define PAR_THR_MAX
DECLARATIONS ///.
Definition bmcBmcS.c:67
Bmcs_Man_t * Bmcs_ManStart(Gia_Man_t *pGia, Bmc_AndPar_t *pPars)
Definition bmcBmcS.c:365
int Gia_ManCountRanks(Gia_Man_t *p)
Definition bmcBmcS.c:325
Abc_Cex_t * Bmcs_ManGenerateCex(Bmcs_Man_t *p, int i, int f, int s)
Definition bmcBmcS.c:612
struct Bmcs_Man_t_ Bmcs_Man_t
Definition bmcBmcS.c:69
void Bmcs_ManPrintFrame(Bmcs_Man_t *p, int f, int nClauses, int Solver, abctime clkStart)
Definition bmcBmcS.c:579
#define bmc_sat_solver_stop
Definition bmcBmcS.c:39
void Bmcs_ManPrintTime(Bmcs_Man_t *p)
Definition bmcBmcS.c:601
#define bmc_sat_solver_addvar(s)
Definition bmcBmcS.c:41
#define bmc_sat_solver_read_cex_varvalue
Definition bmcBmcS.c:43
int Bmcs_ManPerformOne(Gia_Man_t *pGia, Bmc_AndPar_t *pPars)
Definition bmcBmcS.c:637
void Bmcs_ManStop(Bmcs_Man_t *p)
Definition bmcBmcS.c:404
void Gia_ManCountRanks_rec(Gia_Man_t *p, int iObj, Vec_Int_t *vRoots, Vec_Int_t *vRanks, Vec_Int_t *vCands, int Rank)
Definition bmcBmcS.c:303
#define l_True
Definition bmcBmcS.c:35
int Bmcs_ManCollect_rec(Bmcs_Man_t *p, int iObj)
Definition bmcBmcS.c:467
#define bmc_sat_solver
Definition bmcBmcS.c:37
#define l_False
Definition bmcBmcS.c:36
void Bmc_SuperBuildTents_rec(Gia_Man_t *p, int iObj, Vec_Int_t *vIns, Vec_Int_t *vCuts, Vec_Int_t *vFlops, Vec_Int_t *vObjs, Vec_Int_t *vRankIns, Vec_Int_t *vRankCuts, int Rank)
FUNCTION DEFINITIONS ///.
Definition bmcBmcS.c:107
void Bmcs_ManAddCnf(Bmcs_Man_t *p, bmc_sat_solver *pSat, Cnf_Dat_t *pCnf)
Definition bmcBmcS.c:628
int Bmcs_ManPerformMulti(Gia_Man_t *pGia, Bmc_AndPar_t *pPars)
Definition bmcBmcS.c:728
Gia_Man_t * Bmcs_ManUnfold(Bmcs_Man_t *p, int f, int nFramesAdd)
Definition bmcBmcS.c:491
int Gia_ManCountTents(Gia_Man_t *p)
Definition bmcBmcS.c:270
struct Bmc_AndPar_t_ Bmc_AndPar_t
Definition bmc.h:143
struct Cnf_Dat_t_ Cnf_Dat_t
Definition cnf.h:52
void Cnf_DataFree(Cnf_Dat_t *p)
Definition cnfMan.c:207
Cube * p
Definition exorList.c:222
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
void Gia_ManHashStart(Gia_Man_t *p)
Definition giaHash.c:125
double Gia_ManMemory(Gia_Man_t *p)
Definition giaMan.c:194
#define Gia_ManForEachPo(p, pObj, i)
Definition gia.h:1250
void Gia_ManStopP(Gia_Man_t **p)
Definition giaMan.c:224
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition giaMan.c:764
#define Gia_ManForEachPi(p, pObj, i)
Definition gia.h:1248
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
Definition giaMan.c:57
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
void Gia_ManFillValue(Gia_Man_t *p)
Definition giaUtil.c:369
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
#define Gia_ManForEachObj1(p, pObj, i)
Definition gia.h:1192
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
Definition gia.h:1194
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
Definition giaScl.c:84
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition giaHash.c:576
void Gia_ManIncrementTravId(Gia_Man_t *p)
Definition giaUtil.c:190
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
Definition gia.h:1190
void Gia_ManCleanMark01(Gia_Man_t *p)
Definition giaUtil.c:218
void * Mf_ManGenerateCnf(Gia_Man_t *pGia, int nLutSize, int fCnfObjIds, int fAddOrCla, int fMapping, int fVerbose)
Definition giaMf.c:1877
int satoko_varnum(satoko_t *)
Definition solver_api.c:625
int satoko_conflictnum(satoko_t *)
Definition solver_api.c:640
struct satoko_opts satoko_opts_t
Definition satoko.h:37
void satoko_default_opts(satoko_opts_t *)
Definition solver_api.c:161
int satoko_clausenum(satoko_t *)
Definition solver_api.c:630
int satoko_learntnum(satoko_t *)
Definition solver_api.c:635
void satoko_configure(satoko_t *, satoko_opts_t *)
Definition solver_api.c:196
int nFramesAdd
Definition bmc.h:148
int nFramesMax
Definition bmc.h:147
int fNotVerbose
Definition bmc.h:161
int nTimeOut
Definition bmc.h:150
int iFrame
Definition bmc.h:162
int nFailOuts
Definition bmc.h:163
void(* pFuncOnFrameDone)(int, int, int)
Definition bmc.h:166
int nProcs
Definition bmc.h:152
int nConfLimit
Definition bmc.h:149
abctime timeOth
Definition bmcBmcS.c:86
Vec_Int_t vFr2Sat
Definition bmcBmcS.c:77
abctime timeSat
Definition bmcBmcS.c:85
Bmc_AndPar_t * pPars
Definition bmcBmcS.c:72
Gia_Man_t * pFrames
Definition bmcBmcS.c:74
bmc_sat_solver * pSats[PAR_THR_MAX]
Definition bmcBmcS.c:79
Vec_Int_t vCiMap
Definition bmcBmcS.c:78
int nSatVars
Definition bmcBmcS.c:80
int fStopNow
Definition bmcBmcS.c:82
Gia_Man_t * pClean
Definition bmcBmcS.c:75
abctime timeUnf
Definition bmcBmcS.c:83
int nSatVarsOld
Definition bmcBmcS.c:81
Vec_Ptr_t vGia2Fr
Definition bmcBmcS.c:76
abctime timeCnf
Definition bmcBmcS.c:84
Gia_Man_t * pGia
Definition bmcBmcS.c:73
int * pObj2Count
Definition cnf.h:65
int nLiterals
Definition cnf.h:60
int ** pClauses
Definition cnf.h:62
int nClauses
Definition cnf.h:61
char * pSpec
Definition gia.h:100
Abc_Cex_t * pCexSeq
Definition gia.h:150
char * pName
Definition gia.h:99
unsigned fMark1
Definition gia.h:86
unsigned Value
Definition gia.h:89
unsigned fMark0
Definition gia.h:81
double f_rst
Definition satoko.h:44
float garbage_max_ratio
Definition satoko.h:67
double b_rst
Definition satoko.h:45
long conf_limit
Definition satoko.h:40
void Abc_CexFreeP(Abc_Cex_t **p)
Definition utilCex.c:361
Abc_Cex_t * Abc_CexMakeTriv(int nRegs, int nTruePis, int nTruePos, int iFrameOut)
Definition utilCex.c:85
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Definition utilCex.h:39
#define assert(ex)
Definition util_old.h:213
#define Vec_IntForEachEntryTwo(vVec1, vVec2, Entry1, Entry2, i)
Definition vecInt.h:66
#define Vec_IntForEachEntryStartStop(vVec, Entry, i, Start, Stop)
Definition vecInt.h:60
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42