dftlib.transformer.simplifier.apply_rules

apply_rules(dft, rules)

Try to apply the given rewrite rules (of “Fault trees on a diet”). The function stops if either a rule could be applied or no change could be made. :param dft: DFT. :param rules: Rewrite rules to apply. They are specified as a list of type RewriteRules. :return: Tuple (rewrite rule, element) if the rewrite rule could be applied to element. Returns (None, None) if no rule could be applied.