ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
giaSat3.c File Reference
#include "gia.h"
#include "sat/cnf/cnf.h"
#include "sat/bsat/satSolver3.h"
Include dependency graph for giaSat3.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START sat_solver3Gia_ManSat3Init (Cnf_Dat_t *pCnf)
 DECLARATIONS ///.
 
void Gia_ManSat3Report (int iOutput, int status, abctime clk)
 
sat_solver3Gia_ManSat3Create (Gia_Man_t *p)
 
int Gia_ManSat3CallOne (Gia_Man_t *p, int iOutput)
 
void Gia_ManSat3Call (Gia_Man_t *p, int fSplit)
 

Function Documentation

◆ Gia_ManSat3Call()

void Gia_ManSat3Call ( Gia_Man_t * p,
int fSplit )

Definition at line 109 of file giaSat3.c.

110{
111 Gia_Man_t * pOne;
112 Gia_Obj_t * pRoot;
113 int i;
114 if ( fSplit )
115 {
116 abctime clk = Abc_Clock();
117 Gia_ManForEachCo( p, pRoot, i )
118 {
119 pOne = Gia_ManDupDfsCone( p, pRoot );
120 Gia_ManSat3CallOne( pOne, i );
121 Gia_ManStop( pOne );
122 }
123 Abc_PrintTime( 1, "Total time", Abc_Clock() - clk );
124 return;
125 }
126 Gia_ManSat3CallOne( p, -1 );
127}
ABC_INT64_T abctime
Definition abc_global.h:332
Cube * p
Definition exorList.c:222
int Gia_ManSat3CallOne(Gia_Man_t *p, int iOutput)
Definition giaSat3.c:90
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
Gia_Man_t * Gia_ManDupDfsCone(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition giaDup.c:2188
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
#define Gia_ManForEachCo(p, pObj, i)
Definition gia.h:1236
Here is the call graph for this function:

◆ Gia_ManSat3CallOne()

int Gia_ManSat3CallOne ( Gia_Man_t * p,
int iOutput )

Definition at line 90 of file giaSat3.c.

91{
92 abctime clk = Abc_Clock();
93 sat_solver3 * pSat;
94 int status, Cost = 0;
95
96 pSat = Gia_ManSat3Create( p );
97 if ( pSat )
98 {
99 status = sat_solver3_solve( pSat, NULL, NULL, 0, 0, 0, 0 );
100 Cost = (unsigned)pSat->stats.conflicts;
101 sat_solver3_delete( pSat );
102 }
103 else
104 status = l_False;
105
106 Gia_ManSat3Report( iOutput, status, Abc_Clock() - clk );
107 return Cost;
108}
#define l_False
Definition bmcBmcS.c:36
void Gia_ManSat3Report(int iOutput, int status, abctime clk)
Definition giaSat3.c:62
sat_solver3 * Gia_ManSat3Create(Gia_Man_t *p)
Definition giaSat3.c:78
void sat_solver3_delete(sat_solver3 *s)
int sat_solver3_solve(sat_solver3 *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
struct sat_solver3_t sat_solver3
Definition satSolver3.h:41
stats_t stats
Definition satSolver3.h:161
ABC_INT64_T conflicts
Definition satVec.h:156
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManSat3Create()

sat_solver3 * Gia_ManSat3Create ( Gia_Man_t * p)

Definition at line 78 of file giaSat3.c.

79{
80 Cnf_Dat_t * pCnf = (Cnf_Dat_t *)Mf_ManGenerateCnf( p, 8, 0, 1, 0, 0 );
81 sat_solver3 * pSat = Gia_ManSat3Init( pCnf );
82 int status = pSat ? sat_solver3_simplify(pSat) : 0;
83 Cnf_DataFree( pCnf );
84 if ( status )
85 return pSat;
86 if ( pSat )
87 sat_solver3_delete( pSat );
88 return NULL;
89}
struct Cnf_Dat_t_ Cnf_Dat_t
Definition cnf.h:52
void Cnf_DataFree(Cnf_Dat_t *p)
Definition cnfMan.c:207
ABC_NAMESPACE_IMPL_START sat_solver3 * Gia_ManSat3Init(Cnf_Dat_t *pCnf)
DECLARATIONS ///.
Definition giaSat3.c:47
void * Mf_ManGenerateCnf(Gia_Man_t *pGia, int nLutSize, int fCnfObjIds, int fAddOrCla, int fMapping, int fVerbose)
Definition giaMf.c:1877
int sat_solver3_simplify(sat_solver3 *s)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManSat3Init()

ABC_NAMESPACE_IMPL_START sat_solver3 * Gia_ManSat3Init ( Cnf_Dat_t * pCnf)

DECLARATIONS ///.

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

FileName [giaSatoko.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis [Interface to Satoko solver.]

Author [Alan Mishchenko, Bruno Schmitt]

Affiliation [UC Berkeley]

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

Revision [

Id
giaSatoko.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file giaSat3.c.

48{
50 int i;
51 //sat_solver_setnvars( pSat, p->nVars );
52 for ( i = 0; i < pCnf->nClauses; i++ )
53 {
54 if ( !sat_solver3_addclause( pSat, pCnf->pClauses[i], pCnf->pClauses[i+1] ) )
55 {
56 sat_solver3_delete( pSat );
57 return NULL;
58 }
59 }
60 return pSat;
61}
sat_solver3 * sat_solver3_new(void)
int sat_solver3_addclause(sat_solver3 *s, lit *begin, lit *end)
int ** pClauses
Definition cnf.h:62
int nClauses
Definition cnf.h:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManSat3Report()

void Gia_ManSat3Report ( int iOutput,
int status,
abctime clk )

Definition at line 62 of file giaSat3.c.

63{
64 if ( iOutput >= 0 )
65 Abc_Print( 1, "Output %6d : ", iOutput );
66 else
67 Abc_Print( 1, "Total: " );
68
69 if ( status == l_Undef )
70 Abc_Print( 1, "UNDECIDED " );
71 else if ( status == l_True )
72 Abc_Print( 1, "SATISFIABLE " );
73 else
74 Abc_Print( 1, "UNSATISFIABLE " );
75
76 Abc_PrintTime( 1, "Time", clk );
77}
#define l_True
Definition bmcBmcS.c:35
#define l_Undef
Definition bmcBmcS.c:34
Here is the caller graph for this function: