abc-master
|
#include <math.h>
#include "sat/bsat/satSolver.h"
#include "misc/extra/extra.h"
#include "ivy.h"
#include "bdd/cudd/cuddInt.h"
#include "aig/aig/aig.h"
Go to the source code of this file.
Data Structures | |
struct | Ivy_FraigList_t_ |
struct | Ivy_FraigSim_t_ |
struct | Ivy_FraigMan_t_ |
struct | Prove_ParamsStruct_t_ |
Macros | |
#define | Ivy_FraigForEachEquivClass(pList, pEnt) |
#define | Ivy_FraigForEachEquivClassSafe(pList, pEnt, pEnt2) |
#define | Ivy_FraigForEachClassNode(pClass, pEnt) |
#define | Ivy_FraigForEachBinNode(pBin, pEnt) |
Typedefs | |
typedef typedefABC_NAMESPACE_IMPL_START struct Ivy_FraigMan_t_ | Ivy_FraigMan_t |
DECLARATIONS ///. More... | |
typedef struct Ivy_FraigSim_t_ | Ivy_FraigSim_t |
typedef struct Ivy_FraigList_t_ | Ivy_FraigList_t |
typedef struct Prove_ParamsStruct_t_ | Prove_Params_t |
Variables | |
static ABC_INT64_T | s_nBTLimitGlobal = 0 |
static ABC_INT64_T | s_nInsLimitGlobal = 0 |
#define Ivy_FraigForEachBinNode | ( | pBin, | |
pEnt | |||
) |
Definition at line 181 of file ivyFraig.c.
#define Ivy_FraigForEachClassNode | ( | pClass, | |
pEnt | |||
) |
Definition at line 176 of file ivyFraig.c.
#define Ivy_FraigForEachEquivClass | ( | pList, | |
pEnt | |||
) |
Definition at line 165 of file ivyFraig.c.
#define Ivy_FraigForEachEquivClassSafe | ( | pList, | |
pEnt, | |||
pEnt2 | |||
) |
Definition at line 169 of file ivyFraig.c.
typedef struct Ivy_FraigList_t_ Ivy_FraigList_t |
Definition at line 35 of file ivyFraig.c.
typedef typedefABC_NAMESPACE_IMPL_START struct Ivy_FraigMan_t_ Ivy_FraigMan_t |
DECLARATIONS ///.
CFile****************************************************************
FileName [ivyFraig.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [And-Inverter Graph package.]
Synopsis [Functional reduction of AIGs]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - May 11, 2006.]
Revision [
]
Definition at line 33 of file ivyFraig.c.
typedef struct Ivy_FraigSim_t_ Ivy_FraigSim_t |
Definition at line 34 of file ivyFraig.c.
typedef struct Prove_ParamsStruct_t_ Prove_Params_t |
Definition at line 108 of file ivyFraig.c.
void Ivy_FraigAddClass | ( | Ivy_FraigList_t * | pList, |
Ivy_Obj_t * | pClass | ||
) |
Function*************************************************************
Synopsis [Adds equivalence class to the list of classes.]
Description []
SideEffects []
SeeAlso []
Definition at line 1067 of file ivyFraig.c.
void Ivy_FraigAddClausesMux | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pNode | ||
) |
Function*************************************************************
Synopsis [Addes clauses to the solver.]
Description []
SideEffects []
SeeAlso []
Definition at line 2352 of file ivyFraig.c.
void Ivy_FraigAddClausesSuper | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pNode, | ||
Vec_Ptr_t * | vSuper | ||
) |
Function*************************************************************
Synopsis [Addes clauses to the solver.]
Description []
SideEffects []
SeeAlso []
Definition at line 2435 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Adds to pattern scores.]
Description []
SideEffects []
SeeAlso []
Definition at line 1682 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Performs fraiging for one node.]
Description [Returns the fraiged node.]
SideEffects []
SeeAlso []
Definition at line 2027 of file ivyFraig.c.
void Ivy_FraigAssignDist1 | ( | Ivy_FraigMan_t * | p, |
unsigned * | pPat | ||
) |
Function*************************************************************
Synopsis [Assings distance-1 simulation info for the PIs.]
Description []
SideEffects []
SeeAlso []
Definition at line 741 of file ivyFraig.c.
void Ivy_FraigAssignRandom | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Assings random simulation info for the PIs.]
Description []
SideEffects []
SeeAlso []
Definition at line 722 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Checks equivalence using BDDs.]
Description []
SideEffects []
SeeAlso []
Definition at line 2924 of file ivyFraig.c.
int Ivy_FraigCheckOutputSims | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Returns 1 if the one of the output is already non-constant 0.]
Description []
SideEffects []
SeeAlso []
Definition at line 1349 of file ivyFraig.c.
void Ivy_FraigCheckOutputSimsSavePattern | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj | ||
) |
Function*************************************************************
Synopsis [Creates the counter-example from the successful pattern.]
Description []
SideEffects []
SeeAlso []
Definition at line 1307 of file ivyFraig.c.
void Ivy_FraigCleanPatScores | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Cleans pattern scores.]
Description []
SideEffects []
SeeAlso []
Definition at line 1664 of file ivyFraig.c.
Function*************************************************************
Synopsis [Collects the supergate.]
Description []
SideEffects []
SeeAlso []
Definition at line 2498 of file ivyFraig.c.
Function*************************************************************
Synopsis [Collects the supergate.]
Description []
SideEffects []
SeeAlso []
Definition at line 2473 of file ivyFraig.c.
int Ivy_FraigCountClassNodes | ( | Ivy_Obj_t * | pClass | ) |
Function*************************************************************
Synopsis [Count the number of elements in the class.]
Description []
SideEffects []
SeeAlso []
Definition at line 1446 of file ivyFraig.c.
int Ivy_FraigCountPairsClasses | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Count the number of pairs.]
Description []
SideEffects []
SeeAlso []
Definition at line 1147 of file ivyFraig.c.
void Ivy_FraigCreateClasses | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Creates initial simulation classes.]
Description [Assumes that simulation info is assigned.]
SideEffects []
SeeAlso []
Definition at line 1174 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Generates the counter-example satisfying the miter.]
Description []
SideEffects []
SeeAlso []
Definition at line 1520 of file ivyFraig.c.
Aig_Man_t* Ivy_FraigExtractCone | ( | Ivy_Man_t * | p, |
Ivy_Obj_t * | pObj1, | ||
Ivy_Obj_t * | pObj2, | ||
Vec_Int_t * | vLeaves | ||
) |
Function*************************************************************
Synopsis [Checks equivalence using BDDs.]
Description []
SideEffects []
SeeAlso []
Definition at line 2863 of file ivyFraig.c.
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_START void Ivy_FraigExtractCone_rec | ( | Ivy_Man_t * | p, |
Ivy_Obj_t * | pNode, | ||
Vec_Int_t * | vLeaves, | ||
Vec_Int_t * | vNodes | ||
) |
Function*************************************************************
Synopsis [Computes truth table of the cut.]
Description []
SideEffects []
SeeAlso []
Definition at line 2836 of file ivyFraig.c.
void Ivy_FraigInsertClass | ( | Ivy_FraigList_t * | pList, |
Ivy_Obj_t * | pBase, | ||
Ivy_Obj_t * | pClass | ||
) |
Function*************************************************************
Synopsis [Updates the list of classes after base class has split.]
Description []
SideEffects []
SeeAlso []
Definition at line 1097 of file ivyFraig.c.
Ivy_Man_t* Ivy_FraigMiter | ( | Ivy_Man_t * | pManAig, |
Ivy_FraigParams_t * | pParams | ||
) |
Function*************************************************************
Synopsis [Applies brute-force SAT to the miter.]
Description []
SideEffects []
SeeAlso []
Definition at line 480 of file ivyFraig.c.
Function*************************************************************
Synopsis [Prints the status of the miter.]
Description []
SideEffects []
SeeAlso []
Definition at line 1796 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Tries to prove each output of the miter until encountering a sat output.]
Description []
SideEffects []
SeeAlso []
Definition at line 1880 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Reports the status of the miter.]
Description []
SideEffects []
SeeAlso []
Definition at line 1815 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Updates the solver clause database.]
Description []
SideEffects []
SeeAlso []
Definition at line 2545 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Runs equivalence test for one node.]
Description [Returns the fraiged node.]
SideEffects []
SeeAlso []
Definition at line 2266 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Runs equivalence test for the two nodes.]
Description []
SideEffects []
SeeAlso []
Definition at line 2099 of file ivyFraig.c.
Function*************************************************************
Synopsis [Checks equivalence using BDDs.]
Description []
SideEffects []
SeeAlso []
Definition at line 2769 of file ivyFraig.c.
ABC_NAMESPACE_IMPL_END ABC_NAMESPACE_IMPL_START DdNode* Ivy_FraigNodesAreEquivBdd_int | ( | DdManager * | dd, |
DdNode * | bFunc, | ||
Vec_Ptr_t * | vFront, | ||
int | Level | ||
) |
Function*************************************************************
Synopsis [Checks equivalence using BDDs.]
Description []
SideEffects []
SeeAlso []
Definition at line 2678 of file ivyFraig.c.
void Ivy_FraigObjAddToFrontier | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj, | ||
Vec_Ptr_t * | vFrontier | ||
) |
Function*************************************************************
Synopsis [Updates the solver clause database.]
Description []
SideEffects []
SeeAlso []
Definition at line 2519 of file ivyFraig.c.
void Ivy_FraigParamsDefault | ( | Ivy_FraigParams_t * | pParams | ) |
FUNCTION DEFINITIONS ///.
Function*************************************************************
Synopsis [Sets the default solving parameters.]
Description []
SideEffects []
SeeAlso []
Definition at line 225 of file ivyFraig.c.
Ivy_Man_t* Ivy_FraigPerform | ( | Ivy_Man_t * | pManAig, |
Ivy_FraigParams_t * | pParams | ||
) |
Function*************************************************************
Synopsis [Performs fraiging of the AIG.]
Description []
SideEffects []
SeeAlso []
Definition at line 451 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Performs fraiging of the AIG.]
Description []
SideEffects []
SeeAlso []
Definition at line 414 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Prints stats for the fraiging manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 644 of file ivyFraig.c.
void Ivy_FraigPrintActivity | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Prints variable activity.]
Description []
SideEffects []
SeeAlso []
Definition at line 2080 of file ivyFraig.c.
void Ivy_FraigPrintClass | ( | Ivy_Obj_t * | pClass | ) |
Function*************************************************************
Synopsis [Print the class.]
Description []
SideEffects []
SeeAlso []
Definition at line 1426 of file ivyFraig.c.
void Ivy_FraigPrintSimClasses | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Prints simulation classes.]
Description []
SideEffects []
SeeAlso []
Definition at line 1466 of file ivyFraig.c.
int Ivy_FraigProve | ( | Ivy_Man_t ** | ppManAig, |
void * | pPars | ||
) |
Function*************************************************************
Synopsis [Performs combinational equivalence checking for the miter.]
Description []
SideEffects []
SeeAlso []
Definition at line 255 of file ivyFraig.c.
int Ivy_FraigRefineClass_rec | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pClass | ||
) |
Function*************************************************************
Synopsis [Recursively refines the class after simulation.]
Description [Returns 1 if the class has changed.]
SideEffects []
SeeAlso []
Definition at line 1244 of file ivyFraig.c.
int Ivy_FraigRefineClasses | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Refines the classes after simulation.]
Description [Assumes that simulation info is assigned. Returns the number of classes refined.]
SideEffects [Large equivalence class of constant 0 may cause problems.]
SeeAlso []
Definition at line 1387 of file ivyFraig.c.
void Ivy_FraigRemoveClass | ( | Ivy_FraigList_t * | pList, |
Ivy_Obj_t * | pClass | ||
) |
Function*************************************************************
Synopsis [Removes equivalence class from the list of classes.]
Description []
SideEffects []
SeeAlso []
Definition at line 1120 of file ivyFraig.c.
void Ivy_FraigResimulate | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Resimulates fraiging manager after finding a counter-example.]
Description []
SideEffects []
SeeAlso []
Definition at line 1752 of file ivyFraig.c.
void Ivy_FraigSavePattern | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Copy pattern from the solver into the internal storage.]
Description []
SideEffects []
SeeAlso []
Definition at line 1543 of file ivyFraig.c.
void Ivy_FraigSavePattern0 | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Generated const 0 pattern.]
Description []
SideEffects []
SeeAlso []
Definition at line 1488 of file ivyFraig.c.
void Ivy_FraigSavePattern1 | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [[Generated const 1 pattern.]
Description []
SideEffects []
SeeAlso []
Definition at line 1504 of file ivyFraig.c.
void Ivy_FraigSavePattern2 | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Copy pattern from the solver into the internal storage.]
Description []
SideEffects []
SeeAlso []
Definition at line 1567 of file ivyFraig.c.
void Ivy_FraigSavePattern3 | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Copy pattern from the solver into the internal storage.]
Description []
SideEffects []
SeeAlso []
Definition at line 1591 of file ivyFraig.c.
int Ivy_FraigSelectBestPat | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Selects the best pattern.]
Description [Returns 1 if such pattern is found.]
SideEffects []
SeeAlso []
Definition at line 1713 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Sets variable activities in the cone.]
Description []
SideEffects []
SeeAlso []
Definition at line 2636 of file ivyFraig.c.
int Ivy_FraigSetActivityFactors_rec | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj, | ||
int | LevelMin, | ||
int | LevelMax | ||
) |
Function*************************************************************
Synopsis [Sets variable activities in the cone.]
Description []
SideEffects []
SeeAlso []
Definition at line 2600 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Performs simulation of the manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 1615 of file ivyFraig.c.
void Ivy_FraigSimulateOne | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Simulates AIG manager.]
Description [Assumes that the PI simulation info is attached.]
SideEffects []
SeeAlso []
Definition at line 990 of file ivyFraig.c.
void Ivy_FraigSimulateOneSim | ( | Ivy_FraigMan_t * | p | ) |
Function*************************************************************
Synopsis [Simulates AIG manager.]
Description [Assumes that the PI simulation info is attached.]
SideEffects []
SeeAlso []
Definition at line 1023 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Starts the fraiging manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 554 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Starts the fraiging manager without simulation info.]
Description []
SideEffects []
SeeAlso []
Definition at line 530 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Stops the fraiging manager.]
Description []
SideEffects []
SeeAlso []
Definition at line 621 of file ivyFraig.c.
|
static |
Function*************************************************************
Synopsis [Performs fraiging for the internal nodes.]
Description []
SideEffects []
SeeAlso []
Definition at line 1968 of file ivyFraig.c.
Function*************************************************************
Synopsis [Adds one node to the equivalence class.]
Description []
SideEffects []
SeeAlso []
Definition at line 1045 of file ivyFraig.c.
void Ivy_NodeAssignConst | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj, | ||
int | fConst1 | ||
) |
Function*************************************************************
Synopsis [Assigns constant patterns to the PI node.]
Description []
SideEffects []
SeeAlso []
Definition at line 701 of file ivyFraig.c.
void Ivy_NodeAssignRandom | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj | ||
) |
Function*************************************************************
Synopsis [Assigns random patterns to the PI node.]
Description []
SideEffects []
SeeAlso []
Definition at line 680 of file ivyFraig.c.
int Ivy_NodeCompareSims | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj0, | ||
Ivy_Obj_t * | pObj1 | ||
) |
Function*************************************************************
Synopsis [Returns 1 if simulation infos are equal.]
Description []
SideEffects []
SeeAlso []
Definition at line 810 of file ivyFraig.c.
void Ivy_NodeComplementSim | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj | ||
) |
Function*************************************************************
Synopsis [Returns 1 if simulation info is composed of all zeros.]
Description []
SideEffects []
SeeAlso []
Definition at line 790 of file ivyFraig.c.
unsigned Ivy_NodeHash | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj | ||
) |
Function*************************************************************
Synopsis [Computes hash value using simulation info.]
Description []
SideEffects []
SeeAlso []
Definition at line 951 of file ivyFraig.c.
int Ivy_NodeHasZeroSim | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj | ||
) |
Function*************************************************************
Synopsis [Returns 1 if simulation info is composed of all zeros.]
Description []
SideEffects []
SeeAlso []
Definition at line 768 of file ivyFraig.c.
void Ivy_NodeSimulate | ( | Ivy_FraigMan_t * | p, |
Ivy_Obj_t * | pObj | ||
) |
Function*************************************************************
Synopsis [Simulates one node.]
Description []
SideEffects []
SeeAlso []
Definition at line 888 of file ivyFraig.c.
void Ivy_NodeSimulateSim | ( | Ivy_FraigMan_t * | p, |
Ivy_FraigSim_t * | pSims | ||
) |
Function*************************************************************
Synopsis [Simulates one node.]
Description []
SideEffects []
SeeAlso []
Definition at line 833 of file ivyFraig.c.
Definition at line 141 of file ivyFraig.c.
Definition at line 143 of file ivyFraig.c.
Definition at line 142 of file ivyFraig.c.
Definition at line 145 of file ivyFraig.c.
Definition at line 146 of file ivyFraig.c.
Definition at line 149 of file ivyFraig.c.
Definition at line 147 of file ivyFraig.c.
Definition at line 144 of file ivyFraig.c.
|
inlinestatic |
Definition at line 162 of file ivyFraig.c.
|
inlinestatic |
Definition at line 148 of file ivyFraig.c.
Definition at line 152 of file ivyFraig.c.
Definition at line 154 of file ivyFraig.c.
Definition at line 153 of file ivyFraig.c.
Definition at line 156 of file ivyFraig.c.
Definition at line 157 of file ivyFraig.c.
Definition at line 160 of file ivyFraig.c.
Definition at line 158 of file ivyFraig.c.
Definition at line 155 of file ivyFraig.c.
|
inlinestatic |
Definition at line 159 of file ivyFraig.c.
|
inlinestatic |
Definition at line 151 of file ivyFraig.c.
|
inlinestatic |
Definition at line 140 of file ivyFraig.c.
|
static |
Definition at line 207 of file ivyFraig.c.
|
static |
Definition at line 208 of file ivyFraig.c.