Skip to content
Snippets Groups Projects
Commit 6452451c authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Allow negation of predicates

parent 1fcde03a
No related branches found
No related tags found
No related merge requests found
......@@ -431,8 +431,10 @@ class InstructionBase(Record):
.. attribute:: predicates
a :class:`frozenset` of variable names whose truth values (as defined
by C) determine whether this instruction should be run
a :class:`frozenset` of variable names the conjunction (logical and) of
whose truth values (as defined by C) determine whether this instruction
should be run. Each variable name may, optionally, be preceded by
an exclamation point, indicating negation.
.. attribute:: forced_iname_deps_is_final
......@@ -678,7 +680,10 @@ class ExpressionInstruction(InstructionBase):
for _, subscript in self.assignees_and_indices():
result = result | get_dependencies(subscript)
result = result | self.predicates
processed_predicates = frozenset(
pred.lstrip("!") for pred in self.predicates)
result = result | processed_predicates
return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment