summaryrefslogtreecommitdiff
path: root/src/prop/bvminisat/core
diff options
context:
space:
mode:
authorTim King <taking@google.com>2015-10-23 16:57:48 -0700
committerTim King <taking@google.com>2015-10-26 09:56:58 -0700
commit918b0fd9ecde048773d245eac66eba9b4306d9d2 (patch)
tree218d4b5aadbebd440185dc00e4f6589287326b19 /src/prop/bvminisat/core
parentaf86e5a8dc7a64fb5f7b4ca7bd3b2bedf5e8fe32 (diff)
This fixes a one definition rule violation for reduceDB_lt in Solver.cc in minisat and bvminisat. This also moves BVMinisat into CVC4. This also wrapped code in cpp files into the namespaces instead of having using namespace *.
Diffstat (limited to 'src/prop/bvminisat/core')
-rw-r--r--src/prop/bvminisat/core/Dimacs.h4
-rw-r--r--src/prop/bvminisat/core/Main.cc9
-rw-r--r--src/prop/bvminisat/core/Solver.cc6
-rw-r--r--src/prop/bvminisat/core/Solver.h5
-rw-r--r--src/prop/bvminisat/core/SolverTypes.h4
5 files changed, 22 insertions, 6 deletions
diff --git a/src/prop/bvminisat/core/Dimacs.h b/src/prop/bvminisat/core/Dimacs.h
index 64df4f635..46451d464 100644
--- a/src/prop/bvminisat/core/Dimacs.h
+++ b/src/prop/bvminisat/core/Dimacs.h
@@ -26,6 +26,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
#include "utils/ParseUtils.h"
#include "core/SolverTypes.h"
+namespace CVC4 {
namespace BVMinisat {
//=================================================================================================
@@ -84,6 +85,7 @@ static void parse_DIMACS(gzFile input_stream, Solver& S) {
parse_DIMACS_main(in, S); }
//=================================================================================================
-}
+} /* CVC4::BVMinisat namespace */
+} /* CVC4 namespace */
#endif
diff --git a/src/prop/bvminisat/core/Main.cc b/src/prop/bvminisat/core/Main.cc
index 95cfe7bfe..74cc9cde8 100644
--- a/src/prop/bvminisat/core/Main.cc
+++ b/src/prop/bvminisat/core/Main.cc
@@ -29,7 +29,9 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
#include "core/Dimacs.h"
#include "core/Solver.h"
-using namespace BVMinisat;
+
+namespace CVC4 {
+namespace BVMinisat {
//=================================================================================================
@@ -63,6 +65,8 @@ static void SIGINT_exit(int signum) {
printf("\n"); printf("*** INTERRUPTED ***\n"); }
_exit(1); }
+} /* CVC4::BVMinisat namespace */
+} /* CVC4 namespace */
//=================================================================================================
// Main:
@@ -70,6 +74,9 @@ static void SIGINT_exit(int signum) {
int main(int argc, char** argv)
{
+ using namespace CVC4;
+ using namespace CVC4::BVMinisat;
+
try {
setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n where input may be either in plain or gzipped DIMACS.\n");
// printf("This is MiniSat 2.0 beta\n");
diff --git a/src/prop/bvminisat/core/Solver.cc b/src/prop/bvminisat/core/Solver.cc
index 1267561fb..ca7228ee8 100644
--- a/src/prop/bvminisat/core/Solver.cc
+++ b/src/prop/bvminisat/core/Solver.cc
@@ -31,8 +31,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
#include "theory/bv/options.h"
#include "smt/options.h"
#include "theory/interrupted.h"
-using namespace BVMinisat;
+namespace CVC4 {
namespace BVMinisat {
#define OUTPUT_TAG "bvminisat: [a=" << assumptions.size() << ",l=" << decisionLevel() << "] "
@@ -52,7 +52,6 @@ std::ostream& operator << (std::ostream& out, const BVMinisat::Clause& c) {
return out;
}
-}
//=================================================================================================
// Options:
@@ -1207,3 +1206,6 @@ void Solver::garbageCollect()
ca.size()*ClauseAllocator::Unit_Size, to.size()*ClauseAllocator::Unit_Size);
to.moveTo(ca);
}
+
+} /* CVC4::BVMinisat namespace */
+} /* CVC4 namespace */
diff --git a/src/prop/bvminisat/core/Solver.h b/src/prop/bvminisat/core/Solver.h
index 016a0c225..214e425f9 100644
--- a/src/prop/bvminisat/core/Solver.h
+++ b/src/prop/bvminisat/core/Solver.h
@@ -32,6 +32,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
#include <ext/hash_set>
#include <vector>
+namespace CVC4 {
namespace BVMinisat {
/** Interface for minisat callbacks */
@@ -440,6 +441,8 @@ inline void Solver::toDimacs (const char* file, Lit p, Lit q, Lit r){ ve
//=================================================================================================
-}
+} /* CVC4::BVMinisat namespace */
+} /* CVC4 namespace */
+
#endif
diff --git a/src/prop/bvminisat/core/SolverTypes.h b/src/prop/bvminisat/core/SolverTypes.h
index 0400f956d..aa0921b78 100644
--- a/src/prop/bvminisat/core/SolverTypes.h
+++ b/src/prop/bvminisat/core/SolverTypes.h
@@ -29,6 +29,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
#include "prop/bvminisat/mtl/Map.h"
#include "prop/bvminisat/mtl/Alloc.h"
+namespace CVC4 {
namespace BVMinisat {
//=================================================================================================
@@ -417,6 +418,7 @@ inline void Clause::strengthen(Lit p)
//=================================================================================================
-}
+} /* CVC4::BVMinisat namespace */
+} /* CVC4 namespace */
#endif
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback