// Setup the verbosity
d_minisat->verbosity = (Options::current()->verbosity > 0) ? 1 : -1;
- // No random choices
- if(Debug.isOn("no_rnd_decisions")) {
- d_minisat->random_var_freq = 0;
- }
+ // Setup the random decision parameters
+ d_minisat->random_var_freq = Options::current()->satRandomFreq;
+ d_minisat->random_seed = Options::current()->satRandomSeed;
d_statistics.init(d_minisat);
}
earlyTypeChecking(USE_EARLY_TYPE_CHECKING_BY_DEFAULT),
incrementalSolving(false),
rewriteArithEqualities(false),
+ satRandomFreq(0.0),
+ satRandomSeed(91648253), //Minisat's default value
pivotRule(MINIMUM)
{
}
--produce-assignments support the get-assignment command\n\
--lazy-definition-expansion expand define-fun lazily\n\
--pivot-rule=RULE change the pivot rule (see --pivot-rule help)\n\
+ --random-freq=P sets the frequency of random decisions in the sat solver(P=0.0 by default)\n\
+ --random-seed=S sets the random seed for the sat solver\n\
--rewrite-arithmetic-equalities rewrite (= x y) to (and (<= x y) (>= x y)) in arithmetic\n\
--incremental enable incremental solving\n";
EAGER_TYPE_CHECKING,
INCREMENTAL,
PIVOT_RULE,
+ RANDOM_FREQUENCY,
+ RANDOM_SEED,
REWRITE_ARITHMETIC_EQUALITIES
};/* enum OptionValue */
{ "eager-type-checking", no_argument, NULL, EAGER_TYPE_CHECKING },
{ "incremental", no_argument, NULL, INCREMENTAL },
{ "pivot-rule" , required_argument, NULL, PIVOT_RULE },
+ { "random-freq" , required_argument, NULL, RANDOM_FREQUENCY },
+ { "random-seed" , required_argument, NULL, RANDOM_SEED },
{ "rewrite-arithmetic-equalities", no_argument, NULL, REWRITE_ARITHMETIC_EQUALITIES },
{ NULL , no_argument , NULL, '\0' }
};/* if you add things to the above, please remember to update usage.h! */
rewriteArithEqualities = true;
break;
+ case RANDOM_SEED:
+ satRandomSeed = atof(optarg);
+ break;
+
+ case RANDOM_FREQUENCY:
+ satRandomFreq = atof(optarg);
+ if(! (0.0 <= satRandomFreq && satRandomFreq <= 1.0)){
+ throw OptionException(string("--random-freq: `") +
+ optarg + "' is not between 0.0 and 1.0.");
+ }
+ break;
+
case PIVOT_RULE:
if(!strcmp(optarg, "min")) {
pivotRule = MINIMUM;
/** Whether to rewrite equalities in arithmetic theory */
bool rewriteArithEqualities;
+
+ /**
+ * Frequency for the sat solver to make random decisions.
+ * Should be between 0 and 1.
+ */
+ double satRandomFreq;
+
+ /**
+ * Seed for Minisat's random decision procedure.
+ * If this is 0, no random decisions will occur.
+ **/
+ double satRandomSeed;
+
/** The pivot rule for arithmetic */
typedef enum { MINIMUM, BREAK_TIES, MAXIMUM } ArithPivotRule;
ArithPivotRule pivotRule;