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
97d2c9a2
Commit
97d2c9a2
authored
Jul 12, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added procedure for checking satisfied clauses.
parent
17305bd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
src/sat/bsat/satSolver2.c
+37
-0
No files found.
src/sat/bsat/satSolver2.c
View file @
97d2c9a2
...
...
@@ -1717,6 +1717,43 @@ void sat_solver2_verify( sat_solver2* s )
// Abc_Print(1, "Verification passed.\n" );
}
*/
// checks how many watched clauses are satisfied by 0-level assignments
// (this procedure may be called before setting up a new bookmark for rollback)
int
sat_solver2_check_watched
(
sat_solver2
*
s
)
{
clause
*
c
;
int
i
,
k
,
j
,
m
;
int
claSat
[
2
]
=
{
0
};
// update watches
for
(
i
=
0
;
i
<
s
->
size
*
2
;
i
++
)
{
int
*
pArray
=
veci_begin
(
&
s
->
wlists
[
i
]);
for
(
m
=
k
=
0
;
k
<
veci_size
(
&
s
->
wlists
[
i
]);
k
++
)
{
c
=
clause2_read
(
s
,
pArray
[
k
]);
for
(
j
=
0
;
j
<
(
int
)
c
->
size
;
j
++
)
if
(
var_value
(
s
,
lit_var
(
c
->
lits
[
j
]))
==
lit_sign
(
c
->
lits
[
j
])
)
// true lit
break
;
if
(
j
==
(
int
)
c
->
size
)
{
pArray
[
m
++
]
=
pArray
[
k
];
continue
;
}
claSat
[
c
->
lrn
]
++
;
}
veci_resize
(
&
s
->
wlists
[
i
],
m
);
if
(
m
==
0
)
{
// s->wlists[i].cap = 0;
// s->wlists[i].size = 0;
// ABC_FREE( s->wlists[i].ptr );
}
}
// printf( "\nClauses = %d (Sat = %d). Learned = %d (Sat = %d).\n",
// s->stats.clauses, claSat[0], s->stats.learnts, claSat[1] );
return
0
;
}
int
sat_solver2_solve
(
sat_solver2
*
s
,
lit
*
begin
,
lit
*
end
,
ABC_INT64_T
nConfLimit
,
ABC_INT64_T
nInsLimit
,
ABC_INT64_T
nConfLimitGlobal
,
ABC_INT64_T
nInsLimitGlobal
)
{
...
...
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