cana.io.bnet module
BoolNet / PyBoolNet *.bnet (targets,factors) import and export.
- cana.io.bnet.parse_bnet_update_rule(line)[source]
Parse one
target, named_expressionline, orNoneif not a rule.Skips blanks, comments, and the
targets,factorsheader.- Parameters:
line (str)
- Return type:
Tuple[str, str] | None
- cana.io.bnet.parse_bnet(text)[source]
Parse BoolNet / PyBoolNet
*.bnetinto a node list.- Parameters:
text (str)
- Return type:
List[BooleanNode]
- cana.io.bnet.nodes_to_bnet(nodes, *, warn=True)[source]
Export a node list to BoolNet
targets,factorstext.Prefers stored expression, then one-symbol schemata, then LUT DNF. Soft-warns when verification flags are not
True(never blocks).- Parameters:
nodes (Sequence[BooleanNode])
warn (bool)
- Return type:
str