1 (***********************************************************************)
6 (* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
7 (* Recherche Scientifique. All rights reserved. This file is *)
8 (* distributed under the terms of the GNU Lesser General Public *)
9 (* License, with the special exception on linking described in file *)
12 (***********************************************************************)
20 let compare n1 n2 = n1 - n2
21 let equal n1 n2 = n1 = n2
24 module NodeHash = Hashtbl.Make (Node)
26 type t = (StateSet.t*StateSet.t) NodeHash.t
27 (** Map from node to query and recognizing states *)
29 let compute tree asta =
30 let size_tree = 10000 in (* todo *)
31 let map = NodeHash.create size_tree in
37 let print_d_set fmt (s_1,s_2) =
38 Format.fprintf fmt "@[<hov 0>(%a,@ %a)@]"
39 StateSet.print s_1 StateSet.print s_2 in
40 let print_map fmt run =
41 let pp = Format.fprintf fmt in
42 if NodeHash.length run = 0
43 then Format.fprintf fmt "ø"
45 NodeHash.iter (fun cle set -> pp "| %i-->%a@ " cle print_d_set set)
47 let print_box fmt run =
48 let pp = Format.fprintf fmt in
49 pp "@[<v 0># Mapping: %a@ @]"
52 Format.fprintf fmt "@[<v 1>##### RUN #####@, %a@ @]@." print_box run