Fixes a linking problem with the new SatSolverConstructor on Mac.
[cvc5.git] / src / prop / sat_solver_factory.cpp
1 /********************* */
2 /*! \file sat_solver_factory.h
3 ** \verbatim
4 ** Original author: lianah
5 ** Major contributors:
6 ** Minor contributors (to current version):
7 ** This file is part of the CVC4 prototype.
8 ** Copyright (c) 2009, 2010, 2011 The Analysis of Computer Systems Group (ACSys)
9 ** Courant Institute of Mathematical Sciences
10 ** New York University
11 ** See the file COPYING in the top-level source directory for licensing
12 ** information.\endverbatim
13 **
14 ** \brief SAT Solver creation facility.
15 **
16 ** SAT Solver.
17 **/
18
19 #include "prop/sat_solver_factory.h"
20 #include "prop/sat_solver_registry.h"
21 #include "prop/minisat/minisat.h"
22 #include "prop/bvminisat/bvminisat.h"
23
24 namespace CVC4 {
25 namespace prop {
26
27 template class SatSolverConstructor<MinisatSatSolver>;
28 template class SatSolverConstructor<BVMinisatSatSolver>;
29
30 BVSatSolverInterface* SatSolverFactory::createMinisat() {
31 return new BVMinisatSatSolver();
32 }
33
34 DPLLSatSolverInterface* SatSolverFactory::createDPLLMinisat() {
35 return new MinisatSatSolver();
36 }
37
38 SatSolver* SatSolverFactory::create(const char* name) {
39 SatSolverConstructorInterface* constructor = SatSolverRegistry::getConstructor(name);
40 if (constructor) {
41 return constructor->construct();
42 } else {
43 return NULL;
44 }
45 }
46
47 void SatSolverFactory::getSolverIds(std::vector<std::string>& solvers) {
48 SatSolverRegistry::getSolverIds(solvers);
49 }
50
51 } /* namespace CVC4::prop */
52 } /* namespace CVC4 */