Commit f2d4f6c2 by Alan Mishchenko

Version abc80208

parent 5a692406
...@@ -24,12 +24,16 @@ set gnuplotunix gnuplot ...@@ -24,12 +24,16 @@ set gnuplotunix gnuplot
alias b balance alias b balance
alias cl cleanup alias cl cleanup
alias clp collapse alias clp collapse
alias cs care_set
alias dc2 dcompress2
alias esd ext_seq_dcs alias esd ext_seq_dcs
alias f fraig alias f fraig
alias fs fraig_sweep alias fs fraig_sweep
alias fsto fraig_store alias fsto fraig_store
alias fres fraig_restore alias fres fraig_restore
alias fr fretime
alias ft fraig_trust alias ft fraig_trust
alias ic indcut
alias lp lutpack alias lp lutpack
alias pd print_dsd alias pd print_dsd
alias pex print_exdc -d alias pex print_exdc -d
...@@ -123,6 +127,8 @@ alias trec "rec_start; r c.blif; st; rec_add; rec_use" ...@@ -123,6 +127,8 @@ alias trec "rec_start; r c.blif; st; rec_add; rec_use"
alias trec4 "rec_start -K 4; r i10.blif; st; rec_add; rec_use" alias trec4 "rec_start -K 4; r i10.blif; st; rec_add; rec_use"
alias bmc2 "frames -i -F 10; orpos; iprove" alias bmc2 "frames -i -F 10; orpos; iprove"
alias pjsolve "scl; dc2; fr; dc2; ic; ic -t; if -a; cs tacas/005_care.aig; mfs; lp; st; ic"
alias t0 "r test/mc1.blif; st; test" alias t0 "r test/mc1.blif; st; test"
alias t1 "r s27mc2.blif; st; test" alias t1 "r s27mc2.blif; st; test"
alias t2 "r i/intel_001.aig; ps; indcut -v" alias t2 "r i/intel_001.aig; ps; indcut -v"
......
...@@ -677,7 +677,7 @@ void Abc_NtkNodeSupport_rec( Abc_Obj_t * pNode, Vec_Ptr_t * vNodes ) ...@@ -677,7 +677,7 @@ void Abc_NtkNodeSupport_rec( Abc_Obj_t * pNode, Vec_Ptr_t * vNodes )
// mark the node as visited // mark the node as visited
Abc_NodeSetTravIdCurrent( pNode ); Abc_NodeSetTravIdCurrent( pNode );
// collect the CI // collect the CI
if ( Abc_ObjIsCi(pNode) )//|| Abc_ObjFaninNum(pNode) == 0 ) if ( Abc_ObjIsCi(pNode) || (Abc_NtkIsStrash(pNode->pNtk) && Abc_ObjFaninNum(pNode) == 0) )
{ {
Vec_PtrPush( vNodes, pNode ); Vec_PtrPush( vNodes, pNode );
return; return;
......
...@@ -340,7 +340,7 @@ void Lpk_ComputeSupports( Lpk_Man_t * p, Lpk_Cut_t * pCut, unsigned * pTruth ) ...@@ -340,7 +340,7 @@ void Lpk_ComputeSupports( Lpk_Man_t * p, Lpk_Cut_t * pCut, unsigned * pTruth )
pTruthInv = Lpk_CutTruth( p, pCut, 1 ); pTruthInv = Lpk_CutTruth( p, pCut, 1 );
RetValue1 = Kit_CreateCloudFromTruth( p->pDsdMan->dd, pTruth, pCut->nLeaves, p->vBddDir ); RetValue1 = Kit_CreateCloudFromTruth( p->pDsdMan->dd, pTruth, pCut->nLeaves, p->vBddDir );
RetValue2 = Kit_CreateCloudFromTruth( p->pDsdMan->dd, pTruthInv, pCut->nLeaves, p->vBddInv ); RetValue2 = Kit_CreateCloudFromTruth( p->pDsdMan->dd, pTruthInv, pCut->nLeaves, p->vBddInv );
if ( RetValue1 && RetValue2 ) if ( RetValue1 && RetValue2 && Vec_IntSize(p->vBddDir) > 1 && Vec_IntSize(p->vBddInv) > 1 )
Kit_TruthCofSupports( p->vBddDir, p->vBddInv, pCut->nLeaves, p->vMemory, p->puSupps ); Kit_TruthCofSupports( p->vBddDir, p->vBddInv, pCut->nLeaves, p->vMemory, p->puSupps );
else else
p->puSupps[0] = p->puSupps[1] = 0; p->puSupps[0] = p->puSupps[1] = 0;
......
...@@ -220,6 +220,7 @@ Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands ) ...@@ -220,6 +220,7 @@ Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands )
Kit_Graph_t * pGraph; Kit_Graph_t * pGraph;
Hop_Obj_t * pFunc; Hop_Obj_t * pFunc;
int nFanins, status; int nFanins, status;
int c, i, * pGloVars;
// derive the SAT solver for interpolation // derive the SAT solver for interpolation
pSat = Abc_MfsCreateSolverResub( p, pCands, nCands ); pSat = Abc_MfsCreateSolverResub( p, pCands, nCands );
...@@ -235,6 +236,16 @@ Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands ) ...@@ -235,6 +236,16 @@ Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands )
pCnf = sat_solver_store_release( pSat ); pCnf = sat_solver_store_release( pSat );
sat_solver_delete( pSat ); sat_solver_delete( pSat );
// set the global variables
pGloVars = Int_ManSetGlobalVars( p->pMan, nCands );
for ( c = 0; c < nCands; c++ )
{
// get the variable number of this divisor
i = lit_var( pCands[c] ) - 2 * p->pCnf->nVars;
// get the corresponding SAT variable
pGloVars[c] = Vec_IntEntry( p->vProjVars, i );
}
// derive the interpolant // derive the interpolant
nFanins = Int_ManInterpolate( p->pMan, pCnf, 0, &puTruth ); nFanins = Int_ManInterpolate( p->pMan, pCnf, 0, &puTruth );
Sto_ManFree( pCnf ); Sto_ManFree( pCnf );
......
...@@ -235,12 +235,8 @@ p->timeInt += clock() - clk; ...@@ -235,12 +235,8 @@ p->timeInt += clock() - clk;
clk = clock(); clk = clock();
// derive the function // derive the function
pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+1 ); pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+1 );
// shift fanins by 1
for ( i = Vec_PtrSize(p->vFanins); i > 0; i-- )
p->vFanins->pArray[i] = p->vFanins->pArray[i-1];
p->vFanins->nSize++;
Vec_PtrWriteEntry( p->vFanins, 0, Vec_PtrEntry(p->vDivs, iVar) );
// update the network // update the network
Vec_PtrPush( p->vFanins, Vec_PtrEntry(p->vDivs, iVar) );
Abc_NtkMfsUpdateNetwork( p, pNode, p->vFanins, pFunc ); Abc_NtkMfsUpdateNetwork( p, pNode, p->vFanins, pFunc );
p->timeInt += clock() - clk; p->timeInt += clock() - clk;
return 1; return 1;
...@@ -372,17 +368,10 @@ p->timeInt += clock() - clk; ...@@ -372,17 +368,10 @@ p->timeInt += clock() - clk;
clk = clock(); clk = clock();
// derive the function // derive the function
pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+2 ); pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+2 );
// shift fanins by 1
for ( i = Vec_PtrSize(p->vFanins); i > 0; i-- )
p->vFanins->pArray[i] = p->vFanins->pArray[i-1];
p->vFanins->nSize++;
// shift fanins by 1
for ( i = Vec_PtrSize(p->vFanins); i > 0; i-- )
p->vFanins->pArray[i] = p->vFanins->pArray[i-1];
p->vFanins->nSize++;
Vec_PtrWriteEntry( p->vFanins, 0, Vec_PtrEntry(p->vDivs, iVar2) );
Vec_PtrWriteEntry( p->vFanins, 1, Vec_PtrEntry(p->vDivs, iVar) );
// update the network // update the network
Vec_PtrPush( p->vFanins, Vec_PtrEntry(p->vDivs, iVar2) );
Vec_PtrPush( p->vFanins, Vec_PtrEntry(p->vDivs, iVar) );
assert( Vec_PtrSize(p->vFanins) == nCands + 2 );
Abc_NtkMfsUpdateNetwork( p, pNode, p->vFanins, pFunc ); Abc_NtkMfsUpdateNetwork( p, pNode, p->vFanins, pFunc );
p->timeInt += clock() - clk; p->timeInt += clock() - clk;
return 1; return 1;
......
...@@ -37,6 +37,8 @@ struct Int_Man_t_ ...@@ -37,6 +37,8 @@ struct Int_Man_t_
{ {
// clauses of the problems // clauses of the problems
Sto_Man_t * pCnf; // the set of CNF clauses for A and B Sto_Man_t * pCnf; // the set of CNF clauses for A and B
int pGloVars[16]; // global variables
int nGloVars; // the number of global variables
// various parameters // various parameters
int fVerbose; // verbosiness flag int fVerbose; // verbosiness flag
int fProofVerif; // verifies the proof int fProofVerif; // verifies the proof
...@@ -116,6 +118,23 @@ Int_Man_t * Int_ManAlloc() ...@@ -116,6 +118,23 @@ Int_Man_t * Int_ManAlloc()
/**Function************************************************************* /**Function*************************************************************
Synopsis [Allocate proof manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int * Int_ManSetGlobalVars( Int_Man_t * p, int nGloVars )
{
p->nGloVars = nGloVars;
return p->pGloVars;
}
/**Function*************************************************************
Synopsis [Count common variables in the clauses of A and B.] Synopsis [Count common variables in the clauses of A and B.]
Description [] Description []
...@@ -139,6 +158,13 @@ int Int_ManGlobalVars( Int_Man_t * p ) ...@@ -139,6 +158,13 @@ int Int_ManGlobalVars( Int_Man_t * p )
p->pVarTypes[lit_var(pClause->pLits[v])] = 1; p->pVarTypes[lit_var(pClause->pLits[v])] = 1;
} }
if ( p->nGloVars )
{
for ( v = 0; v < p->nGloVars; v++ )
p->pVarTypes[ p->pGloVars[v] ] = - v - 1;
return p->nGloVars;
}
// check variables that appear in clauses of B // check variables that appear in clauses of B
nVarsAB = 0; nVarsAB = 0;
Sto_ManForEachClauseRoot( p->pCnf, pClause ) Sto_ManForEachClauseRoot( p->pCnf, pClause )
......
...@@ -125,6 +125,7 @@ extern Sto_Man_t * Sto_ManLoadClauses( char * pFileName ); ...@@ -125,6 +125,7 @@ extern Sto_Man_t * Sto_ManLoadClauses( char * pFileName );
/*=== satInter.c ==========================================================*/ /*=== satInter.c ==========================================================*/
typedef struct Int_Man_t_ Int_Man_t; typedef struct Int_Man_t_ Int_Man_t;
extern Int_Man_t * Int_ManAlloc(); extern Int_Man_t * Int_ManAlloc();
extern int * Int_ManSetGlobalVars( Int_Man_t * p, int nGloVars );
extern void Int_ManFree( Int_Man_t * p ); extern void Int_ManFree( Int_Man_t * p );
extern int Int_ManInterpolate( Int_Man_t * p, Sto_Man_t * pCnf, int fVerbose, unsigned ** ppResult ); extern int Int_ManInterpolate( Int_Man_t * p, Sto_Man_t * pCnf, int fVerbose, unsigned ** ppResult );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment