def propagate_literal(self, decided_literal, level, decisions):
        # we invert the decided literal here, example:
        # A was decided => (-A|B) now requires B to be true, so we look for
        # rules which are fulfilled by -A, rather than A.
        literal = -decided_literal

        chain = self.watch_chains.get(literal, [])
        for node in chain:
            other_watch = node.other_watch(literal)

            if node.rule.enabled and not decisions.satisfy(other_watch):
                rule_literals = node.rule.literals

                def _filtre(rule_literal):
                    return literal != rule_literal and other_watch != rule_literal \
                            and not decisions.conflict(rule_literal)
                alternative_literals = [rule_literal for rule_literal in rule_literals if _filtre(rule_literal)]

                if len(alternative_literals) > 0:
                    self.move_watch(literal, alternative_literals[0], node)
                    continue

                if decisions.conflict(other_watch):
                    return node.rule

                decisions.decide(other_watch, level, node.rule)

        return None
Propagates a decision on a literal to all rules watching the literal
dataset/ETHPy150Open enthought/depsolver/depsolver/solver/rules_watch_graph.py/RulesWatchGraph.propagate_literal