beanmachine.ppl.compiler.fix_bool_comparisons module
- class beanmachine.ppl.compiler.fix_bool_comparisons.BoolComparisonFixer(bmg: beanmachine.ppl.compiler.bm_graph_builder.BMGraphBuilder, typer: beanmachine.ppl.compiler.lattice_typer.LatticeTyper)
Bases:
object
This class takes a Bean Machine Graph builder and replaces all comparison operators whose operands are bool with semantically equivalent IF nodes.
- beanmachine.ppl.compiler.fix_bool_comparisons.bool_comparison_fixer(bmg: beanmachine.ppl.compiler.bm_graph_builder.BMGraphBuilder, typer: beanmachine.ppl.compiler.lattice_typer.LatticeTyper) Callable[[beanmachine.ppl.compiler.bmg_nodes.BMGNode], Union[beanmachine.ppl.compiler.bmg_nodes.BMGNode, None, beanmachine.ppl.compiler.fix_problem.NodeFixerError]]