sig
  type treeNode = {
    number : GrbTrRemoveMuxStrictCycles.NodeNumber.num;
    allDone : bool;
    node : GrbGraphs.nodetype;
    children : GrbGraphs.NewName.idtype list;
  }
  type treeEdgeType = Normal | Cross | Forward | Backward | Unknown
  type treeEdge = {
    edge :
      GrbGraphs.connectiontype * GrbGraphs.NewName.idtype *
      GrbGraphs.portname;
    edgeway : GrbTrRemoveMuxStrictCycles.Tree.treeEdgeType;
    used : bool;
  }
  type treetype = {
    treeEdges : GrbTrRemoveMuxStrictCycles.Tree.treeEdge GrbGraphs.IdtMap.t;
    treeNodes : GrbTrRemoveMuxStrictCycles.Tree.treeNode GrbGraphs.IdtMap.t;
    starting_places : GrbGraphs.NewName.idtype list;
  }
  val emptyTree : GrbTrRemoveMuxStrictCycles.Tree.treetype
  val report2 : string -> int
  val hasnode :
    GrbGraphs.IdtMap.key -> GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val hasedge :
    GrbGraphs.IdtMap.key -> GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val findnode :
    GrbGraphs.IdtMap.key ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treeNode
  val findedge :
    GrbGraphs.IdtMap.key ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treeEdge
  val find_edge_id :
    GrbGraphs.NewName.idtype ->
    GrbGraphs.NewName.idtype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> GrbGraphs.NewName.idtype
  val has_edge_id :
    GrbGraphs.NewName.idtype ->
    GrbGraphs.NewName.idtype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val graph_from_tree :
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> GrbGraphs.DG.t
  val edgefilter :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    (GrbGraphs.IdtMap.key -> GrbTrRemoveMuxStrictCycles.Tree.treeEdge -> bool) ->
    GrbTrRemoveMuxStrictCycles.Tree.treeEdge list
  val addNewNode :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.nodetype ->
    GrbGraphs.NewName.idtype list -> GrbTrRemoveMuxStrictCycles.Tree.treetype
  val addNewEdge :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.connectiontype * GrbGraphs.NewName.idtype * GrbGraphs.portname ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype
  val nodelist : GrbGraphs.DG.t -> GrbGraphs.nodetype list
  val edgelist_sub :
    GrbGraphs.DG.t ->
    (GrbGraphs.connectiontype * GrbGraphs.nodetype * GrbGraphs.portname) list
  val edgelist :
    GrbGraphs.DG.t ->
    (GrbGraphs.connectiontype * GrbGraphs.NewName.idtype * GrbGraphs.portname)
    list
  val mapToTreeNodes :
    GrbGraphs.nodetype list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.DG.t -> GrbTrRemoveMuxStrictCycles.Tree.treetype
  val mapToTreeEdges :
    (GrbGraphs.connectiontype * GrbGraphs.NewName.idtype * GrbGraphs.portname)
    list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype
  val isInputNode : GrbGraphs.nodetype -> bool
  val findBeginnings :
    GrbGraphs.nodetype list -> GrbGraphs.NewName.idtype list
  val createTree : GrbGraphs.DG.t -> GrbTrRemoveMuxStrictCycles.Tree.treetype
  val markedNode :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treeNode ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype
  val usedNode :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treeNode ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype
  val usedEdge :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treeEdge ->
    GrbTrRemoveMuxStrictCycles.Tree.treeEdgeType ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype
  val work :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype * GrbGraphs.IdtMap.key list
  val depth :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.IdtMap.key list -> GrbTrRemoveMuxStrictCycles.Tree.treetype
  val rearrange :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.IdtMap.key ->
    GrbGraphs.IdtMap.key list -> GrbTrRemoveMuxStrictCycles.Tree.treetype
  val clean :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype
  val new_tree :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype
  val depth_tree :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype
  val is_child :
    GrbGraphs.IdtMap.key ->
    GrbGraphs.NewName.idtype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val is_MUXor :
    GrbGraphs.IdtMap.key -> GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val is_MUX :
    GrbGraphs.IdtMap.key -> GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val is_OR :
    GrbGraphs.IdtMap.key -> GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val has_MUXOr :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val has_or :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val has_MUX :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val has_many_MUXOr :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val has_one_or :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val has_one_MUX :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val has_neighbour_MUXOrs :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val find_two_mux_edge :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> GrbGraphs.NewName.idtype
  val upper_is_or :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val upper_mux_edge :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> GrbGraphs.NewName.idtype
  val upper_or_edge :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> GrbGraphs.NewName.idtype
  val backward_end_MUX :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> bool
  val backward_edges :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treeEdge list
  val normal_edges_until :
    GrbGraphs.NewName.idtype ->
    GrbGraphs.NewName.idtype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> GrbGraphs.NewName.idtype list
  val find_normal_cycles :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treeEdge list ->
    GrbGraphs.NewName.idtype list list
  val find_cycles :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.NewName.idtype list list
  val find_next_cycle :
    GrbGraphs.IdtMap.key list list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype -> GrbGraphs.IdtMap.key list
  val rearrange_treeCut :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    (GrbGraphs.DG.t, 'a) GrbCommons.either ->
    GrbGraphs.IdtMap.key ->
    '-> GrbTrRemoveMuxStrictCycles.Tree.treetype * 'c list
  val rearrange_treeFuse :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    (GrbGraphs.DG.t, 'a) GrbCommons.either ->
    GrbGraphs.IdtMap.key ->
    GrbGraphs.NewName.idtype list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype * GrbGraphs.NewName.idtype list
  val rearrange_treeMUX :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    (GrbGraphs.DG.t, 'a) GrbCommons.either ->
    GrbGraphs.IdtMap.key ->
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype * GrbGraphs.IdtMap.key list
  val rearrange_treeId :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    (GrbGraphs.DG.t, string) GrbCommons.either ->
    GrbGraphs.IdtMap.key ->
    GrbGraphs.IdtMap.key list ->
    GrbGraphs.IdtMap.key ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype * GrbGraphs.IdtMap.key list
  val rearrange_treeOr :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    (GrbGraphs.DG.t, 'a) GrbCommons.either ->
    GrbGraphs.IdtMap.key ->
    GrbGraphs.IdtMap.key list ->
    GrbGraphs.nodetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype * GrbGraphs.IdtMap.key list
  val choose_move :
    GrbGraphs.IdtMap.key list ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbTrRemoveMuxStrictCycles.Tree.treetype * GrbGraphs.IdtMap.key list
  val node_to_string : GrbTrRemoveMuxStrictCycles.Tree.treeNode -> string
  val node_to_string_id :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.IdtMap.key -> string
  val edge_to_string : GrbTrRemoveMuxStrictCycles.Tree.treeEdge -> string
  val remove_cycles2 :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    GrbGraphs.IdtMap.key list ->
    int -> (GrbGraphs.DG.t, 'a) GrbCommons.either
  val remove_cycles :
    GrbTrRemoveMuxStrictCycles.Tree.treetype ->
    (GrbGraphs.DG.t, string) GrbCommons.either
end