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
8a11c911
Commit
8a11c911
authored
Sep 07, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler warnings.
parent
7ce7e9ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
src/sat/glucose/Glucose.cpp
+11
-11
src/sat/glucose/Options.cpp
+2
-1
src/sat/glucose/SimpSolver.cpp
+6
-4
No files found.
src/sat/glucose/Glucose.cpp
View file @
8a11c911
...
...
@@ -92,8 +92,8 @@ Solver::Solver() :
SolverType
(
0
)
,
pCnfFunc
(
NULL
)
,
nCallConfl
(
1000
)
,
verbEveryConflicts
(
10000
)
,
terminate_search_early
(
false
)
,
verbEveryConflicts
(
10000
)
,
pstop
(
NULL
)
,
nRuntimeLimit
(
0
)
...
...
@@ -1188,16 +1188,16 @@ double Solver::progressEstimate() const
void
Solver
::
printIncrementalStats
()
{
printf
(
"c---------- Glucose Stats -------------------------
\n
"
);
printf
(
"c restarts : %l
l
d
\n
"
,
starts
);
printf
(
"c nb ReduceDB : %l
l
d
\n
"
,
nbReduceDB
);
printf
(
"c nb removed Clauses : %l
l
d
\n
"
,
nbRemovedClauses
);
printf
(
"c nb learnts DL2 : %l
l
d
\n
"
,
nbDL2
);
printf
(
"c nb learnts size 2 : %l
l
d
\n
"
,
nbBin
);
printf
(
"c nb learnts size 1 : %l
l
d
\n
"
,
nbUn
);
printf
(
"c conflicts : %l
l
d
\n
"
,
conflicts
);
printf
(
"c decisions : %l
l
d
\n
"
,
decisions
);
printf
(
"c propagations : %l
l
d
\n
"
,
propagations
);
printf
(
"c restarts : %ld
\n
"
,
starts
);
printf
(
"c nb ReduceDB : %ld
\n
"
,
nbReduceDB
);
printf
(
"c nb removed Clauses : %ld
\n
"
,
nbRemovedClauses
);
printf
(
"c nb learnts DL2 : %ld
\n
"
,
nbDL2
);
printf
(
"c nb learnts size 2 : %ld
\n
"
,
nbBin
);
printf
(
"c nb learnts size 1 : %ld
\n
"
,
nbUn
);
printf
(
"c conflicts : %ld
\n
"
,
conflicts
);
printf
(
"c decisions : %ld
\n
"
,
decisions
);
printf
(
"c propagations : %ld
\n
"
,
propagations
);
printf
(
"c SAT Calls : %d in %g seconds
\n
"
,
nbSatCalls
,
totalTime4Sat
);
printf
(
"c UNSAT Calls : %d in %g seconds
\n
"
,
nbUnsatCalls
,
totalTime4Unsat
);
...
...
src/sat/glucose/Options.cpp
View file @
8a11c911
...
...
@@ -42,11 +42,12 @@ void Gluco::parseOptions(int& argc, char** argv, bool strict)
// fprintf(stderr, "checking %d: %s against flag <%s> (%s)\n", i, argv[i], Option::getOptionList()[k]->name, parsed_ok ? "ok" : "skip");
}
if
(
!
parsed_ok
)
if
(
!
parsed_ok
)
{
if
(
strict
&&
match
(
argv
[
i
],
"-"
))
fprintf
(
stderr
,
"ERROR! Unknown flag
\"
%s
\"
. Use '--%shelp' for help.
\n
"
,
argv
[
i
],
Option
::
getHelpPrefixString
()),
exit
(
1
);
else
argv
[
j
++
]
=
argv
[
i
];
}
}
}
...
...
src/sat/glucose/SimpSolver.cpp
View file @
8a11c911
...
...
@@ -241,15 +241,16 @@ bool SimpSolver::merge(const Clause& _ps, const Clause& _qs, Var v, vec<Lit>& ou
const
Clause
&
ps
=
ps_smallest
?
_qs
:
_ps
;
const
Clause
&
qs
=
ps_smallest
?
_ps
:
_qs
;
int
i
;
int
i
,
j
;
for
(
i
=
0
;
i
<
qs
.
size
();
i
++
){
if
(
var
(
qs
[
i
])
!=
v
){
for
(
int
j
=
0
;
j
<
ps
.
size
();
j
++
)
if
(
var
(
ps
[
j
])
==
var
(
qs
[
i
]))
for
(
j
=
0
;
j
<
ps
.
size
();
j
++
)
if
(
var
(
ps
[
j
])
==
var
(
qs
[
i
]))
{
if
(
ps
[
j
]
==
~
qs
[
i
])
return
false
;
else
goto
next
;
}
out_clause
.
push
(
qs
[
i
]);
}
next
:
;
...
...
@@ -279,11 +280,12 @@ bool SimpSolver::merge(const Clause& _ps, const Clause& _qs, Var v, int& size)
for
(
int
i
=
0
;
i
<
qs
.
size
();
i
++
){
if
(
var
(
__qs
[
i
])
!=
v
){
for
(
int
j
=
0
;
j
<
ps
.
size
();
j
++
)
if
(
var
(
__ps
[
j
])
==
var
(
__qs
[
i
]))
if
(
var
(
__ps
[
j
])
==
var
(
__qs
[
i
]))
{
if
(
__ps
[
j
]
==
~
__qs
[
i
])
return
false
;
else
goto
next
;
}
size
++
;
}
next
:
;
...
...
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