class documentation

Undocumented

Method __getstate__ Undocumented
Method __init__ Undocumented
Method __setstate__ Undocumented
Method add Adds constraint(s) to constraints list.
Method batch_eval Evaluates `exprs`, returning a list of tuples (one tuple of `n` solutions for expression).
Method check_satisfiability Checks the satisfiability of stored constraints conjunction.
Method combine Undocumented
Method downsize Undocumented
Method eval Evaluates expression `e`, returning a tuple of `n` solutions.
Method finalize Undocumented
Method is_false Checks if `e` can only (and TRIVIALLY) evaluate to False. If this function returns True, then the expression cannot ever be True, regardless of constraints or anything else. If the expression returns False, then the expression might STILL not ever be True; it's just that we can't trivially prove it...
Method is_true Checks if `e` can only (and TRIVIALLY) evaluate to True. If this function returns True, then the expression cannot ever be False, regardless of constraints or anything else. If the expression returns False, then the expression might STILL not ever be False; it's just that we can't trivially prove it...
Method max Evaluates `e`, returning its max possible value.
Method max_memory.setter Undocumented
Method merge Undocumented
Method min Evaluates `e`, returning its min possible value.
Method satisfiable Checks if stored constraints conjunction is satisfiable.
Method simplify Simplifies the stored constraints conjunction.
Method solution Checks if `v` is a possible solution to `e`.
Method split Undocumented
Method timeout.setter Undocumented
Method unsat_core Undocumented
Method variables.setter Undocumented
Instance Variable constraints Undocumented
Property max_memory Undocumented
Property timeout Undocumented
Property variables Undocumented
Static Method _merge_with_ancestor Undocumented
Static Method _names_for Undocumented
Method _add_dependent_constraints Undocumented
Method _blank_copy Undocumented
Method _claim Undocumented
Method _copy Undocumented
Method _ensure_sat Undocumented
Method _merged_solver_for Undocumented
Method _reabsorb_solver Undocumented
Method _shared_solvers Returns a sequence of the solvers that self and others share.
Method _shared_varsets Undocumented
Method _solver_for_names Get a merged child solver for variables specified in `names`.
Method _solvers_for_variables Undocumented
Method _split_child Undocumented
Method _store_child Undocumented
Method _variable_sets Undocumented
Instance Variable _owned_solvers Undocumented
Instance Variable _solvers Undocumented
Instance Variable _template_frontend Undocumented
Instance Variable _template_frontend_string Undocumented
Instance Variable _track Undocumented
Instance Variable _unchecked_solvers Undocumented
Instance Variable _unsat Undocumented
Property _solver_list Undocumented

Inherited from ConstrainedFrontend:

Method independent_constraints Undocumented
Instance Variable _finalized Undocumented

Inherited from Frontend (via ConstrainedFrontend):

Method blank_copy Undocumented
Method branch Undocumented
Method eval_to_ast Evaluates expression `e`, returning a list of `n` concrete ASTs.
Static Method _split_constraints Returns independent constraints, split from this Frontend's `constraints`.
Method _concrete_value Undocumented
Method _constraint_filter Undocumented
def __init__(self, template_frontend, template_frontend_string, track=False, **kwargs): (source)
def add(self, constraints, **kwargs): (source)

Adds constraint(s) to constraints list. :param constraints: constraint(s) to add :return:

def batch_eval(self, exprs, n, extra_constraints=(), exact=None): (source)

Evaluates `exprs`, returning a list of tuples (one tuple of `n` solutions for expression). :param exprs: expressions :param n: the number of solutions to return :param extra_constraints: extra constraints to consider when performing the evaluation :param exact: whether or not to perform an exact evaluation. Ignored by non-approximating backends. :return: list of tuples of python primitives representing results

def check_satisfiability(self, extra_constraints=(), exact=None): (source)

Checks the satisfiability of stored constraints conjunction. :param extra_constraints: extra constraints to consider when checking satisfiability :param exact: whether or not to perform exact checking. Ignored by non-approximating backends. :return: 'SAT' if the conjunction is satisfiable otherwise 'UNSAT'

def eval(self, e, n, extra_constraints=(), exact=None): (source)

Evaluates expression `e`, returning a tuple of `n` solutions. :param e: the expression :param n: the number of solutions to return :param extra_constraints: extra constraints to consider when performing the evaluation :param exact: whether or not to perform an exact evaluation. Ignored by non-approximating backends. :return: tuple of python primitives representing results

def is_false(self, e, extra_constraints=(), exact=None): (source)

Checks if `e` can only (and TRIVIALLY) evaluate to False. If this function returns True, then the expression cannot ever be True, regardless of constraints or anything else. If the expression returns False, then the expression might STILL not ever be True; it's just that we can't trivially prove it. In other words, a return value of False gives you no information whatsoever. :param e: the expression :param extra_constraints: extra constraints to consider when performing the evaluation :param exact: whether or not to perform an exact evaluation. Ignored by non-approximating backends. :return: True if it can only evaluate to False otherwise False

def is_true(self, e, extra_constraints=(), exact=None): (source)

Checks if `e` can only (and TRIVIALLY) evaluate to True. If this function returns True, then the expression cannot ever be False, regardless of constraints or anything else. If the expression returns False, then the expression might STILL not ever be False; it's just that we can't trivially prove it. In other words, a return value of False gives you no information whatsoever. :param e: the expression :param extra_constraints: extra constraints to consider when performing the evaluation :param exact: whether or not to perform an exact evaluation. Ignored by non-approximating backends. :return: True if it can only evaluate to True otherwise False

def max(self, e, extra_constraints=(), signed=False, exact=None): (source)

Evaluates `e`, returning its max possible value. :param e: the expression :param extra_constraints: extra constraints to consider when performing the evaluation :param signed: whether the value should be treated as a signed integer :param exact: whether or not to perform an exact evaluation. Ignored by non-approximating backends. :return: max possible value

@max_memory.setter
def max_memory(self, val): (source)

Undocumented

def merge(self, others, merge_conditions, common_ancestor=None): (source)
def min(self, e, extra_constraints=(), signed=False, exact=None): (source)

Evaluates `e`, returning its min possible value. :param e: the expression :param extra_constraints: extra constraints to consider when performing the evaluation :param signed: whether the value should be treated as a signed integer :param exact: whether or not to perform an exact evaluation. Ignored by non-approximating backends. :return: min possible value

def satisfiable(self, extra_constraints=(), exact=None): (source)

Checks if stored constraints conjunction is satisfiable. :param extra_constraints: extra constraints to consider when checking satisfiability :param exact: whether or not to perform exact checking. Ignored by non-approximating backends. :return: True if the conjunction is satisfiable otherwise False

def simplify(self): (source)

Simplifies the stored constraints conjunction.

def solution(self, e, v, extra_constraints=(), exact=None): (source)

Checks if `v` is a possible solution to `e`. :param e: the expression :param v: the value :param extra_constraints: extra constraints to consider when performing the evaluation :param exact: whether or not to perform an exact evaluation. Ignored by non-approximating backends. :return: True if it is a possible solution otherwise False

@timeout.setter
def timeout(self, t): (source)

Undocumented

def unsat_core(self, extra_constraints=()): (source)

Undocumented

@variables.setter
def variables(self, v): (source)

Undocumented

Undocumented

Undocumented

@staticmethod
def _merge_with_ancestor(common_ancestor, merge_conditions): (source)

Undocumented

@staticmethod
def _names_for(names=None, lst=None, lst2=None, e=None, v=None) -> Set[str]: (source)

Undocumented

def _add_dependent_constraints(self, names, constraints, invalidate_cache=True, **kwargs): (source)

Undocumented

def _claim(self, s): (source)

Undocumented

def _ensure_sat(self, extra_constraints): (source)

Undocumented

def _merged_solver_for(self, *args, **kwargs): (source)

Undocumented

def _reabsorb_solver(self, s): (source)

Undocumented

def _shared_solvers(self, others): (source)

Returns a sequence of the solvers that self and others share.

def _shared_varsets(self, others): (source)

Undocumented

def _solver_for_names(self, names: Set[str]) -> SolverCompositeChild: (source)

Get a merged child solver for variables specified in `names`. :param names: A set of variable names. :return: A composite child solver.

def _solvers_for_variables(self, names): (source)

Undocumented

def _split_child(self, s): (source)

Undocumented

def _store_child(self, ns, extra_names=frozenset(), invalidate_cache=True): (source)

Undocumented

def _variable_sets(self): (source)

Undocumented

_owned_solvers = (source)

Undocumented

_solvers = (source)

Undocumented

_template_frontend = (source)

Undocumented

_template_frontend_string = (source)

Undocumented

Undocumented

_unchecked_solvers = (source)

Undocumented

Undocumented

@property
_solver_list = (source)

Undocumented