View Javadoc

1   /*******************************************************************************
2   * SAT4J: a SATisfiability library for Java Copyright (C) 2004-2006 Daniel Le
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  package org.sat4j.minisat;
20  
21  import org.sat4j.core.ASolverFactory;
22  import org.sat4j.minisat.constraints.CardinalityDataStructure;
23  import org.sat4j.minisat.constraints.ClausalDataStructureCB;
24  import org.sat4j.minisat.constraints.ClausalDataStructureCBHT;
25  import org.sat4j.minisat.constraints.MixedDataStructureDaniel;
26  import org.sat4j.minisat.constraints.MixedDataStructureWithBinary;
27  import org.sat4j.minisat.constraints.MixedDataStructureWithBinaryAndTernary;
28  import org.sat4j.minisat.core.DataStructureFactory;
29  import org.sat4j.minisat.core.ILits;
30  import org.sat4j.minisat.core.ILits2;
31  import org.sat4j.minisat.core.ILits23;
32  import org.sat4j.minisat.core.IOrder;
33  import org.sat4j.minisat.core.SearchParams;
34  import org.sat4j.minisat.core.Solver;
35  import org.sat4j.minisat.learning.ActiveLearning;
36  import org.sat4j.minisat.learning.FixedLengthLearning;
37  import org.sat4j.minisat.learning.LimitedLearning;
38  import org.sat4j.minisat.learning.MiniSATLearning;
39  import org.sat4j.minisat.learning.NoLearningButHeuristics;
40  import org.sat4j.minisat.learning.PercentLengthLearning;
41  import org.sat4j.minisat.orders.JWOrder;
42  import org.sat4j.minisat.orders.MyOrder;
43  import org.sat4j.minisat.orders.PureOrder;
44  import org.sat4j.minisat.orders.RSATPhaseSelectionStrategy;
45  import org.sat4j.minisat.orders.VarOrder;
46  import org.sat4j.minisat.orders.VarOrderHeap;
47  import org.sat4j.minisat.restarts.ArminRestarts;
48  import org.sat4j.minisat.restarts.LubyRestarts;
49  import org.sat4j.minisat.restarts.MiniSATRestarts;
50  import org.sat4j.minisat.uip.DecisionUIP;
51  import org.sat4j.minisat.uip.FirstUIP;
52  import org.sat4j.opt.MinOneDecorator;
53  import org.sat4j.specs.ISolver;
54  import org.sat4j.tools.DimacsOutputSolver;
55  import org.sat4j.tools.OptToSatAdapter;
56  
57  /**
58   * User friendly access to pre-constructed solvers.
59   * 
60   * @author leberre
61   */
62  public class SolverFactory extends ASolverFactory<ISolver> {
63  
64      /**
65       * 
66       */
67      private static final long serialVersionUID = 1L;
68  
69      // thread safe implementation of the singleton design pattern
70      private static SolverFactory instance;
71  
72      /**
73       * Private constructor. Use singleton method instance() instead.
74       * 
75       * @see #instance()
76       */
77      private SolverFactory() {
78          super();
79      }
80  
81      private static synchronized void createInstance() {
82          if (instance == null) {
83              instance = new SolverFactory();
84          }
85      }
86  
87      /**
88       * Access to the single instance of the factory.
89       * 
90       * @return the singleton of that class.
91       */
92      public static SolverFactory instance() {
93          if (instance == null) {
94              createInstance();
95          }
96          return instance;
97      }
98  
99  
100     /**
101      * @return a "default" "minilearning" solver learning clauses of size
102      *         smaller than 10 % of the total number of variables
103      */
104     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearning() {
105         return newMiniLearning(10);
106     }
107 
108     /**
109      * @return a "default" "minilearning" solver learning clauses of size
110      *         smaller than 10 % of the total number of variables with a heap
111      *         based var order.
112      */
113     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningHeap() {
114         return newMiniLearningHeap(new MixedDataStructureDaniel());
115     }
116 
117     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningHeapEZSimp() {
118         Solver<ILits,DataStructureFactory<ILits>> solver = newMiniLearningHeap();
119         solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
120         return solver;
121     }
122 
123     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningHeapExpSimp() {
124         Solver<ILits,DataStructureFactory<ILits>> solver = newMiniLearningHeap();
125         solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
126         return solver;
127     }
128 
129     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningHeapRsatExpSimp() {
130         Solver<ILits,DataStructureFactory<ILits>> solver = newMiniLearningHeapExpSimp();
131         solver.setOrder(new VarOrderHeap<ILits>(new RSATPhaseSelectionStrategy()));
132         return solver;
133     }
134 
135     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningHeapRsatExpSimpBiere() {
136         Solver<ILits,DataStructureFactory<ILits>> solver = newMiniLearningHeapRsatExpSimp();
137         solver.setRestartStrategy(new ArminRestarts());
138         solver.setSearchParams(new SearchParams(1.1, 100));
139         return solver;
140     }
141 
142     public static Solver<ILits,DataStructureFactory<ILits>> newMiniSatHeapRsatExpSimpBiere() {
143         Solver<ILits,DataStructureFactory<ILits>> solver = newMiniSATHeapExpSimp();
144         solver.setOrder(new VarOrderHeap<ILits>(new RSATPhaseSelectionStrategy()));
145         solver.setRestartStrategy(new ArminRestarts());
146         solver.setSearchParams(new SearchParams(1.1, 100));
147         return solver;
148     }
149     
150     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningHeapRsatExpSimpLuby() {
151         Solver<ILits,DataStructureFactory<ILits>> solver = newMiniLearningHeapRsatExpSimp();
152         solver.setRestartStrategy(new LubyRestarts());
153         return solver;
154     }
155 
156     /**
157      * @param n
158      *                the maximal size of the clauses to learn as a percentage
159      *                of the initial number of variables
160      * @return a "minilearning" solver learning clauses of size smaller than n
161      *         of the total number of variables
162      */
163     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearning(int n) {
164         return newMiniLearning(new MixedDataStructureDaniel(), n);
165     }
166 
167     /**
168      * @param dsf
169      *                a specific data structure factory
170      * @return a default "minilearning" solver using a specific data structure
171      *         factory, learning clauses of length smaller or equals to 10 % of
172      *         the number of variables.
173      */
174     public static <L extends ILits> Solver<L,DataStructureFactory<L>> newMiniLearning(
175             DataStructureFactory<L> dsf) {
176         return newMiniLearning(dsf, 10);
177     }
178 
179     /**
180      * @param dsf
181      *                a specific data structure factory
182      * @return a default "minilearning" solver using a specific data structure
183      *         factory, learning clauses of length smaller or equals to 10 % of
184      *         the number of variables and a heap based VSIDS heuristics
185      */
186     public static <L extends ILits> Solver<L,DataStructureFactory<L>> newMiniLearningHeap(
187             DataStructureFactory<L> dsf) {
188         return newMiniLearning(dsf, new VarOrderHeap<L>());
189     }
190 
191     /**
192      * @return a default minilearning solver using a specific data structure
193      *         described in Lawrence Ryan thesis to handle binary clauses.
194      * @see #newMiniLearning
195      */
196     public static Solver<ILits2,DataStructureFactory<ILits2>> newMiniLearning2() {
197         return newMiniLearning(new MixedDataStructureWithBinary());
198     }
199 
200     public static Solver<ILits2,DataStructureFactory<ILits2>> newMiniLearning2Heap() {
201         return newMiniLearningHeap(new MixedDataStructureWithBinary());
202     }
203 
204     /**
205      * @return a default minilearning solver using a specific data structures
206      *         described in Lawrence Ryan thesis to handle binary and ternary
207      *         clauses.
208      * @see #newMiniLearning
209      */
210     public static Solver<ILits23,DataStructureFactory<ILits23>> newMiniLearning23() {
211         return newMiniLearning(new MixedDataStructureWithBinaryAndTernary());
212     }
213 
214     /**
215      * @return a default minilearning SAT solver using counter-based clause
216      *         representation (i.e. all the literals of a clause are watched)
217      */
218     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningCB() {
219         return newMiniLearning(new ClausalDataStructureCB());
220     }
221 
222     /**
223      * @return a default minilearning SAT solver using counter-based clause
224      *         representation (i.e. all the literals of a clause are watched)
225      *         for the ORIGINAL clauses and watched-literals clause
226      *         representation for learnt clauses.
227      */
228     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningCBWL() {
229         return newMiniLearning(new ClausalDataStructureCBHT());
230     }
231 
232     public static Solver<ILits2,DataStructureFactory<ILits2>> newMiniLearning2NewOrder() {
233         return newMiniLearning(new MixedDataStructureWithBinary(),
234                 new MyOrder());
235     }
236 
237     /**
238      * @return a default minilearning SAT solver choosing periodically to branch
239      *         on "pure watched" literals if any. (a pure watched literal l is a
240      *         literal that is watched on at least one clause such that its
241      *         negation is not watched at all. It is not necessarily a watched
242      *         literal.)
243      */
244     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningPure() {
245         return newMiniLearning(new MixedDataStructureDaniel(), new PureOrder());
246     }
247 
248     /**
249      * @return a default minilearning SAT solver choosing periodically to branch
250      *         on literal "pure in the original set of clauses" if any.
251      */
252     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningCBWLPure() {
253         return newMiniLearning(new ClausalDataStructureCBHT(), new PureOrder());
254     }
255 
256     /**
257      * @param dsf
258      *                the data structure factory used to represent literals and
259      *                clauses
260      * @param n
261      *                the maximum size of learnt clauses as percentage of the
262      *                original number of variables.
263      * @return a SAT solver with learning limited to clauses of length smaller
264      *         or equal to n, the dsf data structure, the FirstUIP clause
265      *         generator and a sort of VSIDS heuristics.
266      */
267     public static <L extends ILits> Solver<L,DataStructureFactory<L>> newMiniLearning(
268             DataStructureFactory<L> dsf, int n) {
269         LimitedLearning<L,DataStructureFactory<L>> learning = new PercentLengthLearning<L,DataStructureFactory<L>>(n);
270         Solver<L,DataStructureFactory<L>> solver = new Solver<L,DataStructureFactory<L>>(new FirstUIP(), learning, dsf,
271                 new VarOrder<L>(), new MiniSATRestarts());
272         learning.setSolver(solver);
273         return solver;
274     }
275 
276     /**
277      * @param dsf
278      *                the data structure factory used to represent literals and
279      *                clauses
280      * @param order
281      *                the heuristics
282      * @return a SAT solver with learning limited to clauses of length smaller
283      *         or equal to 10 percent of the total number of variables, the dsf
284      *         data structure, the FirstUIP clause generator and order as
285      *         heuristics.
286      */
287     public static <L extends ILits> Solver<L,DataStructureFactory<L>> newMiniLearning(
288             DataStructureFactory<L> dsf, IOrder<L> order) {
289         LimitedLearning<L,DataStructureFactory<L>> learning = new PercentLengthLearning<L,DataStructureFactory<L>>(10);
290         Solver<L,DataStructureFactory<L>> solver = new Solver<L,DataStructureFactory<L>>(new FirstUIP(), learning, dsf, order,
291                 new MiniSATRestarts());
292         learning.setSolver(solver);
293         return solver;
294     }
295 
296     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningEZSimp() {
297         return newMiniLearningEZSimp(new MixedDataStructureDaniel());
298     }
299 
300     // public static ISolver newMiniLearning2EZSimp() {
301     // return newMiniLearningEZSimp(new MixedDataStructureWithBinary());
302     // }
303 
304     public static <L extends ILits> Solver<L,DataStructureFactory<L>> newMiniLearningEZSimp(
305             DataStructureFactory<L> dsf) {
306         LimitedLearning<L,DataStructureFactory<L>> learning = new PercentLengthLearning<L,DataStructureFactory<L>>(10);
307         Solver<L,DataStructureFactory<L>> solver = new Solver<L,DataStructureFactory<L>>(new FirstUIP(), learning, dsf,
308                 new VarOrder<L>(), new MiniSATRestarts());
309         learning.setSolver(solver);
310         solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
311         return solver;
312     }
313 
314     /**
315      * @return a default MiniLearning without restarts.
316      */
317     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningHeapEZSimpNoRestarts() {
318         LimitedLearning<ILits,DataStructureFactory<ILits>> learning = new PercentLengthLearning<ILits,DataStructureFactory<ILits>>(10);
319         Solver<ILits,DataStructureFactory<ILits>> solver = new Solver<ILits,DataStructureFactory<ILits>>(new FirstUIP(), learning,
320                 new MixedDataStructureDaniel(), new SearchParams(
321                         Integer.MAX_VALUE), new VarOrderHeap<ILits>(),
322                 new MiniSATRestarts());
323         learning.setSolver(solver);
324         solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
325         return solver;
326     }
327 
328     /**
329      * @return a default MiniLearning with restarts beginning at 1000 conflicts.
330      */
331     public static Solver<ILits,DataStructureFactory<ILits>> newMiniLearningHeapEZSimpLongRestarts() {
332         LimitedLearning<ILits,DataStructureFactory<ILits>> learning = new PercentLengthLearning<ILits,DataStructureFactory<ILits>>(10);
333         Solver<ILits,DataStructureFactory<ILits>> solver = new Solver<ILits,DataStructureFactory<ILits>>(new FirstUIP(), learning,
334                 new MixedDataStructureDaniel(), new SearchParams(1000),
335                 new VarOrderHeap<ILits>(), new MiniSATRestarts());
336         learning.setSolver(solver);
337         solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
338         return solver;
339     }
340 
341     /**
342      * @return a SAT solver using First UIP clause generator, watched literals,
343      *         VSIDS like heuristics learning only clauses having a great number
344      *         of active variables, i.e. variables with an activity strictly
345      *         greater than one.
346      */
347     public static Solver<ILits,DataStructureFactory<ILits>> newActiveLearning() {
348         ActiveLearning<ILits,DataStructureFactory<ILits>> learning = new ActiveLearning<ILits,DataStructureFactory<ILits>>();
349         Solver<ILits,DataStructureFactory<ILits>> s = new Solver<ILits,DataStructureFactory<ILits>>(new FirstUIP(), learning,
350                 new MixedDataStructureDaniel(), new VarOrder<ILits>(),
351                 new MiniSATRestarts());
352         learning.setOrder(s.getOrder());
353         learning.setSolver(s);
354         return s;
355     }
356 
357     /**
358      * @return a SAT solver very close to the original MiniSAT sat solver.
359      */
360     public static Solver<ILits,DataStructureFactory<ILits>> newMiniSAT() {
361         return newMiniSAT(new MixedDataStructureDaniel());
362     }
363 
364     /**
365      * @return MiniSAT without restarts.
366      */
367     public static Solver<ILits,DataStructureFactory<ILits>> newMiniSATNoRestarts() {
368         MiniSATLearning<ILits,DataStructureFactory<ILits>> learning = new MiniSATLearning<ILits,DataStructureFactory<ILits>>();
369         Solver<ILits,DataStructureFactory<ILits>> solver = new Solver<ILits,DataStructureFactory<ILits>>(new FirstUIP(), learning,
370                 new MixedDataStructureDaniel(), new SearchParams(
371                         Integer.MAX_VALUE), new VarOrder<ILits>(),
372                 new MiniSATRestarts());
373         learning.setDataStructureFactory(solver.getDSFactory());
374         learning.setVarActivityListener(solver);
375         return solver;
376 
377     }
378 
379     /**
380      * @return MiniSAT with a special data structure from Lawrence Ryan thesis
381      *         for managing binary clauses.
382      */
383     public static Solver<ILits2,DataStructureFactory<ILits2>> newMiniSAT2() {
384         return newMiniSAT(new MixedDataStructureWithBinary());
385     }
386 
387     /**
388      * @return MiniSAT with a special data structure from Lawrence Ryan thesis
389      *         for managing binary and ternary clauses.
390      */
391     public static Solver<ILits23,DataStructureFactory<ILits23>> newMiniSAT23() {
392         return newMiniSAT(new MixedDataStructureWithBinaryAndTernary());
393     }
394 
395     /**
396      * @param dsf
397      *                the data structure used for representing clauses and lits
398      * @return MiniSAT the data structure dsf.
399      */
400     public static <L extends ILits> Solver<L,DataStructureFactory<L>> newMiniSAT(
401             DataStructureFactory<L> dsf) {
402         MiniSATLearning<L,DataStructureFactory<L>> learning = new MiniSATLearning<L,DataStructureFactory<L>>();
403         Solver<L,DataStructureFactory<L>> solver = new Solver<L,DataStructureFactory<L>>(new FirstUIP(), learning, dsf,
404                 new VarOrder<L>(), new MiniSATRestarts());
405         learning.setDataStructureFactory(solver.getDSFactory());
406         learning.setVarActivityListener(solver);
407         return solver;
408     }
409 
410     /**
411      * @return a SAT solver very close to the original MiniSAT sat solver.
412      */
413     public static Solver<ILits,DataStructureFactory<ILits>> newMiniSATHeap() {
414         return newMiniSATHeap(new MixedDataStructureDaniel());
415     }
416 
417     /**
418      * @return a SAT solver very close to the original MiniSAT sat solver
419      *         including easy reason simplification.
420      */
421     public static Solver<ILits,DataStructureFactory<ILits>> newMiniSATHeapEZSimp() {
422         Solver<ILits,DataStructureFactory<ILits>> solver = newMiniSATHeap();
423         solver.setSimplifier(solver.SIMPLE_SIMPLIFICATION);
424         return solver;
425     }
426 
427     public static Solver<ILits,DataStructureFactory<ILits>> newMiniSATHeapExpSimp() {
428         Solver<ILits,DataStructureFactory<ILits>> solver = newMiniSATHeap();
429         solver.setSimplifier(solver.EXPENSIVE_SIMPLIFICATION);
430         return solver;
431     }
432 
433     /**
434      * @return MiniSAT with a special data structure from Lawrence Ryan thesis
435      *         for managing binary clauses.
436      */
437     public static Solver<ILits2,DataStructureFactory<ILits2>> newMiniSAT2Heap() {
438         return newMiniSATHeap(new MixedDataStructureWithBinary());
439     }
440 
441     /**
442      * @return MiniSAT with a special data structure from Lawrence Ryan thesis
443      *         for managing binary and ternary clauses.
444      */
445     public static Solver<ILits23,DataStructureFactory<ILits23>> newMiniSAT23Heap() {
446         return newMiniSATHeap(new MixedDataStructureWithBinaryAndTernary());
447     }
448 
449     public static <L extends ILits> Solver<L,DataStructureFactory<L>> newMiniSATHeap(
450             DataStructureFactory<L> dsf) {
451         MiniSATLearning<L,DataStructureFactory<L>> learning = new MiniSATLearning<L,DataStructureFactory<L>>();
452         Solver<L,DataStructureFactory<L>> solver = new Solver<L,DataStructureFactory<L>>(new FirstUIP(), learning, dsf,
453                 new VarOrderHeap<L>(), new MiniSATRestarts());
454         learning.setDataStructureFactory(solver.getDSFactory());
455         learning.setVarActivityListener(solver);
456         return solver;
457     }
458 
459     /**
460      * @return MiniSAT with data structures to handle cardinality constraints.
461      */
462     public static Solver<ILits,DataStructureFactory<ILits>> newMiniCard() {
463         return newMiniSAT(new CardinalityDataStructure());
464     }
465 
466 
467     /**
468      * @return MiniSAT with decision UIP clause generator.
469      */
470     public static Solver<ILits,DataStructureFactory<ILits>> newRelsat() {
471         MiniSATLearning<ILits,DataStructureFactory<ILits>> learning = new MiniSATLearning<ILits,DataStructureFactory<ILits>>();
472         Solver<ILits,DataStructureFactory<ILits>> solver = new Solver<ILits,DataStructureFactory<ILits>>(new DecisionUIP(), learning,
473                 new MixedDataStructureDaniel(), new VarOrderHeap<ILits>(),
474                 new MiniSATRestarts());
475         learning.setDataStructureFactory(solver.getDSFactory());
476         learning.setVarActivityListener(solver);
477         return solver;
478     }
479 
480     /**
481      * @return MiniSAT with VSIDS heuristics, FirstUIP clause generator for
482      *         backjumping but no learning.
483      */
484     public static Solver<ILits,DataStructureFactory<ILits>> newBackjumping() {
485         NoLearningButHeuristics<ILits,DataStructureFactory<ILits>> learning = new NoLearningButHeuristics<ILits,DataStructureFactory<ILits>>();
486         Solver<ILits,DataStructureFactory<ILits>> solver = new Solver<ILits,DataStructureFactory<ILits>>(new FirstUIP(), learning,
487                 new MixedDataStructureDaniel(), new VarOrderHeap<ILits>(),
488                 new MiniSATRestarts());
489         learning.setVarActivityListener(solver);
490         return solver;
491     }
492 
493     /**
494      * @return a SAT solver with learning limited to clauses of length smaller
495      *         or equals to 3, with a specific data structure for binary and
496      *         ternary clauses as found in Lawrence Ryan thesis, without
497      *         restarts, with a Jeroslow/Wang kind of heuristics.
498      */
499     public static Solver<ILits23,DataStructureFactory<ILits23>> newMini3SAT() {
500         LimitedLearning<ILits23,DataStructureFactory<ILits23>> learning = new FixedLengthLearning<ILits23,DataStructureFactory<ILits23>>(3);
501         Solver<ILits23,DataStructureFactory<ILits23>> solver = new Solver<ILits23,DataStructureFactory<ILits23>>(new FirstUIP(), learning,
502                 new MixedDataStructureWithBinaryAndTernary(), new SearchParams(
503                         Integer.MAX_VALUE), new JWOrder(),
504                 new MiniSATRestarts());
505         learning.setSolver(solver);
506         return solver;
507     }
508 
509     /**
510      * @return a Mini3SAT with full learning.
511      * @see #newMini3SAT()
512      */
513     public static Solver<ILits23,DataStructureFactory<ILits23>> newMini3SATb() {
514         MiniSATLearning<ILits23,DataStructureFactory<ILits23>> learning = new MiniSATLearning<ILits23,DataStructureFactory<ILits23>>();
515         Solver<ILits23,DataStructureFactory<ILits23>> solver = new Solver<ILits23,DataStructureFactory<ILits23>>(new FirstUIP(), learning,
516                 new MixedDataStructureWithBinaryAndTernary(), new SearchParams(
517                         Integer.MAX_VALUE), new JWOrder(),
518                 new MiniSATRestarts());
519         learning.setDataStructureFactory(solver.getDSFactory());
520         learning.setVarActivityListener(solver);
521         return solver;
522     }
523 
524     /**
525      * @return a solver computing models with a minimum number of satisfied literals.
526      */
527     public static ISolver newMinOneSolver() {
528         return new OptToSatAdapter(new MinOneDecorator(newDefault()));
529     }
530     
531     /**
532      * Default solver of the SolverFactory. This solver is meant to be used on
533      * challenging SAT benchmarks.
534      * 
535      * @return the best "general purpose" SAT solver available in the factory.
536      * @see #defaultSolver() the same method, polymorphic, to be called from an
537      *      instance of ASolverFactory.
538      */
539     public static ISolver newDefault() {
540         return newMiniLearningHeapRsatExpSimpBiere();
541     }
542 
543     @Override
544     public ISolver defaultSolver() {
545         return newDefault();
546     }
547 
548     /**
549      * Small footprint SAT solver.
550      * 
551      * @return a SAT solver suitable for solving small/easy SAT benchmarks.
552      * @see #lightSolver() the same method, polymorphic, to be called from an
553      *      instance of ASolverFactory.
554      */
555     public static ISolver newLight() {
556         return newMini3SAT();
557     }
558 
559     @Override
560     public ISolver lightSolver() {
561         return newLight();
562     }
563 
564     public static ISolver newDimacsOutput() {
565         return new DimacsOutputSolver();
566     }
567 
568 }