def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.unsat_cores_mode is not None: raise PysmtValueError("'unsat_cores_mode' option not supported.") # Set Defaults self.preprocessing = True self.propagation_limit = None self.more_important_lit = None self.less_important_lit = None self.global_default_phase = None self.enable_trace_generation = False self.output = None self.verbosity = 0 for k,v in self.solver_options.items(): if k == "enable_trace_generation": if v not in (True, False): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "output": if v is not None and not hasattr(v, "fileno"): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "global_default_phase": if v is not None and v not in PicosatOptions.ALL_GLOBAL_DEFAULT_PHASE: raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "preprocessing": if v not in (True, False): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "verbosity": if not is_python_integer(v): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "propagation_limit": if not is_python_integer(v): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k in ("more_important_lit", "less_important_lit"): if v is not None: try: valid = all(x.is_symbol(types.BOOL) for x in v) except: valid = False if not valid: raise PysmtValueError("'more_important_lit' and " "'less_important_lit' require a " "list of Boolean variables") else: raise PysmtValueError("Unrecognized option '%s'." % k) # Store option setattr(self, k, v) # Consistency if self.output is not None and self.verbosity == 0: self.verbosity = 1
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.unsat_cores_mode is not None: raise PysmtValueError("'unsat_cores_mode' option not supported.") # Set Defaults self.preprocessing = True self.propagation_limit = None self.more_important_lit = None self.less_important_lit = None self.global_default_phase = None self.enable_trace_generation = False self.output = None self.verbosity = 0 for k, v in self.solver_options.items(): if k == "enable_trace_generation": if v not in (True, False): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "output": if v is not None and not hasattr(v, "fileno"): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "global_default_phase": if v is not None and v not in PicosatOptions.ALL_GLOBAL_DEFAULT_PHASE: raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "preprocessing": if v not in (True, False): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "verbosity": if not is_python_integer(v): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k == "propagation_limit": if not is_python_integer(v): raise PysmtValueError("Invalid value for %s: %s" % \ (str(k),str(v))) elif k in ("more_important_lit", "less_important_lit"): if v is not None: try: valid = all(x.is_symbol(types.BOOL) for x in v) except: valid = False if not valid: raise PysmtValueError("'more_important_lit' and " "'less_important_lit' require a " "list of Boolean variables") else: raise PysmtValueError("Unrecognized option '%s'." % k) # Store option setattr(self, k, v) # Consistency if self.output is not None and self.verbosity == 0: self.verbosity = 1
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.random_seed is not None: raise PysmtValueError("BTOR Does not support Random Seed setting.") # Disabling Incremental usage is not allowed. # This needs to be set to 1 self.incrementality = True
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.random_seed is not None: raise ValueError("BTOR Does not support Random Seed setting.") # Disabling Incremental usage is not allowed. # This needs to be set to 1 self.incrementality = True
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.unsat_cores_mode is not None: raise ValueError("'unsat_cores_mode' option not supported.") self.debug_interaction = False if 'debug_interaction' in self.solver_options: self.debug_interaction = self.solver_options del self.solver_options['debug_interaction']
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.unsat_cores_mode is not None: raise PysmtValueError("'unsat_cores_mode' option not supported.") self.debug_interaction = False if 'debug_interaction' in self.solver_options: self.debug_interaction = self.solver_options del self.solver_options['debug_interaction']
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) self.exit_on_exception = False for k,v in self.solver_options.items(): if k == "exit_on_exception": if v not in (True, False): raise ValueError("Invalid value for %s: %s" % \ (str(k),str(v))) else: raise ValueError("Unrecognized option '%s'." % k) # Store option setattr(self, k, v)
def __init__(self, **kwargs): SolverOptions.__init__(self, **kwargs) if self.unsat_cores_mode is not None: # Check if, for some reason, unsat cores are # required. In case, raise an error. # # TODO: This should be within the Solver, here we should # only check that options are set and non-contraddicting. # raise NotImplementedError("BddSolver does not "\ "support unsat cores")
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) self.exit_on_exception = False for k, v in self.solver_options.items(): if k == "exit_on_exception": if v not in (True, False): raise ValueError("Invalid value for %s: %s" % \ (str(k),str(v))) else: raise ValueError("Unrecognized option '%s'." % k) # Store option setattr(self, k, v)
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.random_seed is not None: raise PysmtValueError("'random_seed' option not supported.") if self.unsat_cores_mode is not None: raise PysmtValueError("'unsat_cores_mode' option not supported.") for k,v in self.solver_options.items(): if k == "static_ordering": if v is not None: try: valid = all(x.is_symbol(types.BOOL) for x in v) except: valid = False if not valid: raise PysmtValueError("The BDD static ordering must be" \ " a list of Boolean variables") elif k == "dynamic_reordering": if v not in (True, False): raise PysmtValueError("Invalid value %s for '%s'" % \ (str(k),str(v))) elif k == "reordering_algorithm": if v not in BddOptions.CUDD_ALL_REORDERING_ALGORITHMS: raise PysmtValueError("Invalid value %s for '%s'" % \ (str(k),str(v))) else: raise PysmtValueError("Unrecognized option '%s'." % k) # Store option setattr(self, k, v) # Set Defaults if not hasattr(self, "dynamic_reordering"): self.dynamic_reordering = False if not hasattr(self, "reordering_algorithm"): if not self.dynamic_reordering: self.reordering_algorithm = None else: self.reordering_algorithm = BddOptions.CUDD_REORDER_SIFT if not hasattr(self, "static_ordering"): self.static_ordering = None # Consistency check if not self.dynamic_reordering and self.reordering_algorithm is not None: raise PysmtValueError("reordering_algorithm requires " "dynamic_reordering.")
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.random_seed is not None: raise PysmtValueError("'random_seed' option not supported.") if self.unsat_cores_mode is not None: raise PysmtValueError("'unsat_cores_mode' option not supported.") for k, v in self.solver_options.items(): if k == "static_ordering": if v is not None: try: valid = all(x.is_symbol(types.BOOL) for x in v) except: valid = False if not valid: raise PysmtValueError("The BDD static ordering must be" \ " a list of Boolean variables") elif k == "dynamic_reordering": if v not in (True, False): raise PysmtValueError("Invalid value %s for '%s'" % \ (str(k),str(v))) elif k == "reordering_algorithm": if v not in BddOptions.CUDD_ALL_REORDERING_ALGORITHMS: raise PysmtValueError("Invalid value %s for '%s'" % \ (str(k),str(v))) else: raise PysmtValueError("Unrecognized option '%s'." % k) # Store option setattr(self, k, v) # Set Defaults if not hasattr(self, "dynamic_reordering"): self.dynamic_reordering = False if not hasattr(self, "reordering_algorithm"): if not self.dynamic_reordering: self.reordering_algorithm = None else: self.reordering_algorithm = BddOptions.CUDD_REORDER_SIFT if not hasattr(self, "static_ordering"): self.static_ordering = None # Consistency check if not self.dynamic_reordering and self.reordering_algorithm is not None: raise PysmtValueError("reordering_algorithm requires " "dynamic_reordering.")
def __init__( self, generate_models=True, unsat_cores_mode=None, static_ordering=None, dynamic_reordering=False, reordering_algorithm=CUDD_REORDER_SIFT, ): if unsat_cores_mode is not None: # Check if, for some reason, unsat cores are # required. In case, raise an error. raise NotImplementedError("BddSolver does not " "support unsat cores") SolverOptions.__init__(self, generate_models=generate_models, unsat_cores_mode=None) self.static_ordering = static_ordering self.dynamic_reordering = dynamic_reordering self.reordering_algorithm = reordering_algorithm
def __init__(self, generate_models=True, unsat_cores_mode=None, static_ordering=None, dynamic_reordering=False, reordering_algorithm=CUDD_REORDER_SIFT): if unsat_cores_mode is not None: # Check if, for some reason, unsat cores are # required. In case, raise an error. raise NotImplementedError("BddSolver does not "\ "support unsat cores") SolverOptions.__init__(self, generate_models=generate_models, unsat_cores_mode=None) self.static_ordering = static_ordering self.dynamic_reordering = dynamic_reordering self.reordering_algorithm = reordering_algorithm
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.random_seed is not None: raise PysmtValueError("BTOR Does not support Random Seed setting.") # Disabling Incremental usage is not allowed. # This needs to be set to 1 self.incrementality = True self.internal_options = [ boolector.BTOR_OPT_MODEL_GEN, boolector.BTOR_OPT_INCREMENTAL, boolector.BTOR_OPT_INCREMENTAL_SMT1, boolector.BTOR_OPT_INPUT_FORMAT, boolector.BTOR_OPT_OUTPUT_NUMBER_FORMAT, boolector.BTOR_OPT_OUTPUT_FORMAT, boolector.BTOR_OPT_ENGINE, boolector.BTOR_OPT_SAT_ENGINE, boolector.BTOR_OPT_AUTO_CLEANUP, boolector.BTOR_OPT_PRETTY_PRINT, boolector.BTOR_OPT_EXIT_CODES, boolector.BTOR_OPT_SEED, boolector.BTOR_OPT_VERBOSITY, boolector.BTOR_OPT_LOGLEVEL, boolector.BTOR_OPT_REWRITE_LEVEL, boolector.BTOR_OPT_SKELETON_PREPROC, boolector.BTOR_OPT_ACKERMANN, boolector.BTOR_OPT_BETA_REDUCE_ALL, boolector.BTOR_OPT_ELIMINATE_SLICES, boolector.BTOR_OPT_VAR_SUBST, boolector.BTOR_OPT_UCOPT, boolector.BTOR_OPT_MERGE_LAMBDAS, boolector.BTOR_OPT_EXTRACT_LAMBDAS, boolector.BTOR_OPT_NORMALIZE_ADD, boolector.BTOR_OPT_FUN_PREPROP, boolector.BTOR_OPT_FUN_PRESLS, boolector.BTOR_OPT_FUN_DUAL_PROP, boolector.BTOR_OPT_FUN_DUAL_PROP_QSORT, boolector.BTOR_OPT_FUN_JUST, boolector.BTOR_OPT_FUN_JUST_HEURISTIC, boolector.BTOR_OPT_FUN_LAZY_SYNTHESIZE, boolector.BTOR_OPT_FUN_EAGER_LEMMAS, boolector.BTOR_OPT_SLS_NFLIPS, boolector.BTOR_OPT_SLS_STRATEGY, boolector.BTOR_OPT_SLS_JUST, boolector.BTOR_OPT_SLS_MOVE_GW, boolector.BTOR_OPT_SLS_MOVE_RANGE, boolector.BTOR_OPT_SLS_MOVE_SEGMENT, boolector.BTOR_OPT_SLS_MOVE_RAND_WALK, boolector.BTOR_OPT_SLS_PROB_MOVE_RAND_WALK, boolector.BTOR_OPT_SLS_MOVE_RAND_ALL, boolector.BTOR_OPT_SLS_MOVE_RAND_RANGE, boolector.BTOR_OPT_SLS_MOVE_PROP, boolector.BTOR_OPT_SLS_MOVE_PROP_N_PROP, boolector.BTOR_OPT_SLS_MOVE_PROP_N_SLS, boolector.BTOR_OPT_SLS_MOVE_PROP_FORCE_RW, boolector.BTOR_OPT_SLS_MOVE_INC_MOVE_TEST, boolector.BTOR_OPT_SLS_USE_RESTARTS, boolector.BTOR_OPT_SLS_USE_BANDIT, boolector.BTOR_OPT_PROP_USE_RESTARTS, boolector.BTOR_OPT_PROP_USE_BANDIT, boolector.BTOR_OPT_PROP_PATH_SEL, boolector.BTOR_OPT_PROP_PROB_USE_INV_VALUE, boolector.BTOR_OPT_PROP_PROB_FLIP_COND, boolector.BTOR_OPT_PROP_PROB_FLIP_COND_CONST, boolector.BTOR_OPT_PROP_FLIP_COND_CONST_DELTA, boolector.BTOR_OPT_PROP_FLIP_COND_CONST_NPATHSEL, boolector.BTOR_OPT_PROP_PROB_SLICE_KEEP_DC, boolector.BTOR_OPT_PROP_PROB_CONC_FLIP, boolector.BTOR_OPT_PROP_PROB_SLICE_FLIP, boolector.BTOR_OPT_PROP_PROB_EQ_FLIP, boolector.BTOR_OPT_PROP_PROB_AND_FLIP, boolector.BTOR_OPT_PROP_NO_MOVE_ON_CONFLICT, boolector.BTOR_OPT_AIGPROP_USE_RESTARTS, boolector.BTOR_OPT_AIGPROP_USE_BANDIT, boolector.BTOR_OPT_SORT_EXP, boolector.BTOR_OPT_SORT_AIG, boolector.BTOR_OPT_SORT_AIGVEC, boolector.BTOR_OPT_AUTO_CLEANUP_INTERNAL, boolector.BTOR_OPT_SIMPLIFY_CONSTRAINTS, boolector.BTOR_OPT_CHK_FAILED_ASSUMPTIONS ]
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) # TODO: CVC4 Supports UnsatCore extraction # but we did not wrapped it yet. (See #349) if self.unsat_cores_mode is not None: raise PysmtValueError("'unsat_cores_mode' option not supported.")
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options)
def __init__(self, **base_options): SolverOptions.__init__(self, **base_options) if self.random_seed is not None: raise PysmtValueError("BTOR Does not support Random Seed setting.") # Disabling Incremental usage is not allowed. # This needs to be set to 1 self.incrementality = True self.internal_options = [boolector.BTOR_OPT_MODEL_GEN, boolector.BTOR_OPT_INCREMENTAL, boolector.BTOR_OPT_INCREMENTAL_SMT1, boolector.BTOR_OPT_INPUT_FORMAT, boolector.BTOR_OPT_OUTPUT_NUMBER_FORMAT, boolector.BTOR_OPT_OUTPUT_FORMAT, boolector.BTOR_OPT_ENGINE, boolector.BTOR_OPT_SAT_ENGINE, boolector.BTOR_OPT_AUTO_CLEANUP, boolector.BTOR_OPT_PRETTY_PRINT, boolector.BTOR_OPT_EXIT_CODES, boolector.BTOR_OPT_SEED, boolector.BTOR_OPT_VERBOSITY, boolector.BTOR_OPT_LOGLEVEL, boolector.BTOR_OPT_REWRITE_LEVEL, boolector.BTOR_OPT_SKELETON_PREPROC, boolector.BTOR_OPT_ACKERMANN, boolector.BTOR_OPT_BETA_REDUCE_ALL, boolector.BTOR_OPT_ELIMINATE_SLICES, boolector.BTOR_OPT_VAR_SUBST, boolector.BTOR_OPT_UCOPT, boolector.BTOR_OPT_MERGE_LAMBDAS, boolector.BTOR_OPT_EXTRACT_LAMBDAS, boolector.BTOR_OPT_NORMALIZE_ADD, boolector.BTOR_OPT_FUN_PREPROP, boolector.BTOR_OPT_FUN_PRESLS, boolector.BTOR_OPT_FUN_DUAL_PROP, boolector.BTOR_OPT_FUN_DUAL_PROP_QSORT, boolector.BTOR_OPT_FUN_JUST, boolector.BTOR_OPT_FUN_JUST_HEURISTIC, boolector.BTOR_OPT_FUN_LAZY_SYNTHESIZE, boolector.BTOR_OPT_FUN_EAGER_LEMMAS, boolector.BTOR_OPT_SLS_NFLIPS, boolector.BTOR_OPT_SLS_STRATEGY, boolector.BTOR_OPT_SLS_JUST, boolector.BTOR_OPT_SLS_MOVE_GW, boolector.BTOR_OPT_SLS_MOVE_RANGE, boolector.BTOR_OPT_SLS_MOVE_SEGMENT, boolector.BTOR_OPT_SLS_MOVE_RAND_WALK, boolector.BTOR_OPT_SLS_PROB_MOVE_RAND_WALK, boolector.BTOR_OPT_SLS_MOVE_RAND_ALL, boolector.BTOR_OPT_SLS_MOVE_RAND_RANGE, boolector.BTOR_OPT_SLS_MOVE_PROP, boolector.BTOR_OPT_SLS_MOVE_PROP_N_PROP, boolector.BTOR_OPT_SLS_MOVE_PROP_N_SLS, boolector.BTOR_OPT_SLS_MOVE_PROP_FORCE_RW, boolector.BTOR_OPT_SLS_MOVE_INC_MOVE_TEST, boolector.BTOR_OPT_SLS_USE_RESTARTS, boolector.BTOR_OPT_SLS_USE_BANDIT, boolector.BTOR_OPT_PROP_USE_RESTARTS, boolector.BTOR_OPT_PROP_USE_BANDIT, boolector.BTOR_OPT_PROP_PATH_SEL, boolector.BTOR_OPT_PROP_PROB_USE_INV_VALUE, boolector.BTOR_OPT_PROP_PROB_FLIP_COND, boolector.BTOR_OPT_PROP_PROB_FLIP_COND_CONST, boolector.BTOR_OPT_PROP_FLIP_COND_CONST_DELTA, boolector.BTOR_OPT_PROP_FLIP_COND_CONST_NPATHSEL, boolector.BTOR_OPT_PROP_PROB_SLICE_KEEP_DC, boolector.BTOR_OPT_PROP_PROB_CONC_FLIP, boolector.BTOR_OPT_PROP_PROB_SLICE_FLIP, boolector.BTOR_OPT_PROP_PROB_EQ_FLIP, boolector.BTOR_OPT_PROP_PROB_AND_FLIP, boolector.BTOR_OPT_PROP_NO_MOVE_ON_CONFLICT, boolector.BTOR_OPT_AIGPROP_USE_RESTARTS, boolector.BTOR_OPT_AIGPROP_USE_BANDIT, boolector.BTOR_OPT_SORT_EXP, boolector.BTOR_OPT_SORT_AIG, boolector.BTOR_OPT_SORT_AIGVEC, boolector.BTOR_OPT_AUTO_CLEANUP_INTERNAL, boolector.BTOR_OPT_SIMPLIFY_CONSTRAINTS, boolector.BTOR_OPT_CHK_FAILED_ASSUMPTIONS]