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
36858c53
Commit
36858c53
authored
Sep 18, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabling Glucose in SAT sweeping: &fraig -g.
parent
12d21480
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
3 deletions
+26
-3
src/base/abci/abc.c
+10
-3
src/proof/cec/cecSatG.c
+0
-0
src/sat/glucose/AbcGlucose.cpp
+10
-0
src/sat/glucose/AbcGlucose.h
+6
-0
No files found.
src/base/abci/abc.c
View file @
36858c53
...
@@ -33236,13 +33236,14 @@ usage:
...
@@ -33236,13 +33236,14 @@ usage:
int
Abc_CommandAbc9Fraig
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Fraig
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
Gia_Man_t
*
Cec2_ManSimulateTest
(
Gia_Man_t
*
p
,
Cec_ParFra_t
*
pPars
);
extern
Gia_Man_t
*
Cec2_ManSimulateTest
(
Gia_Man_t
*
p
,
Cec_ParFra_t
*
pPars
);
extern
Gia_Man_t
*
Cec3_ManSimulateTest
(
Gia_Man_t
*
p
,
Cec_ParFra_t
*
pPars
);
Cec_ParFra_t
ParsFra
,
*
pPars
=
&
ParsFra
;
Cec_ParFra_t
ParsFra
,
*
pPars
=
&
ParsFra
;
Gia_Man_t
*
pTemp
;
Gia_Man_t
*
pTemp
;
int
c
,
fUseAlgo
=
0
;
int
c
,
fUseAlgo
=
0
,
fUseAlgoG
=
0
;
Cec_ManFraSetDefaultParams
(
pPars
);
Cec_ManFraSetDefaultParams
(
pPars
);
pPars
->
fSatSweeping
=
1
;
pPars
->
fSatSweeping
=
1
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WRILDCrmdcknwvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WRILDCrmdckn
g
wvh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -33330,6 +33331,9 @@ int Abc_CommandAbc9Fraig( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -33330,6 +33331,9 @@ int Abc_CommandAbc9Fraig( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'n'
:
case
'n'
:
fUseAlgo
^=
1
;
fUseAlgo
^=
1
;
break
;
break
;
case
'g'
:
fUseAlgoG
^=
1
;
break
;
case
'w'
:
case
'w'
:
pPars
->
fVeryVerbose
^=
1
;
pPars
->
fVeryVerbose
^=
1
;
break
;
break
;
...
@@ -33347,13 +33351,15 @@ int Abc_CommandAbc9Fraig( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -33347,13 +33351,15 @@ int Abc_CommandAbc9Fraig( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
if
(
fUseAlgo
)
if
(
fUseAlgo
)
pTemp
=
Cec2_ManSimulateTest
(
pAbc
->
pGia
,
pPars
);
pTemp
=
Cec2_ManSimulateTest
(
pAbc
->
pGia
,
pPars
);
else
if
(
fUseAlgoG
)
pTemp
=
Cec3_ManSimulateTest
(
pAbc
->
pGia
,
pPars
);
else
else
pTemp
=
Cec_ManSatSweeping
(
pAbc
->
pGia
,
pPars
,
0
);
pTemp
=
Cec_ManSatSweeping
(
pAbc
->
pGia
,
pPars
,
0
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &fraig [-WRILDC <num>] [-rmdcknwvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &fraig [-WRILDC <num>] [-rmdckn
g
wvh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs combinational SAT sweeping
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs combinational SAT sweeping
\n
"
);
Abc_Print
(
-
2
,
"
\t
-W num : the number of simulation words [default = %d]
\n
"
,
pPars
->
nWords
);
Abc_Print
(
-
2
,
"
\t
-W num : the number of simulation words [default = %d]
\n
"
,
pPars
->
nWords
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of simulation rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of simulation rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
...
@@ -33367,6 +33373,7 @@ usage:
...
@@ -33367,6 +33373,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-c : toggle using circuit-based solver [default = %s]
\n
"
,
pPars
->
fRunCSat
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle using circuit-based solver [default = %s]
\n
"
,
pPars
->
fRunCSat
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-k : toggle using logic cones in the SAT solver [default = %s]
\n
"
,
pPars
->
fUseCones
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-k : toggle using logic cones in the SAT solver [default = %s]
\n
"
,
pPars
->
fUseCones
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-n : toggle using new implementation [default = %s]
\n
"
,
fUseAlgo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-n : toggle using new implementation [default = %s]
\n
"
,
fUseAlgo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-g : toggle using another new implementation [default = %s]
\n
"
,
fUseAlgoG
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing even more verbose information [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing even more verbose information [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
src/proof/cec/cecSatG.c
0 → 100644
View file @
36858c53
This diff is collapsed.
Click to expand it.
src/sat/glucose/AbcGlucose.cpp
View file @
36858c53
...
@@ -71,6 +71,11 @@ void glucose_solver_stop(Gluco::SimpSolver* S)
...
@@ -71,6 +71,11 @@ void glucose_solver_stop(Gluco::SimpSolver* S)
delete
S
;
delete
S
;
}
}
void
glucose_solver_reset
(
Gluco
::
SimpSolver
*
S
)
{
S
->
reset
();
}
int
glucose_solver_addclause
(
Gluco
::
SimpSolver
*
S
,
int
*
plits
,
int
nlits
)
int
glucose_solver_addclause
(
Gluco
::
SimpSolver
*
S
,
int
*
plits
,
int
nlits
)
{
{
vec
<
Lit
>
lits
;
vec
<
Lit
>
lits
;
...
@@ -142,6 +147,11 @@ void bmcg_sat_solver_stop(bmcg_sat_solver* s)
...
@@ -142,6 +147,11 @@ void bmcg_sat_solver_stop(bmcg_sat_solver* s)
{
{
glucose_solver_stop
((
Gluco
::
SimpSolver
*
)
s
);
glucose_solver_stop
((
Gluco
::
SimpSolver
*
)
s
);
}
}
void
bmcg_sat_solver_reset
(
bmcg_sat_solver
*
s
)
{
glucose_solver_reset
((
Gluco
::
SimpSolver
*
)
s
);
}
int
bmcg_sat_solver_addclause
(
bmcg_sat_solver
*
s
,
int
*
plits
,
int
nlits
)
int
bmcg_sat_solver_addclause
(
bmcg_sat_solver
*
s
,
int
*
plits
,
int
nlits
)
{
{
...
...
src/sat/glucose/AbcGlucose.h
View file @
36858c53
...
@@ -33,6 +33,11 @@
...
@@ -33,6 +33,11 @@
ABC_NAMESPACE_HEADER_START
ABC_NAMESPACE_HEADER_START
#define GLUCOSE_UNSAT -1
#define GLUCOSE_SAT 1
#define GLUCOSE_UNDEC 0
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
/// BASIC TYPES ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
@@ -67,6 +72,7 @@ typedef void bmcg_sat_solver;
...
@@ -67,6 +72,7 @@ typedef void bmcg_sat_solver;
extern
bmcg_sat_solver
*
bmcg_sat_solver_start
();
extern
bmcg_sat_solver
*
bmcg_sat_solver_start
();
extern
void
bmcg_sat_solver_stop
(
bmcg_sat_solver
*
s
);
extern
void
bmcg_sat_solver_stop
(
bmcg_sat_solver
*
s
);
extern
void
bmcg_sat_solver_reset
(
bmcg_sat_solver
*
s
);
extern
int
bmcg_sat_solver_addclause
(
bmcg_sat_solver
*
s
,
int
*
plits
,
int
nlits
);
extern
int
bmcg_sat_solver_addclause
(
bmcg_sat_solver
*
s
,
int
*
plits
,
int
nlits
);
extern
void
bmcg_sat_solver_setcallback
(
bmcg_sat_solver
*
s
,
void
*
pman
,
int
(
*
pfunc
)(
void
*
,
int
,
int
*
)
);
extern
void
bmcg_sat_solver_setcallback
(
bmcg_sat_solver
*
s
,
void
*
pman
,
int
(
*
pfunc
)(
void
*
,
int
,
int
*
)
);
extern
int
bmcg_sat_solver_solve
(
bmcg_sat_solver
*
s
,
int
*
plits
,
int
nlits
);
extern
int
bmcg_sat_solver_solve
(
bmcg_sat_solver
*
s
,
int
*
plits
,
int
nlits
);
...
...
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