loop_detection#

loop_detection.loop_detection(fw_tables: Dict[int | str, List[Tuple[Range | WildcardExpr | MultiField, int | str | None]]], merge: bool = False) List[Tuple[Combination, List[str | int]]][source]#

Returns a list with tuples (atom, cycles) with the cycles induced by each atom

Parameters:
  • fw_tables (Dict[NodeName, List[Tuple[Rule, Action]]]) – dictionary that associates each node with its set of (rule, action) tuples

  • merge (Bool, default = False) – whether to merge the rules of the whole network or to only merge within strongly connected nodes

Returns:

cycles in the network, with the atom that induced them

Return type:

List[Tuple[Combination, List[NodeName]]]