ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
giaSatLE.c File Reference
#include "gia.h"
#include "misc/extra/extra.h"
#include "misc/tim/tim.h"
#include "sat/bsat/satStore.h"
Include dependency graph for giaSatLE.c:

Go to the source code of this file.

Classes

struct  Sle_Man_t_
 

Macros

#define Sle_ForEachCut(pList, pCut, i)
 
#define Sle_ForEachCut1(pList, pCut, i)
 

Typedefs

typedef struct Sle_Man_t_ Sle_Man_t
 

Functions

int Sle_ManCutMerge (Gia_Man_t *p, int iObj, Vec_Int_t *vCuts, Vec_Int_t *vTemp, int nLutSize)
 
Vec_Int_tSle_ManComputeCuts (Gia_Man_t *p, int nLutSize, int fVerbose)
 
int Sle_ManComputeDelayCut (Gia_Man_t *p, int *pCut, Vec_Int_t *vTime)
 
int Sle_ManComputeDelayOne (Gia_Man_t *p, int iObj, Vec_Int_t *vCuts, Vec_Int_t *vTime)
 
int Sle_ManComputeDelay (Gia_Man_t *p, Vec_Int_t *vCuts)
 
void Sle_ManPrintCut (int *pCut)
 
void Sle_ManPrintCuts (Gia_Man_t *p, Vec_Int_t *vCuts, int iObj)
 
void Sle_ManPrintCutsAll (Gia_Man_t *p, Vec_Int_t *vCuts)
 
void Sle_ManComputeCutsTest (Gia_Man_t *p)
 
Vec_Bit_tSle_ManInternalNodeMask (Gia_Man_t *pGia)
 
int Sle_ManCutHasPisOnly (int *pCut, Vec_Bit_t *vMask)
 
void Sle_ManCollectCutFaninsOne (Gia_Man_t *pGia, int iObj, Vec_Int_t *vCuts, Vec_Bit_t *vMask, Vec_Int_t *vCutFanins, Vec_Bit_t *vMap)
 
Vec_Wec_tSle_ManCollectCutFanins (Gia_Man_t *pGia, Vec_Int_t *vCuts, Vec_Bit_t *vMask)
 
Sle_Man_tSle_ManAlloc (Gia_Man_t *pGia, int nLevels, int fVerbose)
 
void Sle_ManStop (Sle_Man_t *p)
 
void Sle_ManMarkupVariables (Sle_Man_t *p)
 
void Sle_ManDeriveInit (Sle_Man_t *p)
 
void Sle_ManDeriveCnf (Sle_Man_t *p, int nBTLimit, int fDynamic)
 
int Sle_ManAddEdgeConstraints (Sle_Man_t *p, int nEdges)
 
void Sle_ManDeriveResult (Sle_Man_t *p, Vec_Int_t *vEdge2, Vec_Int_t *vMapping)
 
void Sle_ManExplore (Gia_Man_t *pGia, int nBTLimit, int DelayInit, int fDynamic, int fTwoEdges, int fVerbose)
 

Macro Definition Documentation

◆ Sle_ForEachCut

#define Sle_ForEachCut ( pList,
pCut,
i )
Value:
for ( i = 0, pCut = pList + 1; i < pList[0]; i++, pCut += Sle_CutSize(pCut) + 1 )

Definition at line 43 of file giaSatLE.c.

◆ Sle_ForEachCut1

#define Sle_ForEachCut1 ( pList,
pCut,
i )
Value:
for ( i = 0, pCut = pList + 1; i <= pList[0]; i++, pCut += Sle_CutSize(pCut) + 1 )

Definition at line 44 of file giaSatLE.c.

Typedef Documentation

◆ Sle_Man_t

typedef struct Sle_Man_t_ Sle_Man_t

Definition at line 401 of file giaSatLE.c.

Function Documentation

◆ Sle_ManAddEdgeConstraints()

int Sle_ManAddEdgeConstraints ( Sle_Man_t * p,
int nEdges )

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

Synopsis [Add edge compatibility constraints.]

Description [Returns 1 if constraints have been added.]

SideEffects []

SeeAlso []

Definition at line 806 of file giaSatLE.c.

807{
808 Vec_Int_t * vArray;
809 Vec_Int_t * vTemp = Vec_IntAlloc( 100 );
810 int value, iObj, nAdded = 0;
811 assert( nEdges == 1 || nEdges == 2 );
812 Vec_WecForEachLevel( p->vFanoutEdges, vArray, iObj )
813 {
814 int j, k, EdgeJ, EdgeK;
815 // check if they are incompatible
816 Vec_IntClear( vTemp );
817 Vec_IntForEachEntry( vArray, EdgeJ, j )
818 if ( sat_solver_var_value(p->pSat, EdgeJ) )
819 Vec_IntPush( vTemp, EdgeJ );
820 if ( Vec_IntSize(vTemp) <= nEdges )
821 continue;
822 nAdded++;
823 if ( nEdges == 1 )
824 {
825 // generate pairs
826 Vec_IntForEachEntry( vTemp, EdgeJ, j )
827 Vec_IntForEachEntryStart( vTemp, EdgeK, k, j+1 )
828 {
829 Vec_IntFillTwo( p->vLits, 2, Abc_Var2Lit(EdgeJ, 1), Abc_Var2Lit(EdgeK, 1) );
830 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
831 assert( value );
832 }
833 p->nEdgeClas2 += Vec_IntSize(vTemp) * (Vec_IntSize(vTemp) - 1) / 2;
834 }
835 else if ( nEdges == 2 )
836 {
837 int m, EdgeM;
838 // generate triples
839 Vec_IntForEachEntry( vTemp, EdgeJ, j )
840 Vec_IntForEachEntryStart( vTemp, EdgeK, k, j+1 )
841 Vec_IntForEachEntryStart( vTemp, EdgeM, m, k+1 )
842 {
843 Vec_IntFillTwo( p->vLits, 2, Abc_Var2Lit(EdgeJ, 1), Abc_Var2Lit(EdgeK, 1) );
844 Vec_IntPush( p->vLits, Abc_Var2Lit(EdgeM, 1) );
845 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
846 assert( value );
847 }
848 p->nEdgeClas2 += Vec_IntSize(vTemp) * (Vec_IntSize(vTemp) - 1) * (Vec_IntSize(vTemp) - 2) / 6;
849 }
850 else assert( 0 );
851 }
852 Vec_IntFree( vTemp );
853 //printf( "Added clauses to %d nodes.\n", nAdded );
854 return nAdded;
855}
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
ABC_NAMESPACE_IMPL_START typedef signed char value
#define sat_solver_addclause
Definition cecSatG2.c:37
Cube * p
Definition exorList.c:222
#define assert(ex)
Definition util_old.h:213
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
Definition vecInt.h:56
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
Definition vecWec.h:55
Here is the caller graph for this function:

◆ Sle_ManAlloc()

Sle_Man_t * Sle_ManAlloc ( Gia_Man_t * pGia,
int nLevels,
int fVerbose )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 450 of file giaSatLE.c.

451{
453 p->pGia = pGia;
454 p->nLevels = nLevels;
455 p->fVerbose = fVerbose;
456 p->vMask = Sle_ManInternalNodeMask( pGia );
457 p->vCuts = Sle_ManComputeCuts( pGia, 4, fVerbose );
458 p->vCutFanins = Sle_ManCollectCutFanins( pGia, p->vCuts, p->vMask );
459 p->vFanoutEdges = Vec_WecStart( Gia_ManObjNum(pGia) );
460 p->vEdgeCuts = Vec_WecAlloc( 100 );
461 p->vObjMap = Vec_IntStartFull( Gia_ManObjNum(pGia) );
462 p->vCutFirst = Vec_IntStartFull( Gia_ManObjNum(pGia) );
463 p->vEdgeFirst = Vec_IntStartFull( Gia_ManObjNum(pGia) );
464 p->vDelayFirst = Vec_IntStartFull( Gia_ManObjNum(pGia) );
465 p->vPolars = Vec_IntAlloc( 100 );
466 p->vLits = Vec_IntAlloc( 100 );
467 p->nLevels = Sle_ManComputeDelay( pGia, p->vCuts );
468 return p;
469}
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
struct Sle_Man_t_ Sle_Man_t
Definition giaSatLE.c:401
Vec_Bit_t * Sle_ManInternalNodeMask(Gia_Man_t *pGia)
Definition giaSatLE.c:331
int Sle_ManComputeDelay(Gia_Man_t *p, Vec_Int_t *vCuts)
Definition giaSatLE.c:262
Vec_Wec_t * Sle_ManCollectCutFanins(Gia_Man_t *pGia, Vec_Int_t *vCuts, Vec_Bit_t *vMask)
Definition giaSatLE.c:389
Vec_Int_t * Sle_ManComputeCuts(Gia_Man_t *p, int nLutSize, int fVerbose)
Definition giaSatLE.c:205
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sle_ManCollectCutFanins()

Vec_Wec_t * Sle_ManCollectCutFanins ( Gia_Man_t * pGia,
Vec_Int_t * vCuts,
Vec_Bit_t * vMask )

Definition at line 389 of file giaSatLE.c.

390{
391 int iObj;
392 Vec_Bit_t * vMap = Vec_BitStart( Gia_ManObjNum(pGia) );
393 Vec_Wec_t * vCutFanins = Vec_WecStart( Gia_ManObjNum(pGia) );
394 Gia_ManForEachAndId( pGia, iObj )
395 Sle_ManCollectCutFaninsOne( pGia, iObj, vCuts, vMask, Vec_WecEntry(vCutFanins, iObj), vMap );
396 Vec_BitFree( vMap );
397 return vCutFanins;
398}
void Sle_ManCollectCutFaninsOne(Gia_Man_t *pGia, int iObj, Vec_Int_t *vCuts, Vec_Bit_t *vMask, Vec_Int_t *vCutFanins, Vec_Bit_t *vMap)
Definition giaSatLE.c:371
#define Gia_ManForEachAndId(p, i)
Definition gia.h:1216
typedefABC_NAMESPACE_HEADER_START struct Vec_Bit_t_ Vec_Bit_t
INCLUDES ///.
Definition vecBit.h:42
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition vecWec.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sle_ManCollectCutFaninsOne()

void Sle_ManCollectCutFaninsOne ( Gia_Man_t * pGia,
int iObj,
Vec_Int_t * vCuts,
Vec_Bit_t * vMask,
Vec_Int_t * vCutFanins,
Vec_Bit_t * vMap )

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

Synopsis [Derive cut fanins of each node.]

Description [These are nodes that are fanins of some cut of this node.]

SideEffects []

SeeAlso []

Definition at line 371 of file giaSatLE.c.

372{
373 int i, iFanin, * pCut, * pList = Vec_IntEntryP( vCuts, Vec_IntEntry(vCuts, iObj) );
374 Sle_ForEachCut( pList, pCut, i )
375 {
376 int nSize = Sle_CutSize(pCut);
377 int k, * pC = Sle_CutLeaves(pCut);
378 assert( nSize > 1 );
379 for ( k = 0; k < nSize; k++ )
380 if ( Vec_BitEntry(vMask, pC[k]) && !Vec_BitEntry(vMap, pC[k]) )
381 {
382 Vec_BitWriteEntry( vMap, pC[k], 1 );
383 Vec_IntPush( vCutFanins, pC[k] );
384 }
385 }
386 Vec_IntForEachEntry( vCutFanins, iFanin, i )
387 Vec_BitWriteEntry( vMap, iFanin, 0 );
388}
#define Sle_ForEachCut(pList, pCut, i)
Definition giaSatLE.c:43
Here is the caller graph for this function:

◆ Sle_ManComputeCuts()

Vec_Int_t * Sle_ManComputeCuts ( Gia_Man_t * p,
int nLutSize,
int fVerbose )

Definition at line 205 of file giaSatLE.c.

206{
207 int i, iObj, nCuts = 0;
208 Vec_Int_t * vTemp = Vec_IntAlloc( 1000 );
209 Vec_Int_t * vCuts = Vec_IntAlloc( 30 * Gia_ManAndNum(p) );
210 assert( nLutSize <= 6 );
211 Vec_IntFill( vCuts, Gia_ManObjNum(p), 0 );
212 Gia_ManForEachCiId( p, iObj, i )
213 {
214 Vec_IntWriteEntry( vCuts, iObj, Vec_IntSize(vCuts) );
215 Vec_IntPush( vCuts, 0 );
216 Vec_IntPush( vCuts, Sle_CutSetSizeSign(1, 1<<(iObj % 28)) );
217 Vec_IntPush( vCuts, iObj );
218 }
219 Gia_ManForEachAndId( p, iObj )
220 nCuts += Sle_ManCutMerge( p, iObj, vCuts, vTemp, nLutSize );
221 if ( fVerbose )
222 printf( "Nodes = %d. Cuts = %d. Cuts/Node = %.2f. Ints/Node = %.2f. Mem = %.2f MB.\n",
223 Gia_ManAndNum(p), nCuts, 1.0*nCuts/Gia_ManAndNum(p),
224 1.0*(Vec_IntSize(vCuts)-Gia_ManObjNum(p))/Gia_ManAndNum(p),
225 1.0*Vec_IntMemory(vCuts) / (1<<20) );
226 Vec_IntFree( vTemp );
227 return vCuts;
228}
int Sle_ManCutMerge(Gia_Man_t *p, int iObj, Vec_Int_t *vCuts, Vec_Int_t *vTemp, int nLutSize)
Definition giaSatLE.c:170
#define Gia_ManForEachCiId(p, Id, i)
Definition gia.h:1230
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sle_ManComputeCutsTest()

void Sle_ManComputeCutsTest ( Gia_Man_t * p)

Definition at line 311 of file giaSatLE.c.

312{
313 Vec_Int_t * vCuts = Sle_ManComputeCuts( p, 4, 1 );
314 //Sle_ManPrintCutsAll( p, vCuts );
315 Vec_IntFree( vCuts );
316}
Here is the call graph for this function:

◆ Sle_ManComputeDelay()

int Sle_ManComputeDelay ( Gia_Man_t * p,
Vec_Int_t * vCuts )

Definition at line 262 of file giaSatLE.c.

263{
264 int iObj, Delay, DelayMax = 0;
265 Vec_Int_t * vTime = Vec_IntStart( Gia_ManObjNum(p) );
266 Gia_ManForEachAndId( p, iObj )
267 {
268 Delay = Sle_ManComputeDelayOne( p, iObj, vCuts, vTime );
269 DelayMax = Abc_MaxInt( DelayMax, Delay );
270 }
271 Vec_IntFree( vTime );
272 //printf( "Delay = %d.\n", DelayMax );
273 return DelayMax;
274}
int Sle_ManComputeDelayOne(Gia_Man_t *p, int iObj, Vec_Int_t *vCuts, Vec_Int_t *vTime)
Definition giaSatLE.c:250
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sle_ManComputeDelayCut()

int Sle_ManComputeDelayCut ( Gia_Man_t * p,
int * pCut,
Vec_Int_t * vTime )

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

Synopsis [Cut delay computation.]

Description []

SideEffects []

SeeAlso []

Definition at line 241 of file giaSatLE.c.

242{
243 int nSize = Sle_CutSize(pCut);
244 int k, * pC = Sle_CutLeaves(pCut);
245 int DelayMax = 0;
246 for ( k = 0; k < nSize; k++ )
247 DelayMax = Abc_MaxInt( DelayMax, Vec_IntEntry(vTime, pC[k]) );
248 return DelayMax + 1;
249}
Here is the caller graph for this function:

◆ Sle_ManComputeDelayOne()

int Sle_ManComputeDelayOne ( Gia_Man_t * p,
int iObj,
Vec_Int_t * vCuts,
Vec_Int_t * vTime )

Definition at line 250 of file giaSatLE.c.

251{
252 int i, * pCut, Delay, DelayMin = ABC_INFINITY;
253 int * pList = Vec_IntEntryP( vCuts, Vec_IntEntry(vCuts, iObj) );
254 Sle_ForEachCut( pList, pCut, i )
255 {
256 Delay = Sle_ManComputeDelayCut( p, pCut, vTime );
257 DelayMin = Abc_MinInt( DelayMin, Delay );
258 }
259 Vec_IntWriteEntry( vTime, iObj, DelayMin );
260 return DelayMin;
261}
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition abc_global.h:250
int Sle_ManComputeDelayCut(Gia_Man_t *p, int *pCut, Vec_Int_t *vTime)
Definition giaSatLE.c:241
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sle_ManCutHasPisOnly()

int Sle_ManCutHasPisOnly ( int * pCut,
Vec_Bit_t * vMask )

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

Synopsis [Check if the cut contains only primary inputs.]

Description []

SideEffects []

SeeAlso []

Definition at line 351 of file giaSatLE.c.

352{
353 int k, * pC = Sle_CutLeaves(pCut);
354 for ( k = 0; k < Sle_CutSize(pCut); k++ )
355 if ( Vec_BitEntry(vMask, pC[k]) ) // internal node
356 return 0;
357 return 1;
358}
Here is the caller graph for this function:

◆ Sle_ManCutMerge()

int Sle_ManCutMerge ( Gia_Man_t * p,
int iObj,
Vec_Int_t * vCuts,
Vec_Int_t * vTemp,
int nLutSize )

Definition at line 170 of file giaSatLE.c.

