ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
satTrace.c File Reference
#include "satSolver.h"
Include dependency graph for satTrace.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Sat_SolverTraceStart (sat_solver *pSat, char *pName)
 DECLARATIONS ///.
 
void Sat_SolverTraceStop (sat_solver *pSat)
 
void Sat_SolverTraceWrite (sat_solver *pSat, int *pBeg, int *pEnd, int fRoot)
 

Function Documentation

◆ Sat_SolverTraceStart()

ABC_NAMESPACE_IMPL_START void Sat_SolverTraceStart ( sat_solver * pSat,
char * pName )

DECLARATIONS ///.

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

FileName [satTrace.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [SAT sat_solver.]

Synopsis [Records the trace of SAT solving in the CNF form.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Start the trace recording.]

Description []

SideEffects []

SeeAlso []

Definition at line 53 of file satTrace.c.

54{
55 assert( pSat->pFile == NULL );
56 pSat->pFile = fopen( pName, "w" );
57 fprintf( pSat->pFile, " \n" );
58 pSat->nClauses = 0;
59 pSat->nRoots = 0;
60}
FILE * pFile
Definition satSolver.h:192
#define assert(ex)
Definition util_old.h:213

◆ Sat_SolverTraceStop()

void Sat_SolverTraceStop ( sat_solver * pSat)

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

Synopsis [Stops the trace recording.]

Description []

SideEffects []

SeeAlso []

Definition at line 73 of file satTrace.c.

74{
75 if ( pSat->pFile == NULL )
76 return;
77 rewind( pSat->pFile );
78 fprintf( pSat->pFile, "p %d %d %d", sat_solver_nvars(pSat), pSat->nClauses, pSat->nRoots );
79 fclose( pSat->pFile );
80 pSat->pFile = NULL;
81}
int sat_solver_nvars(sat_solver *s)
Definition satSolver.c:2369
VOID_HACK rewind()
Here is the call graph for this function:

◆ Sat_SolverTraceWrite()

void Sat_SolverTraceWrite ( sat_solver * pSat,
int * pBeg,
int * pEnd,
int fRoot )

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

Synopsis [Writes one clause into the trace file.]

Description []

SideEffects []

SeeAlso []

Definition at line 95 of file satTrace.c.

96{
97 if ( pSat->pFile == NULL )
98 return;
99 pSat->nClauses++;
100 pSat->nRoots += fRoot;
101 for ( ; pBeg < pEnd ; pBeg++ )
102 fprintf( pSat->pFile, " %d", lit_print(*pBeg) );
103 fprintf( pSat->pFile, " 0\n" );
104}