Classes to store assignments of values to questions
Describes how the value of a question was obtained
Assignment(sentence: idp_solver.Expression.Expression, value: Optional[idp_solver.Expression.Expression], status: Optional[idp_solver.Assignments.Status], relevant: Optional[bool] = False)¶
Represent the assignment of a value to a question. Questions can be:
- predicates and functions applied to arguments,
- outermost quantified expressions
A value is a rigid term.
An assignment also has a reference to the symbol under which it should be displayed.
states whether the sentence is relevant
Type: bool, optional
it should be displayed.
same_as(other: idp_solver.Assignments.Assignment) → bool¶
returns True if self has the same sentence and truth value as other.
Parameters: other (Assignment) – an assignment Returns: True if self has the same sentence and truth value as other. Return type: bool
returns an Assignment for the same sentence, but an opposite truth value.
AssertionError– Cannot negate a non-boolean assignment
Returns: returns an Assignment for the same sentence, but an opposite truth value. Return type: [type]