-module NodeMap = Map.Make (Node)
-
-type t = StateSet.t NodeMap.t
-
-let compute tree asta = NodeMap.empty
-
-let print fmt run = ()
+module NodeHash = Hashtbl.Make (Node)
+
+type t = (StateSet.t*StateSet.t) NodeHash.t
+(** Map from node to query and recognizing states *)
+
+let compute tree asta =
+ let size_tree = 10000 in (* todo *)
+ let map = NodeHash.create size_tree in
+
+
+ map
+
+let print fmt run =
+ let print_d_set fmt (s_1,s_2) =
+ Format.fprintf fmt "@[<hov 0>(%a,@ %a)@]"
+ StateSet.print s_1 StateSet.print s_2 in
+ let print_map fmt run =
+ let pp = Format.fprintf fmt in
+ if NodeHash.length run = 0
+ then Format.fprintf fmt "ø"
+ else
+ NodeHash.iter (fun cle set -> pp "| %i-->%a@ " cle print_d_set set)
+ run in
+ let print_box fmt run =
+ let pp = Format.fprintf fmt in
+ pp "@[<v 0># Mapping: %a@ @]"
+ print_map run
+ in
+ Format.fprintf fmt "@[<v 1>##### RUN #####@, %a@ @]@." print_box run
+