CFLAGS_BASE = $(OPTIMIZE)
# OPTION to compile CRYPTOMiniSAT
-CRYPTOMINISAT = true
-CFLAGS_BASE = $(OPTIMIZE) -DCRYPTOMINISAT
-MTL = ../sat/cryptominisat/mtl
-SOLVER_INCLUDE = ../sat/cryptominisat
+#CRYPTOMINISAT = true
+#CFLAGS_BASE = $(OPTIMIZE) -DCRYPTOMINISAT
+#MTL = ../sat/cryptominisat/mtl
+#SOLVER_INCLUDE = ../sat/cryptominisat
# OPTION to compile CRYPTOMiniSAT version 2.x
-#CRYPTOMINISAT2 = true
-#CFLAGS_BASE = $(OPTIMIZE) -DCRYPTOMINISAT2
-#MTL = ../sat/cryptominisat2/mtl
-#SOLVER_INCLUDE = ../sat/cryptominisat2
+CRYPTOMINISAT2 = true
+CFLAGS_BASE = $(OPTIMIZE) -DCRYPTOMINISAT2
+MTL = ../sat/cryptominisat2/mtl
+SOLVER_INCLUDE = ../sat/cryptominisat2
# OPTION to compile MiniSAT
#CORE = true
#define HASHMAP hash_map
#define HASHSET hash_set
#define HASHMULTISET hash_multiset
-#define INITIAL_TABLE_SIZE 100
+#define INITIAL_TABLE_SIZE 100
#define CLAUSAL_ABSTRACTION_CUTOFF 0.5
+#define MAX_BUCKET_LIMIT 3
using namespace std;
namespace BEEV {
//Flag that determines whether the Boolean SAT solver should
//assign random polarity to the Boolean variables
- bool rand_bool_polarity_flag;
+ bool random_seed_flag;
+ int random_seed;
+
+ //Flag that allows the printing of the DIMACS format of the input
+ bool print_cnf_flag;
//flag to decide whether to print "valid/invalid" or not
bool print_output_flag;
//Determines the number of abstraction-refinement loop count for the
//for-construct
num_absrefine_flag = false;
- int num_absrefine = 0;
+ num_absrefine = 0;
//if this option is true then print the way dawson wants using a
//different printer. do not use this printer.
//Flag that determines whether the Boolean SAT solver should
//assign random polarity to the Boolean variables
- rand_bool_polarity_flag = false;
+ random_seed_flag = false;
+ random_seed = 0;
+
+ //Flag that allows the printing of the DIMACS format of the
+ //input
+ print_cnf_flag = false;
//flag to decide whether to print "valid/invalid" or not
print_output_flag = false;
extern int cvcparse(void*);
extern int smtparse(void*);
-void vc_setFlags(VC vc, char c, int num_absrefine) {
+void vc_setFlags(VC vc, char c, int param_value) {
bmstar b = (bmstar)(((stpstar)vc)->bm);
std::string helpstring =
break;
case 'f':
b->UserFlags.num_absrefine_flag = true;
- b->UserFlags.num_absrefine = num_absrefine;
+ b->UserFlags.num_absrefine = param_value;
break;
case 'h':
fprintf(stderr,BEEV::usage,BEEV::prog);
//FatalError("");
//return -1;
break;
+ case 'i':
+ b->UserFlags.random_seed_flag = true;
+ b->UserFlags.random_seed = param_value;
+ break;
case 'n':
b->UserFlags.print_output_flag = true;
break;
return -1;
break;
case 'i':
- bm->UserFlags.rand_bool_polarity_flag = true;
+ bm->UserFlags.random_seed_flag = true;
+ bm->UserFlags.random_seed = atoi(argv[++i]);
+ if(!(0 <= bm->UserFlags.random_seed))
+ {
+ FatalError("Random Seed should be an integer >= 0\n");
+ }
+ break;
+ case 'j':
+ bm->UserFlags.print_cnf_flag = true;
break;
case 'n':
bm->UserFlags.print_output_flag = true;
* LICENSE: Please view LICENSE file in the home dir of this Program
********************************************************************/
#include "ToSAT.h"
-#define MAX_BUCKET_LIMIT 3
namespace BEEV
{
FatalError("toSATandSolve: Nothing to Solve", ASTUndefined);
}
- if(bm->UserFlags.rand_bool_polarity_flag)
+ if(bm->UserFlags.random_seed_flag)
{
- newSolver.polarity_mode = newSolver.polarity_rnd;
+ newSolver.setSeed(bm->UserFlags.random_seed);
+ //cerr << "We have set the seed value to "
+ // << bm->UserFlags.random_seed
+ // << endl;
+ }
+
+ if(bm->UserFlags.print_cnf_flag)
+ {
+ #define DEBUG_LIB
}
#ifdef CRYPTOMINISAT
newSolver.startClauseAdding();
--- /dev/null
+
+a,b,c,x,y : BITVECTOR(96);
+
+
+ASSERT(a[0:0] = 0bin1);
+ASSERT(b[0:0] = 0bin1);
+ASSERT(c=0hex0000000000000056E35E38CD);
+ASSERT(a[95:48] = 0hex000000000000);
+ASSERT(b[95:48] = 0hex000000000000);
+
+
+QUERY(
+ NOT (
+ c=BVMULT(96,a,b) AND NOT
+ a=0hex000000000000000000000001
+ AND
+ NOT
+ b=0hex000000000000000000000001
+ AND NOT
+ a=c
+ AND NOT
+ b=c
+
+ )
+);
+
+COUNTEREXAMPLE;
+