View Javadoc

1   /*******************************************************************************
2    * SAT4J: a SATisfiability library for Java Copyright (C) 2004-2008 Daniel Le Berre
3    *
4    * All rights reserved. This program and the accompanying materials
5    * are made available under the terms of the Eclipse Public License v1.0
6    * which accompanies this distribution, and is available at
7    * http://www.eclipse.org/legal/epl-v10.html
8    *
9    * Alternatively, the contents of this file may be used under the terms of
10   * either the GNU Lesser General Public License Version 2.1 or later (the
11   * "LGPL"), in which case the provisions of the LGPL are applicable instead
12   * of those above. If you wish to allow use of your version of this file only
13   * under the terms of the LGPL, and not to allow others to use your version of
14   * this file under the terms of the EPL, indicate your decision by deleting
15   * the provisions above and replace them with the notice and other provisions
16   * required by the LGPL. If you do not delete the provisions above, a recipient
17   * may use your version of this file under the terms of the EPL or the LGPL.
18   * 
19   * Based on the pseudo boolean algorithms described in:
20   * A fast pseudo-Boolean constraint solver Chai, D.; Kuehlmann, A.
21   * Computer-Aided Design of Integrated Circuits and Systems, IEEE Transactions on
22   * Volume 24, Issue 3, March 2005 Page(s): 305 - 317
23   * 
24   * and 
25   * Heidi E. Dixon, 2004. Automating Pseudo-Boolean Inference within a DPLL 
26   * Framework. Ph.D. Dissertation, University of Oregon.
27   *******************************************************************************/
28  package org.sat4j.pb;
29  
30  import org.sat4j.core.ASolverFactory;
31  import org.sat4j.minisat.core.IOrder;
32  import org.sat4j.minisat.core.IPhaseSelectionStrategy;
33  import org.sat4j.minisat.learning.ClauseOnlyLearning;
34  import org.sat4j.minisat.learning.MiniSATLearning;
35  import org.sat4j.minisat.learning.NoLearningButHeuristics;
36  import org.sat4j.minisat.orders.PhaseInLastLearnedClauseSelectionStrategy;
37  import org.sat4j.minisat.orders.RSATPhaseSelectionStrategy;
38  import org.sat4j.minisat.orders.UserFixedPhaseSelectionStrategy;
39  import org.sat4j.minisat.orders.VarOrderHeap;
40  import org.sat4j.minisat.restarts.MiniSATRestarts;
41  import org.sat4j.minisat.uip.FirstUIP;
42  import org.sat4j.pb.constraints.AbstractPBDataStructureFactory;
43  import org.sat4j.pb.constraints.CompetMinHTmixedClauseCardConstrDataStructureFactory;
44  import org.sat4j.pb.constraints.CompetResolutionPBMixedHTClauseCardConstrDataStructure;
45  import org.sat4j.pb.constraints.PBMaxCBClauseCardConstrDataStructure;
46  import org.sat4j.pb.constraints.PBMaxClauseAtLeastConstrDataStructure;
47  import org.sat4j.pb.constraints.PBMaxClauseCardConstrDataStructure;
48  import org.sat4j.pb.constraints.PBMaxDataStructure;
49  import org.sat4j.pb.constraints.PBMinClauseCardConstrDataStructure;
50  import org.sat4j.pb.constraints.PBMinDataStructure;
51  import org.sat4j.pb.constraints.PuebloPBMinClauseAtLeastConstrDataStructure;
52  import org.sat4j.pb.constraints.PuebloPBMinClauseCardConstrDataStructure;
53  import org.sat4j.pb.constraints.PuebloPBMinDataStructure;
54  import org.sat4j.pb.core.PBDataStructureFactory;
55  import org.sat4j.pb.core.PBSolverCP;
56  import org.sat4j.pb.core.PBSolverClause;
57  import org.sat4j.pb.core.PBSolverResolution;
58  import org.sat4j.pb.core.PBSolverWithImpliedClause;
59  import org.sat4j.pb.orders.VarOrderHeapObjective;
60  import org.sat4j.specs.ISolver;
61  import org.sat4j.tools.DimacsOutputSolver;
62  
63  /**
64   * User friendly access to pre-constructed solvers.
65   * 
66   * @author leberre
67   */
68  public class SolverFactory extends ASolverFactory<IPBSolver> {
69  
70  	/**
71       * 
72       */
73  	private static final long serialVersionUID = 1L;
74  
75  	// thread safe implementation of the singleton design pattern
76  	private static SolverFactory instance;
77  
78  	/**
79  	 * Private contructor. Use singleton method instance() instead.
80  	 * 
81  	 * @see #instance()
82  	 */
83  	private SolverFactory() {
84  
85  	}
86  
87  	private static synchronized void createInstance() {
88  		if (instance == null) {
89  			instance = new SolverFactory();
90  		}
91  	}
92  
93  	/**
94  	 * Access to the single instance of the factory.
95  	 * 
96  	 * @return the singleton of that class.
97  	 */
98  	public static SolverFactory instance() {
99  		if (instance == null) {
100 			createInstance();
101 		}
102 		return instance;
103 	}
104 
105 	/**
106 	 * @return MiniSAT with Counter-based pseudo boolean constraints and clause
107 	 *         learning.
108 	 */
109 	public static PBSolverResolution newPBResAllPB() {
110 		return newPBRes(new PBMaxDataStructure());
111 	}
112 
113 	/**
114 	 * @return MiniSAT with Counter-based pseudo boolean constraints and
115 	 *         constraint learning.
116 	 */
117 	public static PBSolverCP newPBCPAllPB() {
118 		return newPBCP(new PBMaxDataStructure());
119 	}
120 
121 	/**
122 	 * @return Solver used to display in a string the pb-instance in OPB format.
123 	 */
124 	public static IPBSolver newOPBStringSolver() {
125 		return new OPBStringSolver();
126 	}
127 
128 	/**
129 	 * @return MiniSAT with Counter-based pseudo boolean constraints and
130 	 *         constraint learning. Clauses and cardinalities with watched
131 	 *         literals are also handled (and learnt).
132 	 */
133 	public static PBSolverCP newPBCPMixedConstraints() {
134 		return newPBCP(new PBMaxClauseCardConstrDataStructure());
135 	}
136 
137 	/**
138 	 * @return MiniSAT with Counter-based pseudo boolean constraints and
139 	 *         constraint learning. Clauses and cardinalities with watched
140 	 *         literals are also handled (and learnt). A specific heuristics
141 	 *         taking into account the objective value is used.
142 	 */
143 	public static PBSolverCP newPBCPMixedConstraintsObjective() {
144 		return newPBCP(new PBMaxClauseCardConstrDataStructure(),
145 				new VarOrderHeapObjective());
146 	}
147 
148 	public static PBSolverCP newCompetPBCPMixedConstraintsObjective() {
149 		return newPBCP(new PBMaxClauseCardConstrDataStructure(),
150 				new VarOrderHeapObjective());
151 	}
152 
153 	/**
154 	 * @return MiniLearning with Counter-based pseudo boolean constraints and
155 	 *         constraint learning. Clauses and cardinalities with watched
156 	 *         literals are also handled (and learnt). A specific heuristics
157 	 *         taking into account the objective value is used. Conflict
158 	 *         analysis with full cutting plane inference. Only clauses are
159 	 *         recorded.
160 	 */
161 	public static PBSolverCP newPBCPMixedConstraintsObjectiveLearnJustClauses() {
162 		ClauseOnlyLearning<PBDataStructureFactory> learning = new ClauseOnlyLearning<PBDataStructureFactory>();
163 		PBSolverCP solver = new PBSolverCP(new FirstUIP(), learning,
164 				new PBMaxClauseCardConstrDataStructure(),
165 				new VarOrderHeapObjective());
166 		learning.setSolver(solver);
167 		return solver;
168 	}
169 
170 	public static PBSolverCP newCompetPBCPMixedConstraintsObjectiveLearnJustClauses() {
171 		ClauseOnlyLearning<PBDataStructureFactory> learning = new ClauseOnlyLearning<PBDataStructureFactory>();
172 		PBSolverCP solver = new PBSolverCP(new FirstUIP(), learning,
173 				new PBMaxClauseCardConstrDataStructure(),
174 				new VarOrderHeapObjective());
175 		learning.setSolver(solver);
176 		return solver;
177 	}
178 
179 	private static PBSolverCP newPBKiller(IPhaseSelectionStrategy phase) {
180 		ClauseOnlyLearning<PBDataStructureFactory> learning = new ClauseOnlyLearning<PBDataStructureFactory>();
181 		PBSolverCP solver = new PBSolverCP(new FirstUIP(), learning,
182 				new PBMaxClauseCardConstrDataStructure(),
183 				new VarOrderHeapObjective(phase));
184 		learning.setSolver(solver);
185 		return solver;
186 	}
187 
188 	public static PBSolverCP newPBKillerRSAT() {
189 		return newPBKiller(new RSATPhaseSelectionStrategy());
190 	}
191 
192 	public static PBSolverCP newPBKillerClassic() {
193 		return newPBKiller(new PhaseInLastLearnedClauseSelectionStrategy());
194 	}
195 
196 	public static PBSolverCP newPBKillerFixed() {
197 		return newPBKiller(new UserFixedPhaseSelectionStrategy());
198 	}
199 
200 	private static PBSolverCP newCompetPBKiller(IPhaseSelectionStrategy phase) {
201 		ClauseOnlyLearning<PBDataStructureFactory> learning = new ClauseOnlyLearning<PBDataStructureFactory>();
202 		PBSolverCP solver = new PBSolverCP(new FirstUIP(), learning,
203 				new PBMaxClauseCardConstrDataStructure(),
204 				new VarOrderHeapObjective(phase));
205 		learning.setSolver(solver);
206 		return solver;
207 	}
208 
209 	public static PBSolverCP newCompetPBKillerRSAT() {
210 		return newCompetPBKiller(new RSATPhaseSelectionStrategy());
211 	}
212 
213 	public static PBSolverCP newCompetPBKillerClassic() {
214 		return newCompetPBKiller(new PhaseInLastLearnedClauseSelectionStrategy());
215 	}
216 
217 	public static PBSolverCP newCompetPBKillerFixed() {
218 		return newCompetPBKiller(new UserFixedPhaseSelectionStrategy());
219 	}
220 
221 	/**
222 	 * @return MiniLearning with Counter-based pseudo boolean constraints and
223 	 *         constraint learning. Clauses and cardinalities with watched
224 	 *         literals are also handled (and learnt). A specific heuristics
225 	 *         taking into account the objective value is used. Conflict
226 	 *         analysis reduces to clauses to avoid computations
227 	 */
228 	public static PBSolverCP newMiniLearningOPBClauseCardConstrMaxSpecificOrderIncrementalReductionToClause() {
229 		// LimitedLearning learning = new LimitedLearning(10);
230 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
231 		// LearningStrategy learning = new NoLearningButHeuristics();
232 		PBSolverCP solver = new PBSolverClause(new FirstUIP(), learning,
233 				new PBMaxClauseCardConstrDataStructure(),
234 				new VarOrderHeapObjective());
235 		learning.setDataStructureFactory(solver.getDSFactory());
236 		learning.setVarActivityListener(solver);
237 		return solver;
238 	}
239 
240 	/**
241 	 * @return MiniLearning with Counter-based pseudo boolean constraints and
242 	 *         constraint learning. Clauses and cardinalities with watched
243 	 *         literals are also handled (and learnt). A specific heuristics
244 	 *         taking into account the objective value is used. The PB
245 	 *         constraints are not learnt (watched), just used for backjumping.
246 	 */
247 	public static PBSolverCP newPBCPMixedConstraintsObjectiveNoLearning() {
248 		NoLearningButHeuristics<PBDataStructureFactory> learning = new NoLearningButHeuristics<PBDataStructureFactory>();
249 		// SearchParams params = new SearchParams(1.1,100);
250 		PBSolverCP solver = new PBSolverCP(new FirstUIP(), learning,
251 				new PBMaxClauseCardConstrDataStructure(),
252 				new VarOrderHeapObjective());
253 		learning.setSolver(solver);
254 		learning.setVarActivityListener(solver);
255 		return solver;
256 	}
257 
258 	public static PBSolverResolution newPBResMixedConstraintsObjective() {
259 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
260 		PBSolverResolution solver = new PBSolverResolution(new FirstUIP(),
261 				learning, new PBMaxClauseCardConstrDataStructure(),
262 				new VarOrderHeapObjective(), new MiniSATRestarts());
263 		learning.setDataStructureFactory(solver.getDSFactory());
264 		learning.setVarActivityListener(solver);
265 		return solver;
266 	}
267 
268 	public static PBSolverResolution newCompetPBResHTMixedConstraintsObjective() {
269 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
270 		PBSolverResolution solver = new PBSolverResolution(new FirstUIP(),
271 				learning,
272 				new CompetResolutionPBMixedHTClauseCardConstrDataStructure(),
273 				new VarOrderHeapObjective(), new MiniSATRestarts());
274 		learning.setDataStructureFactory(solver.getDSFactory());
275 		learning.setVarActivityListener(solver);
276 		return solver;
277 	}
278 
279 	public static PBSolverResolution newPBResHTMixedConstraintsObjective() {
280 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
281 		AbstractPBDataStructureFactory ds = new CompetResolutionPBMixedHTClauseCardConstrDataStructure();
282 		ds.setNormalizer(AbstractPBDataStructureFactory.NO_COMPETITION);
283 		PBSolverResolution solver = new PBSolverResolution(new FirstUIP(),
284 				learning, ds, new VarOrderHeapObjective(),
285 				new MiniSATRestarts());
286 		learning.setDataStructureFactory(solver.getDSFactory());
287 		learning.setVarActivityListener(solver);
288 		return solver;
289 	}
290 
291 	public static PBSolverResolution newCompetPBResMinHTMixedConstraintsObjective() {
292 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
293 		PBSolverResolution solver = new PBSolverResolution(new FirstUIP(),
294 				learning,
295 				new CompetMinHTmixedClauseCardConstrDataStructureFactory(),
296 				new VarOrderHeapObjective(), new MiniSATRestarts());
297 		learning.setDataStructureFactory(solver.getDSFactory());
298 		learning.setVarActivityListener(solver);
299 		return solver;
300 	}
301 
302 	public static PBSolverResolution newPBResMinHTMixedConstraintsObjective() {
303 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
304 		AbstractPBDataStructureFactory ds = new CompetMinHTmixedClauseCardConstrDataStructureFactory();
305 		ds.setNormalizer(AbstractPBDataStructureFactory.NO_COMPETITION);
306 		PBSolverResolution solver = new PBSolverResolution(new FirstUIP(),
307 				learning, ds, new VarOrderHeapObjective(),
308 				new MiniSATRestarts());
309 		learning.setDataStructureFactory(solver.getDSFactory());
310 		learning.setVarActivityListener(solver);
311 		return solver;
312 	}
313 
314 	public static PBSolverResolution newCompetPBResMixedConstraintsObjectiveExpSimp() {
315 		PBSolverResolution solver = newPBResMixedConstraintsObjective();
316 		solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
317 		return solver;
318 	}
319 
320 	public static PBSolverResolution newCompetPBResHTMixedConstraintsObjectiveExpSimp() {
321 		PBSolverResolution solver = newCompetPBResHTMixedConstraintsObjective();
322 		solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
323 		return solver;
324 	}
325 
326 	public static PBSolverResolution newPBResHTMixedConstraintsObjectiveExpSimp() {
327 		PBSolverResolution solver = newPBResHTMixedConstraintsObjective();
328 		solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
329 		return solver;
330 	}
331 
332 	public static PBSolverResolution newCompetPBResMinHTMixedConstraintsObjectiveExpSimp() {
333 		PBSolverResolution solver = newCompetPBResMinHTMixedConstraintsObjective();
334 		solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
335 		return solver;
336 	}
337 
338 	/**
339 	 * @return MiniSAT with Counter-based pseudo boolean constraints and
340 	 *         constraint learning. Clauses and cardinalities with watched
341 	 *         literals are also handled (and learnt). A reduction of
342 	 *         PB-constraints to clauses is made in order to simplify cutting
343 	 *         planes.
344 	 */
345 	public static PBSolverClause newPBCPMixedConstraintsReduceToClause() {
346 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
347 		PBSolverClause solver = new PBSolverClause(new FirstUIP(), learning,
348 				new PBMaxClauseCardConstrDataStructure(), new VarOrderHeap());
349 		learning.setDataStructureFactory(solver.getDSFactory());
350 		learning.setVarActivityListener(solver);
351 		return solver;
352 	}
353 
354 	/**
355 	 * @return MiniSAT with Counter-based pseudo boolean constraints and
356 	 *         constraint learning. Clauses and cardinalities with watched
357 	 *         literals are also handled (and learnt). a pre-processing is
358 	 *         applied which adds implied clauses from PB-constraints.
359 	 */
360 	public static PBSolverWithImpliedClause newPBCPMixedConstrainsImplied() {
361 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
362 		PBSolverWithImpliedClause solver = new PBSolverWithImpliedClause(
363 				new FirstUIP(), learning,
364 				new PBMaxClauseCardConstrDataStructure(), new VarOrderHeap());
365 		learning.setDataStructureFactory(solver.getDSFactory());
366 		learning.setVarActivityListener(solver);
367 		return solver;
368 	}
369 
370 	/**
371 	 * @return MiniSAT with Counter-based pseudo boolean constraints,
372 	 *         counter-based cardinalities, watched clauses and constraint
373 	 *         learning. methods isAssertive() and getBacktrackLevel() are
374 	 *         totally incremental. Conflicts for PB-constraints use a Map
375 	 *         structure
376 	 */
377 	public static PBSolverCP newMiniOPBClauseAtLeastConstrMax() {
378 		return newPBCP(new PBMaxClauseAtLeastConstrDataStructure());
379 	}
380 
381 	/**
382 	 * @return MiniSAT with Counter-based pseudo boolean constraints and
383 	 *         clauses, watched cardinalities, and constraint learning.
384 	 */
385 	public static PBSolverCP newMiniOPBCounterBasedClauseCardConstrMax() {
386 		return newPBCP(new PBMaxCBClauseCardConstrDataStructure());
387 	}
388 
389 	/**
390 	 * @return MiniSAT with WL-based pseudo boolean constraints and clause
391 	 *         learning.
392 	 */
393 	public static PBSolverResolution newPBResAllPBWL() {
394 		return newPBRes(new PBMinDataStructure());
395 	}
396 
397 	/**
398 	 * @return MiniSAT with WL-based pseudo boolean constraints and constraint
399 	 *         learning.
400 	 */
401 	public static PBSolverCP newPBCPAllPBWL() {
402 		return newPBCP(new PBMinDataStructure());
403 	}
404 
405 	/**
406 	 * @return MiniSAT with WL-based pseudo boolean constraints and clause
407 	 *         learning.
408 	 */
409 	public static PBSolverResolution newPBResAllPBWLPueblo() {
410 		return newPBRes(new PuebloPBMinDataStructure());
411 	}
412 
413 	private static PBSolverResolution newPBRes(PBDataStructureFactory dsf) {
414 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
415 		PBSolverResolution solver = new PBSolverResolution(new FirstUIP(),
416 				learning, dsf, new VarOrderHeap(), new MiniSATRestarts());
417 		learning.setDataStructureFactory(solver.getDSFactory());
418 		learning.setVarActivityListener(solver);
419 		return solver;
420 	}
421 
422 	/**
423 	 * @return MiniSAT with WL-based pseudo boolean constraints and constraint
424 	 *         learning.
425 	 */
426 	public static PBSolverCP newPBCPAllPBWLPueblo() {
427 		return newPBCP(new PuebloPBMinDataStructure());
428 	}
429 
430 	/**
431 	 * @return MiniSAT with WL-based pseudo boolean constraints and clauses,
432 	 *         cardinalities, and constraint learning.
433 	 */
434 	public static PBSolverCP newMiniOPBClauseCardMinPueblo() {
435 		return newPBCP(new PuebloPBMinClauseCardConstrDataStructure());
436 	}
437 
438 	/**
439 	 * @return MiniSAT with WL-based pseudo boolean constraints and clauses,
440 	 *         cardinalities, and constraint learning.
441 	 */
442 	public static PBSolverCP newMiniOPBClauseCardMin() {
443 		return newPBCP(new PBMinClauseCardConstrDataStructure());
444 	}
445 
446 	/**
447 	 * @return MiniSAT with WL-based pseudo boolean constraints and clauses,
448 	 *         counter-based cardinalities, and constraint learning.
449 	 */
450 	public static PBSolverCP newMiniOPBClauseAtLeastMinPueblo() {
451 		return newPBCP(new PuebloPBMinClauseAtLeastConstrDataStructure());
452 	}
453 
454 	private static PBSolverCP newPBCP(PBDataStructureFactory dsf, IOrder order) {
455 		MiniSATLearning<PBDataStructureFactory> learning = new MiniSATLearning<PBDataStructureFactory>();
456 		PBSolverCP solver = new PBSolverCP(new FirstUIP(), learning, dsf, order);
457 		learning.setDataStructureFactory(solver.getDSFactory());
458 		learning.setVarActivityListener(solver);
459 		return solver;
460 	}
461 
462 	private static PBSolverCP newPBCP(PBDataStructureFactory dsf) {
463 		return newPBCP(dsf, new VarOrderHeap());
464 	}
465 
466 	/**
467 	 * Cutting Planes based solver. The inference during conflict analysis is
468 	 * based on cutting planes instead of resolution as in a SAT solver.
469 	 * 
470 	 * @return the best available cutting planes based solver of the library.
471 	 */
472 	public static IPBSolver newCuttingPlanes() {
473 		return newCompetPBCPMixedConstraintsObjective();
474 	}
475 
476 	/**
477 	 * Resolution based solver (i.e. classic SAT solver able to handle generic
478 	 * constraints. No specific inference mechanism.
479 	 * 
480 	 * @return the best available resolution based solver of the library.
481 	 */
482 	public static IPBSolver newResolution() {
483 		return newCompetPBResMixedConstraintsObjectiveExpSimp();
484 	}
485 
486 	/**
487 	 * Default solver of the SolverFactory. This solver is meant to be used on
488 	 * challenging SAT benchmarks.
489 	 * 
490 	 * @return the best "general purpose" SAT solver available in the factory.
491 	 * @see #defaultSolver() the same method, polymorphic, to be called from an
492 	 *      instance of ASolverFactory.
493 	 */
494 	public static IPBSolver newDefault() {
495 		return newCompetPBResHTMixedConstraintsObjectiveExpSimp();
496 	}
497 
498 	/**
499 	 * Default solver of the SolverFactory for instances not normalized. This
500 	 * solver is meant to be used on challenging SAT benchmarks.
501 	 * 
502 	 * @return the best "general purpose" SAT solver available in the factory.
503 	 * @see #defaultSolver() the same method, polymorphic, to be called from an
504 	 *      instance of ASolverFactory.
505 	 */
506 	public static IPBSolver newDefaultNonNormalized() {
507 		return newPBResHTMixedConstraintsObjectiveExpSimp();
508 	}
509 
510 	@Override
511 	public IPBSolver defaultSolver() {
512 		return newDefault();
513 	}
514 
515 	/**
516 	 * Small footprint SAT solver.
517 	 * 
518 	 * @return a SAT solver suitable for solving small/easy SAT benchmarks.
519 	 * @see #lightSolver() the same method, polymorphic, to be called from an
520 	 *      instance of ASolverFactory.
521 	 */
522 	public static IPBSolver newLight() {
523 		return newCompetPBResMixedConstraintsObjectiveExpSimp();
524 	}
525 
526 	@Override
527 	public IPBSolver lightSolver() {
528 		return newLight();
529 	}
530 
531 	public static ISolver newDimacsOutput() {
532 		return new DimacsOutputSolver();
533 	}
534 
535 	public static IPBSolver newEclipseP2() {
536 		PBSolverResolution solver = newCompetPBResHTMixedConstraintsObjective();
537 		solver.setTimeoutOnConflicts(300);
538 		return new OptToPBSATAdapter(new PseudoOptDecorator(solver));
539 	}
540 
541 }