Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
SAT4J
sat4j
Commits
309b935d
Commit
309b935d
authored
Nov 08, 2018
by
Daniel Le Berre
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that non unit constraints are really entered in the solver. Thanks
STAMP.
parent
ec652dcd
Pipeline
#3319
passed with stages
in 36 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
org.sat4j.core/src/test/java/org/sat4j/BugSAT34.java
org.sat4j.core/src/test/java/org/sat4j/BugSAT34.java
+9
-4
No files found.
org.sat4j.core/src/test/java/org/sat4j/BugSAT34.java
View file @
309b935d
...
...
@@ -63,7 +63,8 @@ public class BugSAT34 {
for
(
String
name
:
SolverFactory
.
instance
().
solverNames
())
{
if
(!
"DimacsOutput"
.
equals
(
name
)
&&
!
"Statistics"
.
equals
(
name
))
{
solvers
.
add
(
new
Object
[]
{
SolverFactory
.
instance
().
createSolverByName
(
name
),
name
});
SolverFactory
.
instance
().
createSolverByName
(
name
),
name
});
}
}
return
solvers
;
...
...
@@ -74,9 +75,13 @@ public class BugSAT34 {
this
.
system
.
newVar
(
3
);
try
{
// x_1 v x_2 <=> x_3
this
.
system
.
addClause
(
new
VecInt
(
new
int
[]
{
1
,
2
,
-
3
}));
this
.
system
.
addClause
(
new
VecInt
(
new
int
[]
{
-
1
,
3
}));
this
.
system
.
addClause
(
new
VecInt
(
new
int
[]
{
-
2
,
3
}));
IConstr
nonunit
;
nonunit
=
this
.
system
.
addClause
(
new
VecInt
(
new
int
[]
{
1
,
2
,
-
3
}));
assertNotNull
(
nonunit
);
nonunit
=
this
.
system
.
addClause
(
new
VecInt
(
new
int
[]
{
-
1
,
3
}));
assertNotNull
(
nonunit
);
nonunit
=
this
.
system
.
addClause
(
new
VecInt
(
new
int
[]
{
-
2
,
3
}));
assertNotNull
(
nonunit
);
// not both true
this
.
system
.
addClause
(
new
VecInt
(
new
int
[]
{
-
1
,
-
2
}));
// x2 is true
...
...
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