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
8de7383e
Commit
8de7383e
authored
Apr 12, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructing sat_solver_solve() method for pushing/popping assumptions.
parent
b4bb88ae
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
src/sat/bsat/satSolver.c
+0
-0
src/sat/bsat/satSolver.h
+19
-8
src/sat/bsat/satUtil.c
+0
-1
No files found.
src/sat/bsat/satSolver.c
View file @
8de7383e
This diff is collapsed.
Click to expand it.
src/sat/bsat/satSolver.h
View file @
8de7383e
...
@@ -48,6 +48,10 @@ extern int sat_solver_addclause(sat_solver* s, lit* begin, lit* end);
...
@@ -48,6 +48,10 @@ extern int sat_solver_addclause(sat_solver* s, lit* begin, lit* end);
extern
int
sat_solver_clause_new
(
sat_solver
*
s
,
lit
*
begin
,
lit
*
end
,
int
learnt
);
extern
int
sat_solver_clause_new
(
sat_solver
*
s
,
lit
*
begin
,
lit
*
end
,
int
learnt
);
extern
int
sat_solver_simplify
(
sat_solver
*
s
);
extern
int
sat_solver_simplify
(
sat_solver
*
s
);
extern
int
sat_solver_solve
(
sat_solver
*
s
,
lit
*
begin
,
lit
*
end
,
ABC_INT64_T
nConfLimit
,
ABC_INT64_T
nInsLimit
,
ABC_INT64_T
nConfLimitGlobal
,
ABC_INT64_T
nInsLimitGlobal
);
extern
int
sat_solver_solve
(
sat_solver
*
s
,
lit
*
begin
,
lit
*
end
,
ABC_INT64_T
nConfLimit
,
ABC_INT64_T
nInsLimit
,
ABC_INT64_T
nConfLimitGlobal
,
ABC_INT64_T
nInsLimitGlobal
);
extern
int
sat_solver_solve_internal
(
sat_solver
*
s
);
extern
int
sat_solver_push
(
sat_solver
*
s
,
int
p
);
extern
void
sat_solver_pop
(
sat_solver
*
s
);
extern
void
sat_solver_set_resource_limits
(
sat_solver
*
s
,
ABC_INT64_T
nConfLimit
,
ABC_INT64_T
nInsLimit
,
ABC_INT64_T
nConfLimitGlobal
,
ABC_INT64_T
nInsLimitGlobal
);
extern
void
sat_solver_restart
(
sat_solver
*
s
);
extern
void
sat_solver_restart
(
sat_solver
*
s
);
extern
void
sat_solver_rollback
(
sat_solver
*
s
);
extern
void
sat_solver_rollback
(
sat_solver
*
s
);
...
@@ -223,12 +227,27 @@ static void sat_solver_compress(sat_solver* s)
...
@@ -223,12 +227,27 @@ static void sat_solver_compress(sat_solver* s)
(
void
)
RetValue
;
(
void
)
RetValue
;
}
}
}
}
static
void
sat_solver_clean_polarity
(
sat_solver
*
s
,
int
*
pVars
,
int
nVars
)
static
void
sat_solver_clean_polarity
(
sat_solver
*
s
,
int
*
pVars
,
int
nVars
)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
nVars
;
i
++
)
for
(
i
=
0
;
i
<
nVars
;
i
++
)
s
->
polarity
[
pVars
[
i
]]
=
0
;
s
->
polarity
[
pVars
[
i
]]
=
0
;
}
}
static
void
sat_solver_set_polarity
(
sat_solver
*
s
,
int
*
pVars
,
int
nVars
)
{
int
i
;
for
(
i
=
0
;
i
<
s
->
size
;
i
++
)
s
->
polarity
[
i
]
=
0
;
for
(
i
=
0
;
i
<
nVars
;
i
++
)
s
->
polarity
[
pVars
[
i
]]
=
1
;
}
static
void
sat_solver_set_literal_polarity
(
sat_solver
*
s
,
int
*
pLits
,
int
nLits
)
{
int
i
;
for
(
i
=
0
;
i
<
nLits
;
i
++
)
s
->
polarity
[
Abc_Lit2Var
(
pLits
[
i
])]
=
!
Abc_LitIsCompl
(
pLits
[
i
]);
}
static
int
sat_solver_final
(
sat_solver
*
s
,
int
**
ppArray
)
static
int
sat_solver_final
(
sat_solver
*
s
,
int
**
ppArray
)
{
{
...
@@ -279,14 +298,6 @@ static inline int sat_solver_count_usedvars(sat_solver* s)
...
@@ -279,14 +298,6 @@ static inline int sat_solver_count_usedvars(sat_solver* s)
}
}
return
nVars
;
return
nVars
;
}
}
static
void
sat_solver_set_polarity
(
sat_solver
*
s
,
int
*
pVars
,
int
nVars
)
{
int
i
;
for
(
i
=
0
;
i
<
s
->
size
;
i
++
)
s
->
polarity
[
i
]
=
0
;
for
(
i
=
0
;
i
<
nVars
;
i
++
)
s
->
polarity
[
pVars
[
i
]]
=
1
;
}
static
inline
int
sat_solver_add_const
(
sat_solver
*
pSat
,
int
iVar
,
int
fCompl
)
static
inline
int
sat_solver_add_const
(
sat_solver
*
pSat
,
int
iVar
,
int
fCompl
)
{
{
...
...
src/sat/bsat/satUtil.c
View file @
8de7383e
...
@@ -192,7 +192,6 @@ static inline double Sat_Wrd2Dbl( word w ) { return (double)(unsigned)(w&0x3FFF
...
@@ -192,7 +192,6 @@ static inline double Sat_Wrd2Dbl( word w ) { return (double)(unsigned)(w&0x3FFF
void
Sat_SolverPrintStats
(
FILE
*
pFile
,
sat_solver
*
p
)
void
Sat_SolverPrintStats
(
FILE
*
pFile
,
sat_solver
*
p
)
{
{
// printf( "calls : %10d (%d)\n", (int)p->nCalls, (int)p->nCalls2 );
printf
(
"starts : %16.0f
\n
"
,
Sat_Wrd2Dbl
(
p
->
stats
.
starts
)
);
printf
(
"starts : %16.0f
\n
"
,
Sat_Wrd2Dbl
(
p
->
stats
.
starts
)
);
printf
(
"conflicts : %16.0f
\n
"
,
Sat_Wrd2Dbl
(
p
->
stats
.
conflicts
)
);
printf
(
"conflicts : %16.0f
\n
"
,
Sat_Wrd2Dbl
(
p
->
stats
.
conflicts
)
);
printf
(
"decisions : %16.0f
\n
"
,
Sat_Wrd2Dbl
(
p
->
stats
.
decisions
)
);
printf
(
"decisions : %16.0f
\n
"
,
Sat_Wrd2Dbl
(
p
->
stats
.
decisions
)
);
...
...
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