Class to represent a collection of theory and structure blocks.
A collection of theory and structure blocks.
True when the truth value of inequalities and quantified formula is of interest (e.g. in the Interactive Consultant)
the list of type and symbol declarations
the set of assignments. The assignments are updated by the different steps of the problem resolution. Assignments include inequalities and quantified formula when the problem is extended
A mapping of defined symbol to the rule that defines it.
A mapping of defined symbol to the whole-domain constraint equivalent to its definition.
A mapping of enumerated symbols to their interpretation.
make(theories, structures, extended=False)¶
assert_(code: str, value: Any, status: idp_engine.Assignments.Status = <Status.GIVEN: 2>)¶
asserts that an expression has a value
code (str) – the code of the expression, e.g., “p()”
value (Any) – a Python value, e.g., “True”
status (Status, Optional) – how the value was obtained. Default: Status.GIVEN
the formula encoding the knowledge base
output: a list of Assignments, ending with a string
determine the immediate consequences of the constraints
determine all the consequences of the constraints
Returns a copy of the problem, with its
assignmentsproperty containing a description of the possible values of the term.
returns the facts and laws that justify ‘consequence in the ‘self Problem
returns a simpler copy of the Problem, using known assignments
Assignments obtained by propagation become fixed constraints.
decision_table(goal_string='', timeout=20, max_rows=50, first_hit=True, verify=False)¶
returns a decision table for goal_string, given self.
goal_string (str, optional) – the last column of the table.
timeout (int, optional) – maximum duration in seconds. Defaults to 20.
max_rows (int, optional) – maximum number of rows. Defaults to 50.
first_hit (bool, optional) – requested hit-policy. Defaults to True.
verify (bool, optional) – request verification of table completeness. Defaults to False
the non-empty cells of the decision table
- Return type