Z3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions | Data Fields
ParamsRef Class Reference

Parameter Sets. More...

Public Member Functions

def __init__
def __del__
def set
def __repr__
def validate

Data Fields

 ctx
 params

Detailed Description

Parameter Sets.

Set of parameters used to configure Solvers, Tactics and Simplifiers in Z3.

Consider using the function `args2params` to create instances of this object.

Definition at line 4430 of file z3py.py.


Constructor & Destructor Documentation

def __init__ (   self,
  ctx = None 
)

Definition at line 4435 of file z3py.py.

04435 
04436     def __init__(self, ctx=None):
04437         self.ctx    = _get_ctx(ctx)
04438         self.params = Z3_mk_params(self.ctx.ref())
04439         Z3_params_inc_ref(self.ctx.ref(), self.params)

def __del__ (   self)

Definition at line 4440 of file z3py.py.

04440 
04441     def __del__(self):
04442         Z3_params_dec_ref(self.ctx.ref(), self.params)


Member Function Documentation

def __repr__ (   self)

Definition at line 4460 of file z3py.py.

04460 
04461     def __repr__(self):
04462         return Z3_params_to_string(self.ctx.ref(), self.params)

def set (   self,
  name,
  val 
)
Set parameter name with value val.

Definition at line 4443 of file z3py.py.

04443 
04444     def set(self, name, val):
04445         """Set parameter name with value val."""
04446         if __debug__:
04447             _z3_assert(isinstance(name, str), "parameter name must be a string")
04448         name_sym = to_symbol(name, self.ctx)
04449         if isinstance(val, bool):
04450             Z3_params_set_bool(self.ctx.ref(), self.params, name_sym, val)
04451         elif isinstance(val, int):
04452             Z3_params_set_uint(self.ctx.ref(), self.params, name_sym, val)
04453         elif isinstance(val, float):
04454             Z3_params_set_double(self.ctx.ref(), self.params, name_sym, val)
04455         elif isinstance(val, str):
04456             Z3_params_set_symbol(self.ctx.ref(), self.params, name_sym, to_symbol(val, self.ctx))
04457         else:
04458             if __debug__:
04459                 _z3_assert(False, "invalid parameter value")

def validate (   self,
  ds 
)

Definition at line 4463 of file z3py.py.

04463 
04464     def validate(self, ds):
04465         _z3_assert(isinstance(ds, ParamDescrsRef), "parameter description set expected")
04466         Z3_params_validate(self.ctx.ref(), self.params, ds.descr)


Field Documentation

ctx

Definition at line 4435 of file z3py.py.

Referenced by ArithRef::__add__(), BitVecRef::__add__(), BitVecRef::__and__(), FuncDeclRef::__call__(), ArithRef::__div__(), BitVecRef::__div__(), ExprRef::__eq__(), Probe::__eq__(), ArithRef::__ge__(), BitVecRef::__ge__(), Probe::__ge__(), ArrayRef::__getitem__(), ApplyResult::__getitem__(), ArithRef::__gt__(), BitVecRef::__gt__(), Probe::__gt__(), BitVecRef::__invert__(), ArithRef::__le__(), BitVecRef::__le__(), Probe::__le__(), BitVecRef::__lshift__(), ArithRef::__lt__(), BitVecRef::__lt__(), Probe::__lt__(), ArithRef::__mod__(), BitVecRef::__mod__(), ArithRef::__mul__(), BitVecRef::__mul__(), ExprRef::__ne__(), Probe::__ne__(), ArithRef::__neg__(), BitVecRef::__neg__(), BitVecRef::__or__(), ArithRef::__pow__(), ArithRef::__radd__(), BitVecRef::__radd__(), BitVecRef::__rand__(), ArithRef::__rdiv__(), BitVecRef::__rdiv__(), BitVecRef::__rlshift__(), ArithRef::__rmod__(), BitVecRef::__rmod__(), ArithRef::__rmul__(), BitVecRef::__rmul__(), BitVecRef::__ror__(), ArithRef::__rpow__(), BitVecRef::__rrshift__(), BitVecRef::__rshift__(), ArithRef::__rsub__(), BitVecRef::__rsub__(), BitVecRef::__rxor__(), ArithRef::__sub__(), BitVecRef::__sub__(), BitVecRef::__xor__(), DatatypeSortRef::accessor(), Fixedpoint::add_rule(), Tactic::apply(), AlgebraicNumRef::approx(), ExprRef::arg(), ApplyResult::as_expr(), Fixedpoint::assert_exprs(), QuantifierRef::body(), BoolSortRef::cast(), DatatypeSortRef::constructor(), ApplyResult::convert_model(), ExprRef::decl(), RatNumRef::denominator(), FuncDeclRef::domain(), ArraySortRef::domain(), Fixedpoint::get_answer(), Fixedpoint::get_assertions(), Fixedpoint::get_cover_delta(), Fixedpoint::get_rules(), SortRef::kind(), SortRef::name(), FuncDeclRef::name(), QuantifierRef::no_pattern(), RatNumRef::numerator(), Fixedpoint::param_descrs(), Tactic::param_descrs(), Fixedpoint::parse_file(), Fixedpoint::parse_string(), QuantifierRef::pattern(), FuncDeclRef::range(), ArraySortRef::range(), DatatypeSortRef::recognizer(), ParamsRef::set(), Fixedpoint::set(), Tactic::solver(), ExprRef::sort(), BoolRef::sort(), QuantifierRef::sort(), ArithRef::sort(), BitVecRef::sort(), ArrayRef::sort(), DatatypeRef::sort(), Fixedpoint::statistics(), Solver::to_smt2(), Fixedpoint::update_rule(), QuantifierRef::var_name(), and QuantifierRef::var_sort().

Definition at line 4435 of file z3py.py.

Referenced by ParamsRef.__del__(), ParamsRef.__repr__(), ParamsRef.set(), and ParamsRef.validate().

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines