Skip to content

Commit

Permalink
Optimize skipped bounds value
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuesly committed Nov 27, 2020
1 parent 2eaf27d commit 5208178
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Binary file modified lib/jconstraints-0.9.7-SNAPSHOT.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public class BoundedSolver extends ConstraintSolver {
private final int bound;

private final int fibonacci[] = {
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765
};
private final int skipped[] = {2, 5, 21};
private final int skipped[] = {2, 8, 13};
BoundType type;

public BoundedSolver(ConstraintSolver back, int bound, int itr, BoundType type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import gov.nasa.jpf.constraints.api.ConstraintSolver;
import gov.nasa.jpf.constraints.solvers.ConstraintSolverFactory;
import gov.nasa.jpf.constraints.solvers.ConstraintSolverProvider;

import java.util.Properties;

public class BoundedSolverProvider implements ConstraintSolverProvider {
Expand Down Expand Up @@ -31,7 +30,12 @@ public ConstraintSolver createSolver(Properties config) {
if (config.containsKey("bounded.iter")) {
iter = Integer.parseInt(config.getProperty("bounded.iter"));
}
if (config.containsKey("bounded.type") && config.getProperty("bounded.type").equals("fibonacci")) {
if (config.containsKey("bounded.type") && config.getProperty("bounded.type")
.equals("fibonacci")) {
type = BoundedSolver.BoundType.fibonacci;
}
if (config.containsKey("bounded.type") && config.getProperty("bounded.type")
.equals("skipped")) {
type = BoundedSolver.BoundType.fibonacci;
}

Expand Down

0 comments on commit 5208178

Please sign in to comment.