171{
172 Gia_Obj_t * pObj = Gia_ManObj( p, iObj );
173 int * pList0 = Vec_IntEntryP( vCuts, Vec_IntEntry(vCuts, Gia_ObjFaninId0(pObj, iObj)) );
174 int * pList1 = Vec_IntEntryP( vCuts, Vec_IntEntry(vCuts, Gia_ObjFaninId1(pObj, iObj)) );
175 int * pCut0, * pCut1, i, k, Cut[8], nCuts = 0;
176 Vec_IntFill( vTemp, 1, 0 );
177 Sle_ForEachCut1( pList0, pCut0, i )
178 Sle_ForEachCut1( pList1, pCut1, k )
179 {
180 if ( Sle_CutSize(pCut0) + Sle_CutSize(pCut1) > nLutSize && Sle_CutCountBits(Sle_CutSign(pCut0) | Sle_CutSign(pCut1)) > nLutSize )
181 continue;
182 if ( !Sle_CutMergeOrder(pCut0, pCut1, Cut, nLutSize) )
183 continue;
184 if ( Sle_SetLastCutIsContained(vTemp, Cut) )
185 continue;
186 Sle_SetAddCut( vTemp, Cut );
187 }
188 // reload
189 Vec_IntWriteEntry( vCuts, iObj, Vec_IntSize(vCuts) );
190 Vec_IntPush( vCuts, -1 );
191 pList0 = Vec_IntArray(vTemp);
192 Sle_ForEachCut( pList0, pCut0, i )
193 {
194 if ( !Sle_CutIsUsed(pCut0) )
195 continue;
196 Vec_IntPushArray( vCuts, pCut0, Sle_CutSize(pCut0)+1 );
197 nCuts++;
198 }
199 // add unit cut
200 Vec_IntPush( vCuts, Sle_CutSetSizeSign(1, 1<<(iObj % 28)) );
201 Vec_IntPush( vCuts, iObj );
202 Vec_IntWriteEntry( vCuts, Vec_IntEntry(vCuts, iObj), nCuts );
203 return nCuts;
204}
#define Sle_ForEachCut1(pList, pCut, i)
Definition giaSatLE.c:44
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
Here is the caller graph for this function:

◆ Sle_ManDeriveCnf()

void Sle_ManDeriveCnf ( Sle_Man_t * p,
int nBTLimit,
int fDynamic )

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

Synopsis [Derive CNF.]

Description []

SideEffects []

SeeAlso []

Definition at line 627 of file giaSatLE.c.

628{
629 int nTimeOut = 0;
630 int i, iObj, value;
631 Vec_Int_t * vArray;
632
633 // start the SAT solver
634 p->pSat = sat_solver_new();
635 sat_solver_setnvars( p->pSat, p->nVarsTotal );
636 sat_solver_set_resource_limits( p->pSat, nBTLimit, 0, 0, 0 );
637 sat_solver_set_runtime_limit( p->pSat, nTimeOut ? nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0 );
638 sat_solver_set_random( p->pSat, 1 );
639 sat_solver_set_polarity( p->pSat, Vec_IntArray(p->vPolars), Vec_IntSize(p->vPolars) );
640 //sat_solver_set_var_activity( p->pSat, NULL, p->nVarsTotal );
641
642 // set drivers to be mapped
643 Gia_ManForEachCoDriverId( p->pGia, iObj, i )
644 if ( Vec_BitEntry(p->vMask, iObj) ) // internal node
645 {
646 Vec_IntFill( p->vLits, 1, Abc_Var2Lit(iObj, 0) ); // pos lit
647 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
648 assert( value );
649 }
650
651 // add cover clauses and edge-to-cut clauses
652 Gia_ManForEachAndId( p->pGia, iObj )
653 {
654 int e, iEdge, nEdges = 0, Entry;
655 int iCutVar0 = Vec_IntEntry( p->vCutFirst, iObj );
656 int iEdgeVar0 = Vec_IntEntry( p->vEdgeFirst, iObj );
657 int * pCut, * pList = Sle_ManList( p, iObj );
658 Vec_Int_t * vCutFans = Vec_WecEntry( p->vCutFanins, iObj );
659 assert( iCutVar0 > 0 && iEdgeVar0 > 0 );
660 // node requires one of the cuts
661 Vec_IntFill( p->vLits, 1, Abc_Var2Lit(iObj, 1) ); // neg lit
662 for ( i = 0; i < Sle_ListCutNum(pList); i++ )
663 Vec_IntPush( p->vLits, Abc_Var2Lit(iCutVar0 + i, 0) );
664 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
665 assert( value );
666 // cuts are mutually exclusive
667 for ( i = 0; i < Sle_ListCutNum(pList); i++ )
668 for ( e = i+1; e < Sle_ListCutNum(pList); e++ )
669 {
670 Vec_IntFillTwo( p->vLits, 2, Abc_Var2Lit(iCutVar0 + i, 1), Abc_Var2Lit(iCutVar0 + e, 1) );
671 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
672 assert( value );
673 }
674 // cut requires fanin nodes
675 Vec_WecInit( p->vEdgeCuts, Vec_IntSize(vCutFans) );
676 Sle_ForEachCut( pList, pCut, i )
677 {
678 int nSize = Sle_CutSize(pCut);
679 int k, * pC = Sle_CutLeaves(pCut);
680 assert( nSize > 1 );
681 for ( k = 0; k < nSize; k++ )
682 {
683 if ( !Vec_BitEntry(p->vMask, pC[k]) )
684 continue;
685 Vec_IntFillTwo( p->vLits, 2, Abc_Var2Lit(iCutVar0 + i, 1), Abc_Var2Lit(pC[k], 0) );
686 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
687 assert( value );
688 // find the edge ID between pC[k] and iObj
689 iEdge = Vec_IntEntry(p->vObjMap, pC[k]);
690 if ( iEdge == -1 )
691 {
692 Vec_IntWriteEntry( p->vObjMap, pC[k], (iEdge = nEdges++) );
693 Vec_WecPush( p->vFanoutEdges, pC[k], iEdgeVar0 + iEdge );
694 }
695 Vec_WecPush( p->vEdgeCuts, iEdge, iCutVar0 + i );
696 p->nCutClas++;
697 }
698 // cut requires the node
699 Vec_IntFillTwo( p->vLits, 2, Abc_Var2Lit(iCutVar0 + i, 1), Abc_Var2Lit(iObj, 0) );
700 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
701 assert( value );
702 }
703 assert( nEdges == Vec_IntSize(vCutFans) );
704
705 // edge requires one of the fanout cuts
706 Vec_WecForEachLevel( p->vEdgeCuts, vArray, e )
707 {
708 assert( Vec_IntSize(vArray) > 0 );
709 Vec_IntFill( p->vLits, 1, Abc_Var2Lit(iEdgeVar0 + e, 1) ); // neg lit (edge)
710 Vec_IntForEachEntry( vArray, Entry, i )
711 Vec_IntPush( p->vLits, Abc_Var2Lit(Entry, 0) ); // pos lit (cut)
712 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
713 assert( value );
714 p->nEdgeClas++;
715 }
716
717 // clean object map
718 Vec_IntForEachEntry( vCutFans, Entry, i )
719 Vec_IntWriteEntry( p->vObjMap, Entry, -1 );
720 }
721
722 // mutual exclusivity of edges
723 Vec_WecForEachLevel( p->vFanoutEdges, vArray, iObj )
724 {
725 int j, k, EdgeJ, EdgeK;
726 int iEdgeVar0 = Vec_IntEntry( p->vEdgeFirst, iObj );
727 Vec_Int_t * vCutFans = Vec_WecEntry( p->vCutFanins, iObj );
728 // add fanin edges
729 for ( i = 0; i < Vec_IntSize(vCutFans); i++ )
730 Vec_IntPush( vArray, iEdgeVar0 + i );
731 // generate pairs
732 if ( fDynamic )
733 continue;
734 Vec_IntForEachEntry( vArray, EdgeJ, j )
735 Vec_IntForEachEntryStart( vArray, EdgeK, k, j+1 )
736 {
737 Vec_IntFillTwo( p->vLits, 2, Abc_Var2Lit(EdgeJ, 1), Abc_Var2Lit(EdgeK, 1) );
738 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
739 assert( value );
740 }
741 p->nEdgeClas2 += Vec_IntSize(vArray) * (Vec_IntSize(vArray) - 1) / 2;
742 }
743
744 // add delay clauses
745 Gia_ManForEachAndId( p->pGia, iObj )
746 {
747 int e, iFanin;
748 int iEdgeVar0 = Vec_IntEntry( p->vEdgeFirst, iObj );
749 int iDelayVar0 = Vec_IntEntry( p->vDelayFirst, iObj );
750 Vec_Int_t * vCutFans = Vec_WecEntry( p->vCutFanins, iObj );
751 // check if the node has cuts containing only primary inputs
752 int * pCut, * pList = Sle_ManList( p, iObj );
753 Sle_ForEachCut( pList, pCut, i )
754 if ( Sle_ManCutHasPisOnly(pCut, p->vMask) )
755 {
756 Vec_IntFill( p->vLits, 1, Abc_Var2Lit(iDelayVar0, 0) ); // pos lit
757// Vec_IntFillTwo( p->vLits, 2, Abc_Var2Lit(iObj, 1), Abc_Var2Lit(iDelayVar0, 0) );
758 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
759 assert( value );
760 break;
761 }
762// if ( i < Sle_ListCutNum(pList) )
763// continue;
764 // create delay requirements for each cut fanin of this node
765 Vec_IntForEachEntry( vCutFans, iFanin, e )
766 {
767 int d, iDelayVarIn = Vec_IntEntry( p->vDelayFirst, iFanin );
768 for ( d = 0; d < p->nLevels; d++ )
769 {
770 Vec_IntClear( p->vLits );
771 Vec_IntPush( p->vLits, Abc_Var2Lit(iObj, 1) );
772 Vec_IntPush( p->vLits, Abc_Var2Lit(iFanin, 1) );
773 Vec_IntPush( p->vLits, Abc_Var2Lit(iDelayVarIn + d, 1) );
774 Vec_IntPush( p->vLits, Abc_Var2Lit(iEdgeVar0 + e, 0) );
775 if ( d < p->nLevels-1 )
776 Vec_IntPush( p->vLits, Abc_Var2Lit(iDelayVar0 + d+1, 0) );
777 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
778 assert( value );
779
780 Vec_IntClear( p->vLits );
781 Vec_IntPush( p->vLits, Abc_Var2Lit(iObj, 1) );
782 Vec_IntPush( p->vLits, Abc_Var2Lit(iFanin, 1) );
783 Vec_IntPush( p->vLits, Abc_Var2Lit(iDelayVarIn + d, 1) );
784 if ( d < p->nLevels-1 )
785 Vec_IntPush( p->vLits, Abc_Var2Lit(iEdgeVar0 + e, 1) );
786 Vec_IntPush( p->vLits, Abc_Var2Lit(iDelayVar0 + d, 0) );
787 value = sat_solver_addclause( p->pSat, Vec_IntArray(p->vLits), Vec_IntLimit(p->vLits) );
788 assert( value );
789 }
790 p->nDelayClas += 2*p->nLevels;
791 }
792 }
793}
int Sle_ManCutHasPisOnly(int *pCut, Vec_Bit_t *vMask)
Definition giaSatLE.c:351
#define Gia_ManForEachCoDriverId(p, DriverId, i)
Definition gia.h:1246
sat_solver * sat_solver_new(void)
Definition satSolver.c:1137
void sat_solver_setnvars(sat_solver *s, int n)
Definition satSolver.c:1272
void sat_solver_set_resource_limits(sat_solver *s, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
Definition satSolver.c:2051
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sle_ManDeriveInit()

void Sle_ManDeriveInit ( Sle_Man_t * p)

Definition at line 555 of file giaSatLE.c.

556{
557 Vec_Int_t * vEdges;
558 int i, iObj, iFanin, iEdge;
559 if ( !Gia_ManHasMapping(p->pGia) )
560 return;
561 // derive initial state
562 Vec_IntClear( p->vPolars );
563 Gia_ManForEachAndId( p->pGia, iObj )
564 {
565 int nFanins, * pFanins, * pCut, * pList, iFound = -1;
566 if ( !Gia_ObjIsLut(p->pGia, iObj) )
567 continue;
568 Vec_IntPush( p->vPolars, iObj ); // node var
569 nFanins = Gia_ObjLutSize( p->pGia, iObj );
570 pFanins = Gia_ObjLutFanins( p->pGia, iObj );
571 // find cut
572 pList = Sle_ManList( p, iObj );
573 Sle_ForEachCut( pList, pCut, i )
574 if ( Sle_ManCheckContained( Sle_CutLeaves(pCut), Sle_CutSize(pCut), pFanins, nFanins ) )
575 {
576 iFound = i;
577 break;
578 }
579 if ( iFound == -1 )
580 {
581 printf( "Cannot find the following cut at node %d: {", iObj );
582 for ( i = 0; i < nFanins; i++ )
583 printf( " %d", pFanins[i] );
584 printf( " }\n" );
585 Sle_ManPrintCuts( p->pGia, p->vCuts, iObj );
586 fflush( stdout );
587 }
588 assert( iFound >= 0 );
589 Vec_IntPush( p->vPolars, Vec_IntEntry(p->vCutFirst, iObj) + iFound ); // cut var
590 // check if the cut contains only primary inputs - if so, its delay is equal to 1
591 if ( Sle_ManCutHasPisOnly(pCut, p->vMask) )
592 Vec_IntPush( p->vPolars, Vec_IntEntry(p->vDelayFirst, iObj) ); // delay var
593 }
594 Vec_IntSort( p->vPolars, 0 );
595 // find zero-delay edges
596 if ( !p->pGia->vEdge1 )
597 return;
598 vEdges = Gia_ManEdgeToArray( p->pGia );
599 Vec_IntForEachEntryDouble( vEdges, iFanin, iObj, i )
600 {
601 assert( iFanin < iObj );
602 assert( Gia_ObjIsLut(p->pGia, iFanin) );
603 assert( Gia_ObjIsLut(p->pGia, iObj) );
604 assert( Gia_ObjIsAnd(Gia_ManObj(p->pGia, iFanin)) );
605 assert( Gia_ObjIsAnd(Gia_ManObj(p->pGia, iObj)) );
606 // find edge
607 iEdge = Vec_IntFind( Vec_WecEntry(p->vCutFanins, iObj), iFanin );
608 if ( iEdge < 0 )
609 continue;
610 assert( iEdge >= 0 );
611 Vec_IntPush( p->vPolars, Vec_IntEntry(p->vEdgeFirst, iObj) + iEdge ); // edge
612 }
613 Vec_IntFree( vEdges );
614}
void Sle_ManPrintCuts(Gia_Man_t *p, Vec_Int_t *vCuts, int iObj)
Definition giaSatLE.c:296
Vec_Int_t * Gia_ManEdgeToArray(Gia_Man_t *p)
Definition giaEdge.c:88
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
Definition vecInt.h:72
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sle_ManDeriveResult()

void Sle_ManDeriveResult ( Sle_Man_t * p,
Vec_Int_t * vEdge2,
Vec_Int_t * vMapping )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 868 of file giaSatLE.c.

869{
870 Vec_Int_t * vMapTemp;
871 int iObj;
872 // create mapping
873 Vec_IntFill( vMapping, Gia_ManObjNum(p->pGia), 0 );
874 Gia_ManForEachAndId( p->pGia, iObj )
875 {
876 int i, iCut, iCutVar0 = Vec_IntEntry( p->vCutFirst, iObj );
877 int * pCut, * pCutThis = NULL, * pList = Sle_ManList( p, iObj );
878 if ( !sat_solver_var_value(p->pSat, iObj) )
879 continue;
880 Sle_ForEachCut( pList, pCut, iCut )
881 if ( sat_solver_var_value(p->pSat, iCutVar0 + iCut) )
882 {
883 assert( pCutThis == NULL );
884 pCutThis = pCut;
885 }
886 assert( pCutThis != NULL );
887 Vec_IntWriteEntry( vMapping, iObj, Vec_IntSize(vMapping) );
888 Vec_IntPush( vMapping, Sle_CutSize(pCutThis) );
889 for ( i = 0; i < Sle_CutSize(pCutThis); i++ )
890 Vec_IntPush( vMapping, Sle_CutLeaves(pCutThis)[i] );
891 Vec_IntPush( vMapping, iObj );
892 }
893 vMapTemp = p->pGia->vMapping;
894 p->pGia->vMapping = vMapping;
895 // collect edges
896 Vec_IntClear( vEdge2 );
897 Gia_ManForEachAndId( p->pGia, iObj )
898 {
899 int i, iFanin, iEdgeVar0 = Vec_IntEntry( p->vEdgeFirst, iObj );
900 Vec_Int_t * vCutFans = Vec_WecEntry( p->vCutFanins, iObj );
901 //int * pCut, * pList = Sle_ManList( p, iObj );
902 // int iCutVar0 = Vec_IntEntry( p->vCutFirst, iObj );
903 if ( !sat_solver_var_value(p->pSat, iObj) )
904 continue;
905 //for ( i = 0; i < Sle_ListCutNum(pList); i++ )
906 // printf( "%d", sat_solver_var_value(p->pSat, iCutVar0 + i) );
907 //printf( "\n" );
908 Vec_IntForEachEntry( vCutFans, iFanin, i )
909 if ( sat_solver_var_value(p->pSat, iFanin) && sat_solver_var_value(p->pSat, iEdgeVar0 + i) )
910 {
911 // verify edge
912 int * pFanins = Gia_ObjLutFanins( p->pGia, iObj );
913 int k, nFanins = Gia_ObjLutSize( p->pGia, iObj );
914 for ( k = 0; k < nFanins; k++ )
915 {
916 //printf( "%d ", pFanins[k] );
917 if ( pFanins[k] == iFanin )
918 break;
919 }
920 //printf( "\n" );
921 if ( k == nFanins )
922// printf( "Cannot find LUT with input %d at node %d.\n", iFanin, iObj );
923 continue;
924 Vec_IntPushTwo( vEdge2, iFanin, iObj );
925 }
926 }
927 p->pGia->vMapping = vMapTemp;
928}
Here is the caller graph for this function:

◆ Sle_ManExplore()

void Sle_ManExplore ( Gia_Man_t * pGia,
int nBTLimit,
int DelayInit,
int fDynamic,
int fTwoEdges,
int fVerbose )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 941 of file giaSatLE.c.

942{
943 int fVeryVerbose = 0;
944 abctime clk = Abc_Clock();
945 Vec_Int_t * vEdges2 = Vec_IntAlloc(1000);
946 Vec_Int_t * vMapping = Vec_IntAlloc(1000);
947 int i, iLut, nConfs, status, Delay, iFirstVar;
948 int DelayStart = (DelayInit || !Gia_ManHasMapping(pGia)) ? DelayInit : Gia_ManLutLevel(pGia, NULL);
949 Sle_Man_t * p = Sle_ManAlloc( pGia, DelayStart, fVerbose );
950 if ( fVerbose )
951 printf( "Running solver with %d conflicts, %d initial delay, and %d edges. Dynamic constraints = %s.\n", nBTLimit, DelayInit, 1+fTwoEdges, fDynamic?"yes":"no" );
953 if ( fVerbose )
954 printf( "Vars: Total = %d. Node = %d. Cut = %d. Edge = %d. Delay = %d.\n",
955 p->nVarsTotal, p->nNodeVars, p->nCutVars, p->nEdgeVars, p->nDelayVars );
957 Sle_ManDeriveCnf( p, nBTLimit, fDynamic || fTwoEdges );
958 if ( fVerbose )
959 printf( "Clas: Total = %d. Cut = %d. Edge = %d. EdgeEx = %d. Delay = %d.\n",
960 sat_solver_nclauses(p->pSat), p->nCutClas, p->nEdgeClas, p->nEdgeClas2, p->nDelayClas );
961 //Sat_SolverWriteDimacs( p->pSat, "temp.cnf", NULL, NULL, 0 );
962 for ( Delay = p->nLevels; Delay >= 0; Delay-- )
963 {
964 // we constrain COs, although it would be fine to constrain only POs
965 if ( Delay < p->nLevels )
966 {
967 Gia_ManForEachCoDriverId( p->pGia, iLut, i )
968 if ( Vec_BitEntry(p->vMask, iLut) ) // internal node
969 {
970 iFirstVar = Vec_IntEntry( p->vDelayFirst, iLut );
971 if ( !sat_solver_push(p->pSat, Abc_Var2Lit(iFirstVar + Delay, 1)) )
972 break;
973 }
974 if ( i < Gia_ManCoNum(p->pGia) )
975 {
976 if ( fVerbose )
977 {
978 printf( "Proved UNSAT for delay %d. ", Delay );
979 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
980 }
981 break;
982 }
983 }
984 // solve with assumptions
985 //clk = Abc_Clock();
986 nConfs = sat_solver_nconflicts( p->pSat );
987 while ( 1 )
988 {
989 p->nSatCalls++;
990 status = sat_solver_solve_internal( p->pSat );
991 if ( status != l_True )
992 break;
993 if ( !Sle_ManAddEdgeConstraints(p, 1+fTwoEdges) )
994 break;
995 }
996 nConfs = sat_solver_nconflicts( p->pSat ) - nConfs;
997 if ( status == l_True )
998 {
999 if ( fVerbose )
1000 {
1001 int nNodes = 0, nEdges = 0;
1002 for ( i = 0; i < p->nNodeVars; i++ )
1003 nNodes += sat_solver_var_value(p->pSat, i);
1004 for ( i = 0; i < p->nEdgeVars; i++ )
1005 nEdges += sat_solver_var_value(p->pSat, p->nNodeVars + p->nCutVars + i);
1006 printf( "Solution with delay %2d, node count %5d, and edge count %5d exists. Conf = %8d. ", Delay, nNodes, nEdges, nConfs );
1007 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
1008 }
1009 // save the result
1010 Sle_ManDeriveResult( p, vEdges2, vMapping );
1011 if ( fVeryVerbose )
1012 {
1013 printf( "Nodes: " );
1014 for ( i = 0; i < p->nNodeVars; i++ )
1015 if ( sat_solver_var_value(p->pSat, i) )
1016 printf( "%d ", i );
1017 printf( "\n" );
1018 printf( "\n" );
1019
1020 Vec_IntPrint( p->vCutFirst );
1021 printf( "Cuts: " );
1022 for ( i = 0; i < p->nCutVars; i++ )
1023 if ( sat_solver_var_value(p->pSat, p->nNodeVars + i) )
1024 printf( "%d ", p->nNodeVars + i );
1025 printf( "\n" );
1026 printf( "\n" );
1027
1028 Vec_IntPrint( p->vEdgeFirst );
1029 printf( "Edges: " );
1030 for ( i = 0; i < p->nEdgeVars; i++ )
1031 if ( sat_solver_var_value(p->pSat, p->nNodeVars + p->nCutVars + i) )
1032 printf( "%d ", p->nNodeVars + p->nCutVars + i );
1033 printf( "\n" );
1034 printf( "\n" );
1035
1036 Vec_IntPrint( p->vDelayFirst );
1037 printf( "Delays: " );
1038 for ( i = 0; i < p->nDelayVars; i++ )
1039 if ( sat_solver_var_value(p->pSat, p->nNodeVars + p->nCutVars + p->nEdgeVars + i) )
1040 printf( "%d ", p->nNodeVars + p->nCutVars + p->nEdgeVars + i );
1041 printf( "\n" );
1042 printf( "\n" );
1043 }
1044 }
1045 else
1046 {
1047 if ( fVerbose )
1048 {
1049 if ( status == l_False )
1050 printf( "Proved UNSAT for delay %d. Conf = %8d. ", Delay, nConfs );
1051 else
1052 printf( "Resource limit reached for delay %d. Conf = %8d. ", Delay, nConfs );
1053 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
1054 }
1055 break;
1056 }
1057 }
1058 if ( fVerbose )
1059 printf( "Clas: Total = %d. Cut = %d. Edge = %d. EdgeEx = %d. Delay = %d. Calls = %d.\n",
1060 sat_solver_nclauses(p->pSat), p->nCutClas, p->nEdgeClas, p->nEdgeClas2, p->nDelayClas, p->nSatCalls );
1061 if ( Vec_IntSize(vMapping) > 0 )
1062 {
1063 Gia_ManEdgeFromArray( p->pGia, vEdges2 );
1064 Vec_IntFree( vEdges2 );
1065 Vec_IntFreeP( &p->pGia->vMapping );
1066 p->pGia->vMapping = vMapping;
1067 }
1068 else
1069 {
1070 Vec_IntFree( vEdges2 );
1071 Vec_IntFree( vMapping );
1072 }
1073 Vec_IntFreeP( &p->pGia->vPacking );
1074 Sle_ManStop( p );
1075}
ABC_INT64_T abctime
Definition abc_global.h:332
#define l_True
Definition bmcBmcS.c:35
#define l_False
Definition bmcBmcS.c:36
void Sle_ManMarkupVariables(Sle_Man_t *p)
Definition giaSatLE.c:498
int Sle_ManAddEdgeConstraints(Sle_Man_t *p, int nEdges)
Definition giaSatLE.c:806
void Sle_ManDeriveCnf(Sle_Man_t *p, int nBTLimit, int fDynamic)
Definition giaSatLE.c:627
void Sle_ManDeriveResult(Sle_Man_t *p, Vec_Int_t *vEdge2, Vec_Int_t *vMapping)
Definition giaSatLE.c:868
Sle_Man_t * Sle_ManAlloc(Gia_Man_t *pGia, int nLevels, int fVerbose)
Definition giaSatLE.c:450
void Sle_ManDeriveInit(Sle_Man_t *p)
Definition giaSatLE.c:555
void Sle_ManStop(Sle_Man_t *p)
Definition giaSatLE.c:470
int Gia_ManLutLevel(Gia_Man_t *p, int **ppLevels)
Definition giaIf.c:165
void Gia_ManEdgeFromArray(Gia_Man_t *p, Vec_Int_t *vArray)
FUNCTION DEFINITIONS ///.
Definition giaEdge.c:72
int sat_solver_solve_internal(sat_solver *s)
Definition satSolver.c:1942
int sat_solver_nconflicts(sat_solver *s)
Definition satSolver.c:2381
int sat_solver_nclauses(sat_solver *s)
Definition satSolver.c:2375
int sat_solver_push(sat_solver *s, int p)
Definition satSolver.c:2002
Here is the call graph for this function:

◆ Sle_ManInternalNodeMask()

Vec_Bit_t * Sle_ManInternalNodeMask ( Gia_Man_t * pGia)

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

Synopsis [Derive mask representing internal nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 331 of file giaSatLE.c.

332{
333 int iObj;
334 Vec_Bit_t * vMask = Vec_BitStart( Gia_ManObjNum(pGia) );
335 Gia_ManForEachAndId( pGia, iObj )
336 Vec_BitWriteEntry( vMask, iObj, 1 );
337 return vMask;
338}
Here is the caller graph for this function:

◆ Sle_ManMarkupVariables()

void Sle_ManMarkupVariables ( Sle_Man_t * p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 498 of file giaSatLE.c.

499{
500 int iObj, Counter = Gia_ManObjNum(p->pGia);
501 // node variables
502 p->nNodeVars = Counter;
503 // cut variables
504 Gia_ManForEachAndId( p->pGia, iObj )
505 {
506 Vec_IntWriteEntry( p->vCutFirst, iObj, Counter );
507 Counter += Sle_ListCutNum( Sle_ManList(p, iObj) );
508 }
509 p->nCutVars = Counter - p->nNodeVars;
510 // edge variables
511 Gia_ManForEachAndId( p->pGia, iObj )
512 {
513 Vec_IntWriteEntry( p->vEdgeFirst, iObj, Counter );
514 Counter += Vec_IntSize( Vec_WecEntry(p->vCutFanins, iObj) );
515 }
516 p->nEdgeVars = Counter - p->nCutVars - p->nNodeVars;
517 // delay variables
518 Gia_ManForEachAndId( p->pGia, iObj )
519 {
520 Vec_IntWriteEntry( p->vDelayFirst, iObj, Counter );
521 Counter += p->nLevels;
522 }
523 p->nDelayVars = Counter - p->nEdgeVars - p->nCutVars - p->nNodeVars;
524 p->nVarsTotal = Counter;
525}
Here is the caller graph for this function:

◆ Sle_ManPrintCut()

void Sle_ManPrintCut ( int * pCut)

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

Synopsis [Cut printing.]

Description []

SideEffects []

SeeAlso []

Definition at line 287 of file giaSatLE.c.

288{
289 int nSize = Sle_CutSize(pCut);
290 int k, * pC = Sle_CutLeaves(pCut);
291 printf( "{" );
292 for ( k = 0; k < nSize; k++ )
293 printf( " %d", pC[k] );
294 printf( " }\n" );
295}
Here is the caller graph for this function:

◆ Sle_ManPrintCuts()

void Sle_ManPrintCuts ( Gia_Man_t * p,
Vec_Int_t * vCuts,
int iObj )

Definition at line 296 of file giaSatLE.c.

297{
298 int i, * pCut;
299 int * pList = Vec_IntEntryP( vCuts, Vec_IntEntry(vCuts, iObj) );
300 printf( "Obj %3d\n", iObj );
301 Sle_ForEachCut( pList, pCut, i )
302 Sle_ManPrintCut( pCut );
303 printf( "\n" );
304}
void Sle_ManPrintCut(int *pCut)
Definition giaSatLE.c:287
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Sle_ManPrintCutsAll()

void Sle_ManPrintCutsAll ( Gia_Man_t * p,
Vec_Int_t * vCuts )

Definition at line 305 of file giaSatLE.c.

306{
307 int iObj;
308 Gia_ManForEachAndId( p, iObj )
309 Sle_ManPrintCuts( p, vCuts, iObj );
310}
Here is the call graph for this function:

◆ Sle_ManStop()

void Sle_ManStop ( Sle_Man_t * p)

Definition at line 470 of file giaSatLE.c.

471{
472 sat_solver_delete( p->pSat );
473 Vec_BitFree( p->vMask );
474 Vec_IntFree( p->vCuts );
475 Vec_WecFree( p->vCutFanins );
476 Vec_WecFree( p->vFanoutEdges );
477 Vec_WecFree( p->vEdgeCuts );
478 Vec_IntFree( p->vObjMap );
479 Vec_IntFree( p->vCutFirst );
480 Vec_IntFree( p->vEdgeFirst );
481 Vec_IntFree( p->vDelayFirst );
482 Vec_IntFree( p->vPolars );
483 Vec_IntFree( p->vLits );
484 ABC_FREE( p );
485}
#define ABC_FREE(obj)
Definition abc_global.h:267
void sat_solver_delete(sat_solver *s)
Definition satSolver.c:1341
Here is the call graph for this function:
Here is the caller graph for this function: