+let rgb x =
+ let h = K.hash x in
+ let r = h land 0xff
+ and g = (h lsr 8) land 0xff
+ and b = (h lsr 16) land 0xff
+ in
+ r, g, b
+
+let color x =
+ try
+ CTable.find ctable x
+ with
+ Not_found ->
+ let r,g,b = rgb x in
+ let s = "rgb(" ^ (string_of_int r) ^ ","
+ ^ (string_of_int g) ^ ","
+ ^ (string_of_int b) ^ ")"
+ in
+ CTable.add ctable x s;
+ s
+
+let text_color x =
+ let r,g,b = rgb x in
+ let av = (r + g + b) / 3 in
+ if av > 128 then "rgb(0,0,0)"
+ else "rgb(255,255,255)"
+
+let get_conf sel l i =
+ List.fold_left (fun (accb,accl) a ->
+ accb || StateSet.intersect a.(i) sel,
+ a.(i) :: accl) (false,[]) l
+
+let gen_trace (type s) = fun auto sat_arrays t tree ->