Update copyrights, add missing file-level documentation; fix perms.
[cvc5.git] / src / prop / sat_solver_factory.cpp
1 /********************* */
2 /*! \file sat_solver_factory.cpp
3 ** \verbatim
4 ** Original author: Dejan Jovanovic
5 ** Major contributors: Tim King
6 ** Minor contributors (to current version): Liana Hadarean
7 ** This file is part of the CVC4 project.
8 ** Copyright (c) 2009-2013 New York University and The University of Iowa
9 ** See the file COPYING in the top-level source directory for licensing
10 ** information.\endverbatim
11 **
12 ** \brief SAT Solver creation facility.
13 **
14 ** SAT Solver.
15 **/
16
17 #include "prop/sat_solver_factory.h"
18 #include "prop/sat_solver_registry.h"
19 #include "prop/minisat/minisat.h"
20 #include "prop/bvminisat/bvminisat.h"
21
22 namespace CVC4 {
23 namespace prop {
24
25 template class SatSolverConstructor<MinisatSatSolver>;
26 template class SatSolverConstructor<BVMinisatSatSolver>;
27
28 BVSatSolverInterface* SatSolverFactory::createMinisat(context::Context* mainSatContext) {
29 return new BVMinisatSatSolver(mainSatContext);
30 }
31
32 DPLLSatSolverInterface* SatSolverFactory::createDPLLMinisat() {
33 return new MinisatSatSolver();
34 }
35
36 SatSolver* SatSolverFactory::create(const char* name) {
37 SatSolverConstructorInterface* constructor = SatSolverRegistry::getConstructor(name);
38 if (constructor) {
39 return constructor->construct();
40 } else {
41 return NULL;
42 }
43 }
44
45 void SatSolverFactory::getSolverIds(std::vector<std::string>& solvers) {
46 SatSolverRegistry::getSolverIds(solvers);
47 }
48
49 } /* namespace CVC4::prop */
50 } /* namespace CVC4 */