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
6e65cd14
Commit
6e65cd14
authored
Feb 26, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User-controlable SAT sweeper.
parent
b1c0b338
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/aig/gia/giaSweeper.c
+7
-2
No files found.
src/aig/gia/giaSweeper.c
View file @
6e65cd14
...
...
@@ -68,12 +68,12 @@ struct Swp_Man_t_
Vec_Int_t
*
vCondProbes
;
// conditions as probes
Vec_Int_t
*
vCondLits
;
// conditions as literals
// equivalence checking
sat_solver
*
pSat
;
// SAT solver
Vec_Int_t
*
vId2Lit
;
// mapping of Obj IDs into SAT literal
Vec_Int_t
*
vFront
;
// temporary frontier
Vec_Int_t
*
vFanins
;
// temporary fanins
Vec_Int_t
*
vCexSwp
;
// sweeper counter-example
Vec_Int_t
*
vCexUser
;
// user-visible counter-example
sat_solver
*
pSat
;
// SAT solver
int
nSatVars
;
// counter of SAT variables
// statistics
int
nSatCalls
;
...
...
@@ -124,7 +124,8 @@ static inline Swp_Man_t * Swp_ManStart( Gia_Man_t * pGia )
p
->
vCexSwp
=
Vec_IntAlloc
(
100
);
p
->
pSat
=
sat_solver_new
();
p
->
nSatVars
=
1
;
Swp_ManSetObj2Lit
(
p
,
0
,
(
Lit
=
Abc_Var2Lit
(
p
->
nSatVars
++
,
1
))
);
Swp_ManSetObj2Lit
(
p
,
0
,
(
Lit
=
Abc_Var2Lit
(
p
->
nSatVars
++
,
0
))
);
Lit
=
Abc_LitNot
(
Lit
);
sat_solver_addclause
(
p
->
pSat
,
&
Lit
,
&
Lit
+
1
);
pGia
->
pData
=
p
;
return
p
;
...
...
@@ -310,9 +311,13 @@ Gia_Man_t * Gia_SweeperExtractUserLogic( Gia_Man_t * p, Vec_Int_t * vProbeIds, V
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManForEachPi
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
// create internal nodes
Gia_ManHashStart
(
pNew
);
Gia_ManForEachObjVec
(
vObjIds
,
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
Gia_ManHashStop
(
pNew
);
Vec_IntFree
(
vObjIds
);
// create outputs
Vec_IntForEachEntry
(
vProbeIds
,
ProbeId
,
i
)
{
pObj
=
Gia_Lit2Obj
(
p
,
Gia_SweeperProbeLit
(
p
,
ProbeId
)
);
...
...
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