abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
satProof.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "misc/vec/vec.h"
#include "misc/vec/vecSet.h"
#include "aig/aig/aig.h"
#include "satTruth.h"

Go to the source code of this file.

Data Structures

struct  satset_t
 

Macros

#define Proof_ForeachClauseVec(pVec, p, pNode, i)   for ( i = 0; (i < Vec_IntSize(pVec)) && ((pNode) = Proof_ClauseRead(p, Vec_IntEntry(pVec,i))); i++ )
 
#define Proof_ForeachNodeVec(pVec, p, pNode, i)   for ( i = 0; (i < Vec_IntSize(pVec)) && ((pNode) = Proof_NodeRead(p, Vec_IntEntry(pVec,i))); i++ )
 
#define Proof_ForeachNodeVec1(pVec, p, pNode, i)   for ( i = 1; (i < Vec_IntSize(pVec)) && ((pNode) = Proof_NodeRead(p, Vec_IntEntry(pVec,i))); i++ )
 
#define Proof_NodeForeachFanin(pProof, pNode, pFanin, i)   for ( i = 0; (i < (int)pNode->nEnts) && (((pFanin) = (pNode->pEnts[i] & 1) ? NULL : Proof_NodeRead(pProof, pNode->pEnts[i] >> 2)), 1); i++ )
 

Typedefs

typedef
typedefABC_NAMESPACE_IMPL_START
struct satset_t 
satset
 

Functions

static satsetProof_NodeRead (Vec_Set_t *p, int h)
 DECLARATIONS ///. More...
 
static int Proof_NodeWordNum (int nEnts)
 
void Proof_ClauseSetEnts (Vec_Set_t *p, int h, int nEnts)
 
void Proof_CleanCollected (Vec_Set_t *vProof, Vec_Int_t *vUsed)
 FUNCTION DEFINITIONS ///. More...
 
void Proof_CollectUsed_iter (Vec_Set_t *vProof, int hNode, Vec_Int_t *vUsed, Vec_Int_t *vStack)
 
Vec_Int_tProof_CollectUsedIter (Vec_Set_t *vProof, Vec_Int_t *vRoots, int fSort)
 
void Proof_CollectUsed_rec (Vec_Set_t *vProof, int hNode, Vec_Int_t *vUsed)
 
Vec_Int_tProof_CollectUsedRec (Vec_Set_t *vProof, Vec_Int_t *vRoots)
 
int Proof_MarkUsed_rec (Vec_Set_t *vProof, int hNode)
 
int Proof_MarkUsedRec (Vec_Set_t *vProof, Vec_Int_t *vRoots)
 
void Sat_ProofCheck0 (Vec_Set_t *vProof)
 
int Sat_ProofReduce (Vec_Set_t *vProof, void *pRoots, int hProofPivot)
 
Vec_Int_tSat_ProofCollectCore (Vec_Set_t *vProof, Vec_Int_t *vUsed)
 
void * Proof_DeriveCore (Vec_Set_t *vProof, int hRoot)
 

Macro Definition Documentation

#define Proof_ForeachClauseVec (   pVec,
  p,
  pNode,
 
)    for ( i = 0; (i < Vec_IntSize(pVec)) && ((pNode) = Proof_ClauseRead(p, Vec_IntEntry(pVec,i))); i++ )

Definition at line 64 of file satProof.c.

#define Proof_ForeachNodeVec (   pVec,
  p,
  pNode,
 
)    for ( i = 0; (i < Vec_IntSize(pVec)) && ((pNode) = Proof_NodeRead(p, Vec_IntEntry(pVec,i))); i++ )

Definition at line 66 of file satProof.c.

#define Proof_ForeachNodeVec1 (   pVec,
  p,
  pNode,
 
)    for ( i = 1; (i < Vec_IntSize(pVec)) && ((pNode) = Proof_NodeRead(p, Vec_IntEntry(pVec,i))); i++ )

Definition at line 68 of file satProof.c.

#define Proof_NodeForeachFanin (   pProof,
  pNode,
  pFanin,
 
)    for ( i = 0; (i < (int)pNode->nEnts) && (((pFanin) = (pNode->pEnts[i] & 1) ? NULL : Proof_NodeRead(pProof, pNode->pEnts[i] >> 2)), 1); i++ )

Definition at line 72 of file satProof.c.

Typedef Documentation

typedef typedefABC_NAMESPACE_IMPL_START struct satset_t satset

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

FileName [satProof.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [SAT solver.]

Synopsis [Proof manipulation procedures.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
satProof.c,v 1.4 2005/09/16 22:55:03 casem Exp

]

Definition at line 41 of file satProof.c.

Function Documentation

void Proof_ClauseSetEnts ( Vec_Set_t p,
int  h,
int  nEnts 
)

Definition at line 61 of file satProof.c.

61 { Proof_NodeRead(p, h)->nEnts = nEnts; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static satset * Proof_NodeRead(Vec_Set_t *p, int h)
DECLARATIONS ///.
Definition: satProof.c:58
void Proof_CleanCollected ( Vec_Set_t vProof,
Vec_Int_t vUsed 
)

FUNCTION DEFINITIONS ///.

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

Synopsis [Cleans collected resultion nodes belonging to the proof.]

Description []

SideEffects []

SeeAlso []

Definition at line 96 of file satProof.c.

97 {
98  satset * pNode;
99  int hNode;
100  Proof_ForeachNodeVec( vUsed, vProof, pNode, hNode )
101  pNode->Id = 0;
102 }
typedefABC_NAMESPACE_IMPL_START struct satset_t satset
Definition: satProof.c:41
#define Proof_ForeachNodeVec(pVec, p, pNode, i)
Definition: satProof.c:66
void Proof_CollectUsed_iter ( Vec_Set_t vProof,
int  hNode,
Vec_Int_t vUsed,
Vec_Int_t vStack 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 115 of file satProof.c.

116 {
117  satset * pNext, * pNode = Proof_NodeRead( vProof, hNode );
118  int i;
119  if ( pNode->Id )
120  return;
121  // start with node
122  pNode->Id = 1;
123  Vec_IntPush( vStack, hNode << 1 );
124  // perform DFS search
125  while ( Vec_IntSize(vStack) )
126  {
127  hNode = Vec_IntPop( vStack );
128  if ( hNode & 1 ) // extracted second time
129  {
130  Vec_IntPush( vUsed, hNode >> 1 );
131  continue;
132  }
133  // extracted first time
134  Vec_IntPush( vStack, hNode ^ 1 ); // add second time
135  // add its anticedents ;
136  pNode = Proof_NodeRead( vProof, hNode >> 1 );
137  Proof_NodeForeachFanin( vProof, pNode, pNext, i )
138  if ( pNext && !pNext->Id )
139  {
140  pNext->Id = 1;
141  Vec_IntPush( vStack, (pNode->pEnts[i] >> 2) << 1 ); // add first time
142  }
143  }
144 }
static satset * Proof_NodeRead(Vec_Set_t *p, int h)
DECLARATIONS ///.
Definition: satProof.c:58
typedefABC_NAMESPACE_IMPL_START struct satset_t satset
Definition: satProof.c:41
if(last==0)
Definition: sparse_int.h:34
static int Vec_IntPop(Vec_Int_t *p)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
#define Proof_NodeForeachFanin(pProof, pNode, pFanin, i)
Definition: satProof.c:72
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
void Proof_CollectUsed_rec ( Vec_Set_t vProof,
int  hNode,
Vec_Int_t vUsed 
)

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

Synopsis [Recursively collects useful proof nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 187 of file satProof.c.

188 {
189  satset * pNext, * pNode = Proof_NodeRead( vProof, hNode );
190  int i;
191  if ( pNode->Id )
192  return;
193  pNode->Id = 1;
194  Proof_NodeForeachFanin( vProof, pNode, pNext, i )
195  if ( pNext && !pNext->Id )
196  Proof_CollectUsed_rec( vProof, pNode->pEnts[i] >> 2, vUsed );
197  Vec_IntPush( vUsed, hNode );
198 }
void Proof_CollectUsed_rec(Vec_Set_t *vProof, int hNode, Vec_Int_t *vUsed)
Definition: satProof.c:187
static satset * Proof_NodeRead(Vec_Set_t *p, int h)
DECLARATIONS ///.
Definition: satProof.c:58
typedefABC_NAMESPACE_IMPL_START struct satset_t satset
Definition: satProof.c:41
if(last==0)
Definition: sparse_int.h:34
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
#define Proof_NodeForeachFanin(pProof, pNode, pFanin, i)
Definition: satProof.c:72
Vec_Int_t* Proof_CollectUsedIter ( Vec_Set_t vProof,
Vec_Int_t vRoots,
int  fSort 
)

Definition at line 145 of file satProof.c.

146 {
147  int fVerify = 0;
148  Vec_Int_t * vUsed, * vStack;
149  abctime clk = Abc_Clock();
150  int i, Entry, iPrev = 0;
151  vUsed = Vec_IntAlloc( 1000 );
152  vStack = Vec_IntAlloc( 1000 );
153  Vec_IntForEachEntry( vRoots, Entry, i )
154  if ( Entry >= 0 )
155  Proof_CollectUsed_iter( vProof, Entry, vUsed, vStack );
156  Vec_IntFree( vStack );
157 // Abc_PrintTime( 1, "Iterative clause collection time", Abc_Clock() - clk );
158  clk = Abc_Clock();
159  Abc_MergeSort( Vec_IntArray(vUsed), Vec_IntSize(vUsed) );
160 // Abc_PrintTime( 1, "Postprocessing with sorting time", Abc_Clock() - clk );
161  // verify topological order
162  if ( fVerify )
163  {
164  iPrev = 0;
165  Vec_IntForEachEntry( vUsed, Entry, i )
166  {
167  if ( iPrev >= Entry )
168  printf( "Out of topological order!!!\n" );
169  assert( iPrev < Entry );
170  iPrev = Entry;
171  }
172  }
173  return vUsed;
174 }
static int * Vec_IntArray(Vec_Int_t *p)
Definition: vecInt.h:328
void Proof_CollectUsed_iter(Vec_Set_t *vProof, int hNode, Vec_Int_t *vUsed, Vec_Int_t *vStack)
Definition: satProof.c:115
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static abctime Abc_Clock()
Definition: abc_global.h:279
void Abc_MergeSort(int *pInput, int nSize)
Definition: utilSort.c:129
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
if(last==0)
Definition: sparse_int.h:34
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
#define assert(ex)
Definition: util_old.h:213
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
ABC_INT64_T abctime
Definition: abc_global.h:278
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
Vec_Int_t* Proof_CollectUsedRec ( Vec_Set_t vProof,
Vec_Int_t vRoots 
)

Definition at line 199 of file satProof.c.

200 {
201  Vec_Int_t * vUsed;
202  int i, Entry;
203  vUsed = Vec_IntAlloc( 1000 );
204  Vec_IntForEachEntry( vRoots, Entry, i )
205  if ( Entry >= 0 )
206  Proof_CollectUsed_rec( vProof, Entry, vUsed );
207  return vUsed;
208 }
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Proof_CollectUsed_rec(Vec_Set_t *vProof, int hNode, Vec_Int_t *vUsed)
Definition: satProof.c:187
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
if(last==0)
Definition: sparse_int.h:34
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
void* Proof_DeriveCore ( Vec_Set_t vProof,
int  hRoot 
)

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

Synopsis [Computes UNSAT core.]

Description [The result is the array of root clause indexes.]

SideEffects []

SeeAlso []

Definition at line 913 of file satProof.c.

914 {
915  Vec_Int_t Roots = { 1, 1, &hRoot }, * vRoots = &Roots;
916  Vec_Int_t * vCore, * vUsed;
917  if ( hRoot == -1 )
918  return NULL;
919  // collect visited clauses
920  vUsed = Proof_CollectUsedIter( vProof, vRoots, 0 );
921  // collect core clauses
922  vCore = Sat_ProofCollectCore( vProof, vUsed );
923  Vec_IntFree( vUsed );
924  Vec_IntSort( vCore, 1 );
925  return vCore;
926 }
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static void Vec_IntSort(Vec_Int_t *p, int fReverse)
Definition: vecInt.h:1293
Vec_Int_t * Proof_CollectUsedIter(Vec_Set_t *vProof, Vec_Int_t *vRoots, int fSort)
Definition: satProof.c:145
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
Vec_Int_t * Sat_ProofCollectCore(Vec_Set_t *vProof, Vec_Int_t *vUsed)
Definition: satProof.c:607
int Proof_MarkUsed_rec ( Vec_Set_t vProof,
int  hNode 
)

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

Synopsis [Recursively visits useful proof nodes.]

Description []

SideEffects []

SeeAlso []

Definition at line 221 of file satProof.c.

222 {
223  satset * pNext, * pNode = Proof_NodeRead( vProof, hNode );
224  int i, Counter = 1;
225  if ( pNode->Id )
226  return 0;
227  pNode->Id = 1;
228  Proof_NodeForeachFanin( vProof, pNode, pNext, i )
229  if ( pNext && !pNext->Id )
230  Counter += Proof_MarkUsed_rec( vProof, pNode->pEnts[i] >> 2 );
231  return Counter;
232 }
static satset * Proof_NodeRead(Vec_Set_t *p, int h)
DECLARATIONS ///.
Definition: satProof.c:58
typedefABC_NAMESPACE_IMPL_START struct satset_t satset
Definition: satProof.c:41
int Proof_MarkUsed_rec(Vec_Set_t *vProof, int hNode)
Definition: satProof.c:221
if(last==0)
Definition: sparse_int.h:34
static int Counter
#define Proof_NodeForeachFanin(pProof, pNode, pFanin, i)
Definition: satProof.c:72
int Proof_MarkUsedRec ( Vec_Set_t vProof,
Vec_Int_t vRoots 
)

Definition at line 233 of file satProof.c.

234 {
235  int i, Entry, Counter = 0;
236  Vec_IntForEachEntry( vRoots, Entry, i )
237  if ( Entry >= 0 )
238  Counter += Proof_MarkUsed_rec( vProof, Entry );
239  return Counter;
240 }
int Proof_MarkUsed_rec(Vec_Set_t *vProof, int hNode)
Definition: satProof.c:221
if(last==0)
Definition: sparse_int.h:34
static int Counter
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static satset* Proof_NodeRead ( Vec_Set_t p,
int  h 
)
inlinestatic

DECLARATIONS ///.

Definition at line 58 of file satProof.c.

58 { assert( h > 0 ); return (satset*)Vec_SetEntry( p, h ); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static word * Vec_SetEntry(Vec_Set_t *p, int h)
Definition: vecSet.h:70
typedefABC_NAMESPACE_IMPL_START struct satset_t satset
Definition: satProof.c:41
#define assert(ex)
Definition: util_old.h:213
static int Proof_NodeWordNum ( int  nEnts)
inlinestatic

Definition at line 59 of file satProof.c.

59 { assert( nEnts > 0 ); return 1 + ((nEnts + 1) >> 1); }
#define assert(ex)
Definition: util_old.h:213
void Sat_ProofCheck0 ( Vec_Set_t vProof)

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

Synopsis [Checks the validity of the check point.]

Description []

SideEffects []

SeeAlso [] Function*************************************************************

Synopsis [Reduces the proof to contain only roots and their children.]

Description [The result is updated proof and updated roots.]

SideEffects []

SeeAlso []

Definition at line 371 of file satProof.c.

372 {
373  satset * pNode, * pFanin;
374  int i, j, k, nSize;
375  Vec_SetForEachEntry( satset *, vProof, nSize, pNode, i, j )
376  {
377  nSize = Vec_SetWordNum( 2 + pNode->nEnts );
378  Proof_NodeForeachFanin( vProof, pNode, pFanin, k )
379  assert( (pNode->pEnts[k] >> 2) );
380  }
381 }
#define Vec_SetForEachEntry(Type, pVec, nSize, pSet, p, s)
Definition: vecSet.h:96
typedefABC_NAMESPACE_IMPL_START struct satset_t satset
Definition: satProof.c:41
static int Vec_SetWordNum(int nSize)
Definition: vecSet.h:67
#define Proof_NodeForeachFanin(pProof, pNode, pFanin, i)
Definition: satProof.c:72
#define assert(ex)
Definition: util_old.h:213
Vec_Int_t* Sat_ProofCollectCore ( Vec_Set_t vProof,
Vec_Int_t vUsed 
)

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

Synopsis [Collects nodes belonging to the UNSAT core.]

Description [The resulting array contains 1-based IDs of root clauses.]

SideEffects []

SeeAlso []

Definition at line 607 of file satProof.c.

608 {
609  Vec_Int_t * vCore;
610  satset * pNode, * pFanin;
611  unsigned * pBitMap;
612  int i, k, MaxCla = 0;
613  // find the largest number
614  Proof_ForeachNodeVec( vUsed, vProof, pNode, i )
615  Proof_NodeForeachFanin( vProof, pNode, pFanin, k )
616  if ( pFanin == NULL )
617  MaxCla = Abc_MaxInt( MaxCla, pNode->pEnts[k] >> 2 );
618  // allocate bitmap
619  pBitMap = ABC_CALLOC( unsigned, Abc_BitWordNum(MaxCla) + 1 );
620  // collect leaves
621  vCore = Vec_IntAlloc( 1000 );
622  Proof_ForeachNodeVec( vUsed, vProof, pNode, i )
623  Proof_NodeForeachFanin( vProof, pNode, pFanin, k )
624  if ( pFanin == NULL )
625  {
626  int Entry = (pNode->pEnts[k] >> 2);
627  if ( Abc_InfoHasBit(pBitMap, Entry) )
628  continue;
629  Abc_InfoSetBit(pBitMap, Entry);
630  Vec_IntPush( vCore, Entry );
631  }
632  ABC_FREE( pBitMap );
633 // Vec_IntUniqify( vCore );
634  return vCore;
635 }
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Abc_InfoHasBit(unsigned *p, int i)
Definition: abc_global.h:258
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
typedefABC_NAMESPACE_IMPL_START struct satset_t satset
Definition: satProof.c:41
#define Proof_ForeachNodeVec(pVec, p, pNode, i)
Definition: satProof.c:66
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
if(last==0)
Definition: sparse_int.h:34
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
#define Proof_NodeForeachFanin(pProof, pNode, pFanin, i)
Definition: satProof.c:72
static void Abc_InfoSetBit(unsigned *p, int i)
Definition: abc_global.h:259
#define ABC_FREE(obj)
Definition: abc_global.h:232
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
int Sat_ProofReduce ( Vec_Set_t vProof,
void *  pRoots,
int  hProofPivot 
)

Definition at line 383 of file satProof.c.

384 {
385 // Vec_Set_t * vProof = (Vec_Set_t *)&s->Proofs;
386 // Vec_Int_t * vRoots = (Vec_Int_t *)&s->claProofs;
387  Vec_Int_t * vRoots = (Vec_Int_t *)pRoots;
388 // Vec_Int_t * vClauses = (Vec_Int_t *)&s->clauses;
389  int fVerbose = 0;
390  Vec_Ptr_t * vUsed;
391  satset * pNode, * pFanin, * pPivot;
392  int i, j, k, hTemp, nSize;
393  abctime clk = Abc_Clock();
394  static abctime TimeTotal = 0;
395  int RetValue;
396 //Sat_ProofCheck0( vProof );
397 
398  // collect visited nodes
399  nSize = Proof_MarkUsedRec( vProof, vRoots );
400  vUsed = Vec_PtrAlloc( nSize );
401 //Sat_ProofCheck0( vProof );
402 
403  // relabel nodes to use smaller space
404  Vec_SetShrinkS( vProof, 2 );
405  Vec_SetForEachEntry( satset *, vProof, nSize, pNode, i, j )
406  {
407  nSize = Vec_SetWordNum( 2 + pNode->nEnts );
408  if ( pNode->Id == 0 )
409  continue;
410  pNode->Id = Vec_SetAppendS( vProof, 2 + pNode->nEnts );
411  assert( pNode->Id > 0 );
412  Vec_PtrPush( vUsed, pNode );
413  // update fanins
414  Proof_NodeForeachFanin( vProof, pNode, pFanin, k )
415  if ( (pNode->pEnts[k] & 1) == 0 ) // proof node
416  {
417  assert( pFanin->Id > 0 );
418  pNode->pEnts[k] = (pFanin->Id << 2) | (pNode->pEnts[k] & 2);
419  }
420 // else // problem clause
421 // assert( (int*)pFanin >= Vec_IntArray(vClauses) && (int*)pFanin < Vec_IntArray(vClauses)+Vec_IntSize(vClauses) );
422  }
423  // update roots
424  Proof_ForeachNodeVec1( vRoots, vProof, pNode, i )
425  Vec_IntWriteEntry( vRoots, i, pNode->Id );
426  // determine new pivot
427  assert( hProofPivot >= 1 && hProofPivot <= Vec_SetHandCurrent(vProof) );
428  pPivot = Proof_NodeRead( vProof, hProofPivot );
429  RetValue = Vec_SetHandCurrentS(vProof);
430  // compact the nodes
431  Vec_PtrForEachEntry( satset *, vUsed, pNode, i )
432  {
433  hTemp = pNode->Id; pNode->Id = 0;
434  memmove( Vec_SetEntry(vProof, hTemp), pNode, sizeof(word)*Proof_NodeWordNum(pNode->nEnts) );
435  if ( pPivot && pPivot <= pNode )
436  {
437  RetValue = hTemp;
438  pPivot = NULL;
439  }
440  }
441  Vec_SetWriteEntryNum( vProof, Vec_PtrSize(vUsed) );
442  Vec_PtrFree( vUsed );
443 
444  // report the result
445  if ( fVerbose )
446  {
447  printf( "\n" );
448  printf( "The proof was reduced from %6.2f MB to %6.2f MB (by %6.2f %%) ",
449  1.0 * Vec_SetMemory(vProof) / (1<<20), 1.0 * Vec_SetMemoryS(vProof) / (1<<20),
450  100.0 * (Vec_SetMemory(vProof) - Vec_SetMemoryS(vProof)) / Vec_SetMemory(vProof) );
451  TimeTotal += Abc_Clock() - clk;
452  Abc_PrintTime( 1, "Time", TimeTotal );
453  }
454  Vec_SetShrink( vProof, Vec_SetHandCurrentS(vProof) );
455  Vec_SetShrinkLimits( vProof );
456 // Sat_ProofReduceCheck( s );
457 //Sat_ProofCheck0( vProof );
458 
459  return RetValue;
460 }
static void Vec_SetShrinkS(Vec_Set_t *p, int h)
Definition: vecSet.h:263
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static int Vec_SetAppendS(Vec_Set_t *p, int nSize)
Definition: vecSet.h:236
static void Vec_SetShrinkLimits(Vec_Set_t *p)
Definition: vecSet.h:270
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
#define Vec_SetForEachEntry(Type, pVec, nSize, pSet, p, s)
Definition: vecSet.h:96
static void Vec_SetWriteEntryNum(Vec_Set_t *p, int i)
Definition: vecSet.h:72
static int Vec_SetHandCurrent(Vec_Set_t *p)
Definition: vecSet.h:83
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static abctime Abc_Clock()
Definition: abc_global.h:279
static word * Vec_SetEntry(Vec_Set_t *p, int h)
Definition: vecSet.h:70
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static satset * Proof_NodeRead(Vec_Set_t *p, int h)
DECLARATIONS ///.
Definition: satProof.c:58
typedefABC_NAMESPACE_IMPL_START struct satset_t satset
Definition: satProof.c:41
char * memmove()
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Definition: abc_global.h:367
static int Vec_SetWordNum(int nSize)
Definition: vecSet.h:67
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static void Vec_SetShrink(Vec_Set_t *p, int h)
Definition: vecSet.h:257
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
if(last==0)
Definition: sparse_int.h:34
static int Vec_SetMemory(Vec_Set_t *p)
Definition: vecSet.h:87
#define Proof_NodeForeachFanin(pProof, pNode, pFanin, i)
Definition: satProof.c:72
static int Proof_NodeWordNum(int nEnts)
Definition: satProof.c:59
static int Vec_SetHandCurrentS(Vec_Set_t *p)
Definition: vecSet.h:84
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
int Proof_MarkUsedRec(Vec_Set_t *vProof, Vec_Int_t *vRoots)
Definition: satProof.c:233
static int Vec_SetMemoryS(Vec_Set_t *p)
Definition: vecSet.h:88
#define assert(ex)
Definition: util_old.h:213
#define Proof_ForeachNodeVec1(pVec, p, pNode, i)
Definition: satProof.c:68
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
ABC_INT64_T abctime
Definition: abc_global.h:278
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223