Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
f2d4f6c2
Commit
f2d4f6c2
authored
Feb 08, 2008
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version abc80208
parent
5a692406
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
17 deletions
+50
-17
abc.rc
+6
-0
src/base/abc/abcDfs.c
+1
-1
src/opt/lpk/lpkCore.c
+1
-1
src/opt/mfs/mfsInter.c
+11
-0
src/opt/mfs/mfsResub.c
+4
-15
src/sat/bsat/satInter.c
+26
-0
src/sat/bsat/satStore.h
+1
-0
No files found.
abc.rc
View file @
f2d4f6c2
...
...
@@ -24,12 +24,16 @@ set gnuplotunix gnuplot
alias b balance
alias cl cleanup
alias clp collapse
alias cs care_set
alias dc2 dcompress2
alias esd ext_seq_dcs
alias f fraig
alias fs fraig_sweep
alias fsto fraig_store
alias fres fraig_restore
alias fr fretime
alias ft fraig_trust
alias ic indcut
alias lp lutpack
alias pd print_dsd
alias pex print_exdc -d
...
...
@@ -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 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 t1 "r s27mc2.blif; st; test"
alias t2 "r i/intel_001.aig; ps; indcut -v"
...
...
src/base/abc/abcDfs.c
View file @
f2d4f6c2
...
...
@@ -677,7 +677,7 @@ void Abc_NtkNodeSupport_rec( Abc_Obj_t * pNode, Vec_Ptr_t * vNodes )
// mark the node as visited
Abc_NodeSetTravIdCurrent
(
pNode
);
// 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
);
return
;
...
...
src/opt/lpk/lpkCore.c
View file @
f2d4f6c2
...
...
@@ -340,7 +340,7 @@ void Lpk_ComputeSupports( Lpk_Man_t * p, Lpk_Cut_t * pCut, unsigned * pTruth )
pTruthInv
=
Lpk_CutTruth
(
p
,
pCut
,
1
);
RetValue1
=
Kit_CreateCloudFromTruth
(
p
->
pDsdMan
->
dd
,
pTruth
,
pCut
->
nLeaves
,
p
->
vBddDir
);
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
);
else
p
->
puSupps
[
0
]
=
p
->
puSupps
[
1
]
=
0
;
...
...
src/opt/mfs/mfsInter.c
View file @
f2d4f6c2
...
...
@@ -220,6 +220,7 @@ Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands )
Kit_Graph_t
*
pGraph
;
Hop_Obj_t
*
pFunc
;
int
nFanins
,
status
;
int
c
,
i
,
*
pGloVars
;
// derive the SAT solver for interpolation
pSat
=
Abc_MfsCreateSolverResub
(
p
,
pCands
,
nCands
);
...
...
@@ -235,6 +236,16 @@ Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands )
pCnf
=
sat_solver_store_release
(
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
nFanins
=
Int_ManInterpolate
(
p
->
pMan
,
pCnf
,
0
,
&
puTruth
);
Sto_ManFree
(
pCnf
);
...
...
src/opt/mfs/mfsResub.c
View file @
f2d4f6c2
...
...
@@ -235,12 +235,8 @@ p->timeInt += clock() - clk;
clk
=
clock
();
// derive the function
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
Vec_PtrPush
(
p
->
vFanins
,
Vec_PtrEntry
(
p
->
vDivs
,
iVar
)
);
Abc_NtkMfsUpdateNetwork
(
p
,
pNode
,
p
->
vFanins
,
pFunc
);
p
->
timeInt
+=
clock
()
-
clk
;
return
1
;
...
...
@@ -372,17 +368,10 @@ p->timeInt += clock() - clk;
clk
=
clock
();
// derive the function
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
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
);
p
->
timeInt
+=
clock
()
-
clk
;
return
1
;
...
...
src/sat/bsat/satInter.c
View file @
f2d4f6c2
...
...
@@ -37,6 +37,8 @@ struct Int_Man_t_
{
// clauses of the problems
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
int
fVerbose
;
// verbosiness flag
int
fProofVerif
;
// verifies the proof
...
...
@@ -116,6 +118,23 @@ Int_Man_t * Int_ManAlloc()
/**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.]
Description []
...
...
@@ -139,6 +158,13 @@ int Int_ManGlobalVars( Int_Man_t * p )
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
nVarsAB
=
0
;
Sto_ManForEachClauseRoot
(
p
->
pCnf
,
pClause
)
...
...
src/sat/bsat/satStore.h
View file @
f2d4f6c2
...
...
@@ -125,6 +125,7 @@ extern Sto_Man_t * Sto_ManLoadClauses( char * pFileName );
/*=== satInter.c ==========================================================*/
typedef
struct
Int_Man_t_
Int_Man_t
;
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
int
Int_ManInterpolate
(
Int_Man_t
*
p
,
Sto_Man_t
*
pCnf
,
int
fVerbose
,
unsigned
**
ppResult
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment