All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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


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.

4436  def __init__(self, ctx=None):
4437  self.ctx = _get_ctx(ctx)
4438  self.params = Z3_mk_params(self.ctx.ref())
4439  Z3_params_inc_ref(self.ctx.ref(), self.params)
void Z3_API Z3_params_inc_ref(__in Z3_context c, __in Z3_params p)
Increment the reference counter of the given parameter set.
Z3_params Z3_API Z3_mk_params(__in Z3_context c)
Create a Z3 (empty) parameter set. Starting at Z3 4.0, parameter sets are used to configure many comp...
def __init__
Definition: z3py.py:4435
def __del__ (   self)

Definition at line 4440 of file z3py.py.

4441  def __del__(self):
4442  Z3_params_dec_ref(self.ctx.ref(), self.params)
void Z3_API Z3_params_dec_ref(__in Z3_context c, __in Z3_params p)
Decrement the reference counter of the given parameter set.
def __del__
Definition: z3py.py:4440

Member Function Documentation

def __repr__ (   self)

Definition at line 4460 of file z3py.py.

4461  def __repr__(self):
4462  return Z3_params_to_string(self.ctx.ref(), self.params)
def __repr__
Definition: z3py.py:4460
Z3_string Z3_API Z3_params_to_string(__in Z3_context c, __in Z3_params p)
Convert a parameter set into a string. This function is mainly used for printing the contents of a pa...
def set (   self,
Set parameter name with value val.

Definition at line 4443 of file z3py.py.

4444  def set(self, name, val):
4445  """Set parameter name with value val."""
4446  if __debug__:
4447  _z3_assert(isinstance(name, str), "parameter name must be a string")
4448  name_sym = to_symbol(name, self.ctx)
4449  if isinstance(val, bool):
4450  Z3_params_set_bool(self.ctx.ref(), self.params, name_sym, val)
4451  elif isinstance(val, int):
4452  Z3_params_set_uint(self.ctx.ref(), self.params, name_sym, val)
4453  elif isinstance(val, float):
4454  Z3_params_set_double(self.ctx.ref(), self.params, name_sym, val)
4455  elif isinstance(val, str):
4456  Z3_params_set_symbol(self.ctx.ref(), self.params, name_sym, to_symbol(val, self.ctx))
4457  else:
4458  if __debug__:
4459  _z3_assert(False, "invalid parameter value")
void Z3_API Z3_params_set_symbol(__in Z3_context c, __in Z3_params p, __in Z3_symbol k, __in Z3_symbol v)
Add a symbol parameter k with value v to the parameter set p.
void Z3_API Z3_params_set_uint(__in Z3_context c, __in Z3_params p, __in Z3_symbol k, __in unsigned v)
Add a unsigned parameter k with value v to the parameter set p.
void Z3_API Z3_params_set_double(__in Z3_context c, __in Z3_params p, __in Z3_symbol k, __in double v)
Add a double parameter k with value v to the parameter set p.
void Z3_API Z3_params_set_bool(__in Z3_context c, __in Z3_params p, __in Z3_symbol k, __in Z3_bool v)
Add a Boolean parameter k with value v to the parameter set p.
def to_symbol
Definition: z3py.py:94
def validate (   self,

Definition at line 4463 of file z3py.py.

4464  def validate(self, ds):
4465  _z3_assert(isinstance(ds, ParamDescrsRef), "parameter description set expected")
4466  Z3_params_validate(self.ctx.ref(), self.params, ds.descr)
def validate
Definition: z3py.py:4463
void Z3_API Z3_params_validate(__in Z3_context c, __in Z3_params p, __in Z3_param_descrs d)
Validate the parameter set p against the parameter description set d.

Field Documentation


Definition at line 4436 of file z3py.py.

Referenced by Probe.__eq__(), Probe.__ge__(), AstVector.__getitem__(), AstMap.__getitem__(), ModelRef.__getitem__(), ApplyResult.__getitem__(), Probe.__gt__(), Probe.__le__(), Probe.__lt__(), Probe.__ne__(), Fixedpoint.add_rule(), Tactic.apply(), FuncEntry.arg_value(), Goal.as_expr(), ApplyResult.as_expr(), Goal.assert_exprs(), Fixedpoint.assert_exprs(), ApplyResult.convert_model(), ModelRef.decls(), FuncInterp.else_value(), FuncInterp.entry(), ModelRef.eval(), Goal.get(), Fixedpoint.get_answer(), Fixedpoint.get_assertions(), Fixedpoint.get_cover_delta(), ModelRef.get_interp(), ParamDescrsRef.get_kind(), ParamDescrsRef.get_name(), Fixedpoint.get_rules(), ModelRef.get_sort(), ModelRef.get_universe(), AstMap.keys(), Fixedpoint.param_descrs(), Tactic.param_descrs(), Fixedpoint.parse_file(), Fixedpoint.parse_string(), ParamsRef.set(), Fixedpoint.set(), Tactic.solver(), Fixedpoint.statistics(), Solver.to_smt2(), Fixedpoint.update_rule(), and FuncEntry.value().


Definition at line 4437 of file z3py.py.

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