idp_engine.Simplify¶
Methods to simplify a logic expression.
This module monkey-patches the Expression class and sub-classes.
-
idp_engine.Simplify.
join_set_conditions
(assignments: List[idp_engine.Assignments.Assignment]) → List[idp_engine.Assignments.Assignment][source]¶ In a list of assignments, merge assignments that are set-conditions on the same term.
An equality and a membership predicate (in operator) are both set-conditions.
- Parameters
assignments (List[Assignment]) – the list of assignments to make more compact
- Returns
the compacted list of assignments
- Return type
List[Assignment]