abc-master
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "misc/vec/vec.h"
#include "aig/aig/aig.h"
#include "opt/dar/darInt.h"
Go to the source code of this file.
Data Structures | |
struct | Cnf_Dat_t_ |
struct | Cnf_Cut_t_ |
struct | Cnf_Man_t_ |
Macros | |
#define | Cnf_CnfForClause(p, pBeg, pEnd, i) for ( i = 0; i < p->nClauses && (pBeg = p->pClauses[i]) && (pEnd = p->pClauses[i+1]); i++ ) |
MACRO DEFINITIONS ///. More... | |
#define | Cnf_CutForEachLeaf(p, pCut, pLeaf, i) for ( i = 0; (i < (int)(pCut)->nFanins) && ((pLeaf) = Aig_ManObj(p, (pCut)->pFanins[i])); i++ ) |
Typedefs | |
typedef typedefABC_NAMESPACE_HEADER_START struct Cnf_Man_t_ | Cnf_Man_t |
INCLUDES ///. More... | |
typedef struct Cnf_Dat_t_ | Cnf_Dat_t |
typedef struct Cnf_Cut_t_ | Cnf_Cut_t |
#define Cnf_CutForEachLeaf | ( | p, | |
pCut, | |||
pLeaf, | |||
i | |||
) | for ( i = 0; (i < (int)(pCut)->nFanins) && ((pLeaf) = Aig_ManObj(p, (pCut)->pFanins[i])); i++ ) |
typedef struct Cnf_Cut_t_ Cnf_Cut_t |
typedef struct Cnf_Dat_t_ Cnf_Dat_t |
typedef typedefABC_NAMESPACE_HEADER_START struct Cnf_Man_t_ Cnf_Man_t |
INCLUDES ///.
CFile****************************************************************
FileName [cnf.h]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [DAG-aware AIG rewriting.]
Synopsis [External declarations.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - April 28, 2007.]
Revision [
]PARAMETERS ///BASIC TYPES ///
Function*************************************************************
Synopsis [Computes area, references, and nodes used in the mapping.]
Description [Collects the nodes in reverse topological order.]
SideEffects []
SeeAlso []
Definition at line 90 of file cnfUtil.c.
Function*************************************************************
Synopsis [Detects multi-input gate rooted at this node.]
Description []
SideEffects []
SeeAlso []
Definition at line 76 of file cnfFast.c.
void Cnf_ComputeClauses | ( | Aig_Man_t * | p, |
Aig_Obj_t * | pRoot, | ||
Vec_Ptr_t * | vLeaves, | ||
Vec_Ptr_t * | vNodes, | ||
Vec_Int_t * | vMap, | ||
Vec_Int_t * | vCover, | ||
Vec_Int_t * | vClauses | ||
) |
Function*************************************************************
Synopsis [Collects nodes inside the cone.]
Description []
SideEffects []
SeeAlso []
Definition at line 198 of file cnfFast.c.
Function*************************************************************
Synopsis [Merges two cuts.]
Description [Returns NULL of the cuts cannot be merged.]
SideEffects []
SeeAlso []
Definition at line 294 of file cnfCut.c.
Function*************************************************************
Synopsis [Creates cut for the given node.]
Description []
SideEffects []
SeeAlso []
Definition at line 87 of file cnfCut.c.
void Cnf_CutFree | ( | Cnf_Cut_t * | pCut | ) |
void Cnf_CutPrint | ( | Cnf_Cut_t * | pCut | ) |
|
inlinestatic |
void Cnf_CutUpdateRefs | ( | Cnf_Man_t * | p, |
Cnf_Cut_t * | pCut, | ||
Cnf_Cut_t * | pCutFan, | ||
Cnf_Cut_t * | pCutRes | ||
) |
int Cnf_DataAddXorClause | ( | void * | pSat, |
int | iVarA, | ||
int | iVarB, | ||
int | iVarC | ||
) |
Function*************************************************************
Synopsis [Adds constraints for the two-input AND-gate.]
Description []
SideEffects []
SeeAlso []
Definition at line 688 of file cnfMan.c.
Function*************************************************************
Synopsis [Returns the array of CI IDs.]
Description []
SideEffects []
SeeAlso []
Definition at line 200 of file cnfUtil.c.
Function*************************************************************
Synopsis [Returns the array of CI IDs.]
Description []
SideEffects []
SeeAlso []
Definition at line 222 of file cnfUtil.c.
Function*************************************************************
Synopsis [Returns the array of CI IDs.]
Description []
SideEffects []
SeeAlso []
Definition at line 104 of file cnfMan.c.
unsigned char* Cnf_DataDeriveLitPolarities | ( | Cnf_Dat_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 244 of file cnfUtil.c.
Function*************************************************************
Synopsis [Allocates the new CNF.]
Description []
SideEffects []
SeeAlso []
Definition at line 157 of file cnfMan.c.
void Cnf_DataFlipLastLiteral | ( | Cnf_Dat_t * | p | ) |
void Cnf_DataFree | ( | Cnf_Dat_t * | p | ) |
void Cnf_DataLift | ( | Cnf_Dat_t * | p, |
int | nVarsPlus | ||
) |
void Cnf_DataPrint | ( | Cnf_Dat_t * | p, |
int | fReadable | ||
) |
Function*************************************************************
Synopsis [Writes CNF into a file.]
Description []
SideEffects []
SeeAlso []
Definition at line 246 of file cnfMan.c.
Cnf_Dat_t* Cnf_DataReadFromFile | ( | char * | pFileName | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 304 of file cnfUtil.c.
void Cnf_DataTranformPolarity | ( | Cnf_Dat_t * | pCnf, |
int | fTransformPos | ||
) |
int Cnf_DataWriteAndClauses | ( | void * | p, |
Cnf_Dat_t * | pCnf | ||
) |
Function*************************************************************
Synopsis [Adds the OR-clause.]
Description []
SideEffects []
SeeAlso []
Definition at line 627 of file cnfMan.c.
void Cnf_DataWriteIntoFile | ( | Cnf_Dat_t * | p, |
char * | pFileName, | ||
int | fReadable, | ||
Vec_Int_t * | vForAlls, | ||
Vec_Int_t * | vExists | ||
) |
Function*************************************************************
Synopsis [Writes CNF into a file.]
Description []
SideEffects []
SeeAlso []
Definition at line 318 of file cnfMan.c.
void* Cnf_DataWriteIntoSolver | ( | Cnf_Dat_t * | p, |
int | nFrames, | ||
int | fInit | ||
) |
Function*************************************************************
Synopsis [Writes CNF into a file.]
Description []
SideEffects []
SeeAlso []
Definition at line 463 of file cnfMan.c.
void* Cnf_DataWriteIntoSolverInt | ( | void * | pSolver, |
Cnf_Dat_t * | p, | ||
int | nFrames, | ||
int | fInit | ||
) |
Function*************************************************************
Synopsis [Writes CNF into a file.]
Description []
SideEffects []
SeeAlso []
Definition at line 370 of file cnfMan.c.
int Cnf_DataWriteOrClause | ( | void * | p, |
Cnf_Dat_t * | pCnf | ||
) |
Function*************************************************************
Synopsis [Adds the OR-clause.]
Description []
SideEffects []
SeeAlso []
Definition at line 571 of file cnfMan.c.
Definition at line 165 of file cnfCore.c.
Function*************************************************************
Synopsis [Fast CNF computation.]
Description []
SideEffects []
SeeAlso []
Definition at line 666 of file cnfFast.c.
void Cnf_DeriveFastMark | ( | Aig_Man_t * | p | ) |
Function*************************************************************
Synopsis [Marks AIG for CNF computation.]
Description []
SideEffects []
SeeAlso []
Definition at line 297 of file cnfFast.c.
void Cnf_DeriveMapping | ( | Cnf_Man_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 100 of file cnfMap.c.
FUNCTION DECLARATIONS ///.
Function*************************************************************
Synopsis [Converts AIG into the SAT solver.]
Description []
SideEffects []
SeeAlso []
Definition at line 78 of file cnfCore.c.
Definition at line 219 of file cnfCore.c.
Function*************************************************************
Synopsis [Converts AIG into the SAT solver.]
Description []
SideEffects []
SeeAlso []
Definition at line 182 of file cnfCore.c.
Function*************************************************************
Synopsis [Derives a simple CNF for the AIG.]
Description [The last argument lists the number of last outputs of the manager, which will not be converted into clauses. New variables will be introduced for these outputs.]
SideEffects []
SeeAlso []
Definition at line 587 of file cnfWrite.c.
Function*************************************************************
Synopsis [Derives a simple CNF for backward retiming computation.]
Description [The last argument shows the number of last outputs of the manager, which will not be converted into clauses. New variables will be introduced for these outputs.]
SideEffects []
SeeAlso []
Definition at line 709 of file cnfWrite.c.
Function*************************************************************
Synopsis [Converts AIG into the SAT solver.]
Description []
SideEffects []
SeeAlso []
Definition at line 129 of file cnfCore.c.
void Cnf_ManFree | ( | ) |
Definition at line 58 of file cnfCore.c.
void Cnf_ManFreeCuts | ( | Cnf_Man_t * | p | ) |
int Cnf_ManMapForCnf | ( | Cnf_Man_t * | p | ) |
void Cnf_ManPostprocess | ( | Cnf_Man_t * | p | ) |
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 165 of file cnfPost.c.
void Cnf_ManPrepare | ( | ) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 46 of file cnfCore.c.
Cnf_Man_t* Cnf_ManRead | ( | ) |
Definition at line 54 of file cnfCore.c.
Function*************************************************************
Synopsis [Computes area, references, and nodes used in the mapping.]
Description [Collects the nodes in reverse topological order.]
SideEffects []
SeeAlso []
Definition at line 170 of file cnfUtil.c.
Cnf_Man_t* Cnf_ManStart | ( | ) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Starts the fraiging manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 51 of file cnfMan.c.
void Cnf_ManStop | ( | Cnf_Man_t * | p | ) |
void Cnf_ManTransferCuts | ( | Cnf_Man_t * | p | ) |
Function*************************************************************
Synopsis [Derives CNF for the mapping.]
Description [The last argument shows the number of last outputs of the manager, which will not be converted into clauses but the new variables for which will be introduced.]
SideEffects []
SeeAlso []
Definition at line 199 of file cnfWrite.c.
DECLARATIONS ///.
CFile****************************************************************
FileName [cnfWrite.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [AIG-to-CNF conversion.]
Synopsis []
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - April 28, 2007.]
Revision [
]FUNCTION DEFINITIONS /// Function*************************************************************
Synopsis [Derives CNF mapping.]
Description []
SideEffects []
SeeAlso []
Definition at line 45 of file cnfWrite.c.
Function*************************************************************
Synopsis [Derives CNF for the mapping.]
Description [Derives CNF with obj IDs as SAT vars and mapping of objects into clauses (pObj2Clause and pObj2Count).]
SideEffects []
SeeAlso []
Definition at line 419 of file cnfWrite.c.
void Cnf_ReadMsops | ( | char ** | ppSopSizes, |
char *** | ppSops | ||
) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Prepares the data for MSOPs of 4-variable functions.]
Description []
SideEffects []
SeeAlso []
Definition at line 4537 of file cnfData.c.
void Cnf_SopConvertToVector | ( | char * | pSop, |
int | nCubes, | ||
Vec_Int_t * | vCover | ||
) |
Function*************************************************************
Synopsis [Writes the cover into the array.]
Description []
SideEffects []
SeeAlso []
Definition at line 82 of file cnfWrite.c.
Definition at line 97 of file cnf.h.