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
73dcdab6
Commit
73dcdab6
authored
Dec 16, 2020
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding solver type in &sat.
parent
8066fdbc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
4 deletions
+26
-4
src/base/abci/abc.c
+14
-2
src/proof/cec/cec.h
+1
-0
src/proof/cec/cecCore.c
+5
-1
src/proof/cec/cecInt.h
+5
-1
src/proof/cec/cecSolveG.c
+0
-0
src/proof/cec/module.make
+1
-0
No files found.
src/base/abci/abc.c
View file @
73dcdab6
...
...
@@ -36123,10 +36123,21 @@ int Abc_CommandAbc9Sat( Abc_Frame_t * pAbc, int argc, char ** argv )
int
fNewSolver
=
0
,
fCSat
=
0
,
f0Proved
=
0
;
Cec_ManSatSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"CSNanmtcxzvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
J
CSNanmtcxzvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'J'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-J
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
pPars
->
SolverType
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
SolverType
<
0
)
goto
usage
;
break
;
case
'C'
:
if
(
globalUtilOptind
>=
argc
)
{
...
...
@@ -36222,8 +36233,9 @@ int Abc_CommandAbc9Sat( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &sat [-CSN <num>] [-anmctxzvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &sat [-
J
CSN <num>] [-anmctxzvh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs SAT solving for the combinational outputs
\n
"
);
Abc_Print
(
-
2
,
"
\t
-J num : the SAT solver type [default = %d]
\n
"
,
pPars
->
SolverType
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of conflicts at a node [default = %d]
\n
"
,
pPars
->
nBTLimit
);
Abc_Print
(
-
2
,
"
\t
-S num : the min number of variables to recycle the solver [default = %d]
\n
"
,
pPars
->
nSatVarMax
);
Abc_Print
(
-
2
,
"
\t
-N num : the min number of calls to recycle the solver [default = %d]
\n
"
,
pPars
->
nCallsRecycle
);
src/proof/cec/cec.h
View file @
73dcdab6
...
...
@@ -43,6 +43,7 @@ ABC_NAMESPACE_HEADER_START
typedef
struct
Cec_ParSat_t_
Cec_ParSat_t
;
struct
Cec_ParSat_t_
{
int
SolverType
;
// SAT solver type
int
nBTLimit
;
// conflict limit at a node
int
nSatVarMax
;
// the max number of SAT variables
int
nCallsRecycle
;
// calls to perform before recycling SAT solver
...
...
src/proof/cec/cecCore.c
View file @
73dcdab6
...
...
@@ -45,6 +45,7 @@ ABC_NAMESPACE_IMPL_START
void
Cec_ManSatSetDefaultParams
(
Cec_ParSat_t
*
p
)
{
memset
(
p
,
0
,
sizeof
(
Cec_ParSat_t
)
);
p
->
SolverType
=
-
1
;
// SAT solver type
p
->
nBTLimit
=
100
;
// conflict limit at a node
p
->
nSatVarMax
=
2000
;
// the max number of SAT variables
p
->
nCallsRecycle
=
200
;
// calls to perform before recycling SAT solver
...
...
@@ -237,7 +238,10 @@ Gia_Man_t * Cec_ManSatSolving( Gia_Man_t * pAig, Cec_ParSat_t * pPars, int f0Pro
Gia_Man_t
*
pNew
;
Cec_ManPat_t
*
pPat
;
pPat
=
Cec_ManPatStart
();
Cec_ManSatSolve
(
pPat
,
pAig
,
pPars
,
NULL
,
NULL
,
NULL
,
f0Proved
);
if
(
pPars
->
SolverType
==
-
1
)
Cec_ManSatSolve
(
pPat
,
pAig
,
pPars
,
NULL
,
NULL
,
NULL
,
f0Proved
);
else
CecG_ManSatSolve
(
pPat
,
pAig
,
pPars
,
f0Proved
);
// pNew = Gia_ManDupDfsSkip( pAig );
pNew
=
Gia_ManCleanup
(
pAig
);
Cec_ManPatStop
(
pPat
);
...
...
src/proof/cec/cecInt.h
View file @
73dcdab6
...
...
@@ -27,6 +27,7 @@
////////////////////////////////////////////////////////////////////////
#include "sat/bsat/satSolver.h"
#include "sat/glucose2/AbcGlucose2.h"
#include "misc/bar/bar.h"
#include "aig/gia/gia.h"
#include "cec.h"
...
...
@@ -80,7 +81,8 @@ struct Cec_ManSat_t_
Gia_Man_t
*
pAig
;
// the AIG whose outputs are considered
Vec_Int_t
*
vStatus
;
// status for each output
// SAT solving
sat_solver
*
pSat
;
// recyclable SAT solver
sat_solver
*
pSat
;
// recyclable SAT solver (MiniSAT)
bmcg2_sat_solver
*
pSat2
;
// recyclable SAT solver (Glucose)
int
nSatVars
;
// the counter of SAT variables
int
*
pSatVars
;
// mapping of each node into its SAT var
Vec_Ptr_t
*
vUsedNodes
;
// nodes whose SAT vars are assigned
...
...
@@ -212,6 +214,8 @@ extern int Cec_ManSatCheckNode( Cec_ManSat_t * p, Gia_Obj_t * p
extern
int
Cec_ManSatCheckNodeTwo
(
Cec_ManSat_t
*
p
,
Gia_Obj_t
*
pObj1
,
Gia_Obj_t
*
pObj2
);
extern
void
Cec_ManSavePattern
(
Cec_ManSat_t
*
p
,
Gia_Obj_t
*
pObj1
,
Gia_Obj_t
*
pObj2
);
extern
Vec_Int_t
*
Cec_ManSatReadCex
(
Cec_ManSat_t
*
p
);
/*=== cecSolveG.c ============================================================*/
extern
void
CecG_ManSatSolve
(
Cec_ManPat_t
*
pPat
,
Gia_Man_t
*
pAig
,
Cec_ParSat_t
*
pPars
,
int
f0Proved
);
/*=== ceFraeep.c ============================================================*/
extern
Gia_Man_t
*
Cec_ManFraSpecReduction
(
Cec_ManFra_t
*
p
);
extern
int
Cec_ManFraClassesUpdate
(
Cec_ManFra_t
*
p
,
Cec_ManSim_t
*
pSim
,
Cec_ManPat_t
*
pPat
,
Gia_Man_t
*
pNew
);
...
...
src/proof/cec/cecSolveG.c
0 → 100644
View file @
73dcdab6
This diff is collapsed.
Click to expand it.
src/proof/cec/module.make
View file @
73dcdab6
...
...
@@ -11,6 +11,7 @@ SRC += src/proof/cec/cecCec.c \
src/proof/cec/cecSatG2.c
\
src/proof/cec/cecSeq.c
\
src/proof/cec/cecSolve.c
\
src/proof/cec/cecSolveG.c
\
src/proof/cec/cecSplit.c
\
src/proof/cec/cecSynth.c
\
src/proof/cec/cecSweep.c
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