Commit fa9ba0fe authored by Daniel Le Berre's avatar Daniel Le Berre

Fixed raw type warnings

parent daa46686
...@@ -153,8 +153,9 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -153,8 +153,9 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
DataStructureFactory dsf) { DataStructureFactory dsf) {
MiniSATLearning<DataStructureFactory> learning = new MiniSATLearning<DataStructureFactory>(); MiniSATLearning<DataStructureFactory> learning = new MiniSATLearning<DataStructureFactory>();
Solver<DataStructureFactory> solver = new Solver<DataStructureFactory>( Solver<DataStructureFactory> solver = new Solver<DataStructureFactory>(
learning, dsf, new VarOrderHeap( learning, dsf,
new RSATPhaseSelectionStrategy()), new ArminRestarts()); new VarOrderHeap(new RSATPhaseSelectionStrategy()),
new ArminRestarts());
solver.setSearchParams(new SearchParams(1.1, 100)); solver.setSearchParams(new SearchParams(1.1, 100));
solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION); solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
return solver; return solver;
...@@ -168,8 +169,9 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -168,8 +169,9 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
MiniSATLearning<DataStructureFactory> learning = new MiniSATLearning<DataStructureFactory>(); MiniSATLearning<DataStructureFactory> learning = new MiniSATLearning<DataStructureFactory>();
Solver<DataStructureFactory> solver = new Solver<DataStructureFactory>( Solver<DataStructureFactory> solver = new Solver<DataStructureFactory>(
learning, new MixedDataStructureDanielWL(), learning, new MixedDataStructureDanielWL(),
new RandomWalkDecorator(new VarOrderHeap( new RandomWalkDecorator(
new RSATPhaseSelectionStrategy())), new NoRestarts()); new VarOrderHeap(new RSATPhaseSelectionStrategy())),
new NoRestarts());
// solver.setSearchParams(new SearchParams(1.1, 100)); // solver.setSearchParams(new SearchParams(1.1, 100));
solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION); solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
return solver; return solver;
...@@ -198,7 +200,8 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -198,7 +200,8 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
* @since 2.1 * @since 2.1
*/ */
public static Solver<DataStructureFactory> newBestWL() { public static Solver<DataStructureFactory> newBestWL() {
return newBestCurrentSolverConfiguration(new MixedDataStructureDanielWL()); return newBestCurrentSolverConfiguration(
new MixedDataStructureDanielWL());
} }
/** /**
...@@ -206,7 +209,8 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -206,7 +209,8 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
* @since 2.1 * @since 2.1
*/ */
public static ICDCL<DataStructureFactory> newBestHT() { public static ICDCL<DataStructureFactory> newBestHT() {
return newBestCurrentSolverConfiguration(new MixedDataStructureDanielHT()); return newBestCurrentSolverConfiguration(
new MixedDataStructureDanielHT());
} }
/** /**
...@@ -214,9 +218,11 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -214,9 +218,11 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
* @since 2.2 * @since 2.2
*/ */
public static ICDCL<DataStructureFactory> newBest17() { public static ICDCL<DataStructureFactory> newBest17() {
Solver<DataStructureFactory> solver = newBestCurrentSolverConfiguration(new MixedDataStructureSingleWL()); Solver<DataStructureFactory> solver = newBestCurrentSolverConfiguration(
new MixedDataStructureSingleWL());
solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION_WLONLY); solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION_WLONLY);
solver.setLearnedConstraintsDeletionStrategy(solver.activity_based_low_memory); solver.setLearnedConstraintsDeletionStrategy(
solver.activity_based_low_memory);
LimitedLearning<DataStructureFactory> learning = new PercentLengthLearning<DataStructureFactory>( LimitedLearning<DataStructureFactory> learning = new PercentLengthLearning<DataStructureFactory>(
10); 10);
solver.setLearningStrategy(learning); solver.setLearningStrategy(learning);
...@@ -273,8 +279,8 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -273,8 +279,8 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
LimitedLearning<DataStructureFactory> learning = new PercentLengthLearning<DataStructureFactory>( LimitedLearning<DataStructureFactory> learning = new PercentLengthLearning<DataStructureFactory>(
10); 10);
Solver<DataStructureFactory> solver = new Solver<DataStructureFactory>( Solver<DataStructureFactory> solver = new Solver<DataStructureFactory>(
learning, new MixedDataStructureDanielWL(), new SearchParams( learning, new MixedDataStructureDanielWL(),
Integer.MAX_VALUE), new VarOrderHeap(), new SearchParams(Integer.MAX_VALUE), new VarOrderHeap(),
new MiniSATRestarts()); new MiniSATRestarts());
learning.setSolver(solver); learning.setSolver(solver);
solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION); solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
...@@ -288,8 +294,9 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -288,8 +294,9 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
LimitedLearning<DataStructureFactory> learning = new PercentLengthLearning<DataStructureFactory>( LimitedLearning<DataStructureFactory> learning = new PercentLengthLearning<DataStructureFactory>(
10); 10);
Solver<DataStructureFactory> solver = new Solver<DataStructureFactory>( Solver<DataStructureFactory> solver = new Solver<DataStructureFactory>(
learning, new MixedDataStructureDanielWL(), new SearchParams( learning, new MixedDataStructureDanielWL(),
1000), new VarOrderHeap(), new MiniSATRestarts()); new SearchParams(1000), new VarOrderHeap(),
new MiniSATRestarts());
learning.setSolver(solver); learning.setSolver(solver);
solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION); solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
return solver; return solver;
...@@ -421,7 +428,7 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -421,7 +428,7 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
} }
public static ISolver newParallel() { public static ISolver newParallel() {
return new ManyCore(newSAT(), newUNSAT(), return new ManyCore<ISolver>(newSAT(), newUNSAT(),
newMiniLearningHeapRsatExpSimpLuby(), newMiniLearningHeapRsatExpSimpLuby(),
newMiniLearningHeapRsatExpSimp(), newMiniLearningHeapRsatExpSimp(),
newDefaultAutoErasePhaseSaving(), newMiniLearningHeap(), newDefaultAutoErasePhaseSaving(), newMiniLearningHeap(),
...@@ -435,7 +442,7 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -435,7 +442,7 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
* @return a parallel solver for both SAT and UNSAT problems. * @return a parallel solver for both SAT and UNSAT problems.
*/ */
public static ISolver newSATUNSAT() { public static ISolver newSATUNSAT() {
return new ManyCore(newSAT(), newUNSAT()); return new ManyCore<ISolver>(newSAT(), newUNSAT());
} }
/** /**
...@@ -443,10 +450,11 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -443,10 +450,11 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
* *
* @return a solver for satisfiable benchmarks. * @return a solver for satisfiable benchmarks.
*/ */
public static Solver newSAT() { public static Solver<DataStructureFactory> newSAT() {
Solver solver = (Solver) newGlucose21(); Solver<DataStructureFactory> solver = (Solver<DataStructureFactory>) newGlucose21();
solver.setRestartStrategy(new LubyRestarts(100)); solver.setRestartStrategy(new LubyRestarts(100));
solver.setLearnedConstraintsDeletionStrategy(solver.activity_based_low_memory); solver.setLearnedConstraintsDeletionStrategy(
solver.activity_based_low_memory);
return solver; return solver;
} }
...@@ -455,23 +463,24 @@ public final class SolverFactory extends ASolverFactory<ISolver> { ...@@ -455,23 +463,24 @@ public final class SolverFactory extends ASolverFactory<ISolver> {
* *
* @return a solver for unsatisfiable benchmarks. * @return a solver for unsatisfiable benchmarks.
*/ */
public static Solver newUNSAT() { public static Solver<DataStructureFactory> newUNSAT() {
Solver solver = (Solver) newGlucose21(); Solver<DataStructureFactory> solver = (Solver<DataStructureFactory>) newGlucose21();
solver.setRestartStrategy(new NoRestarts()); solver.setRestartStrategy(new NoRestarts());
solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION); solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
return solver; return solver;
} }
public static Solver newConcise() { public static Solver<DataStructureFactory> newConcise() {
Solver solver = (Solver) newGlucose21(); Solver<DataStructureFactory> solver = (Solver<DataStructureFactory>) newGlucose21();
solver.setDataStructureFactory(new MixedDataStructureDanielWLConciseBinary()); solver.setDataStructureFactory(
solver.setSimplifier(solver.NO_SIMPLIFICATION); new MixedDataStructureDanielWLConciseBinary());
solver.setSimplifier(Solver.NO_SIMPLIFICATION);
return solver; return solver;
} }
public static Solver newNoSimplification() { public static Solver<DataStructureFactory> newNoSimplification() {
Solver solver = (Solver) newGlucose21(); Solver<DataStructureFactory> solver = (Solver<DataStructureFactory>) newGlucose21();
solver.setSimplifier(solver.NO_SIMPLIFICATION); solver.setSimplifier(Solver.NO_SIMPLIFICATION);
return solver; return solver;
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment