let enumerate (set : trans_list hashset) : ((int, transition) Hashtbl.t) list =
let rec listprod lhs (id, rhs) = match lhs with
| x::xs ->
(List.map (fun y ->
let cur = Hashtbl.copy x in
Hashtbl.replace cur id y;
cur
) rhs)
@ (listprod xs (id, rhs))
| _ -> []
in
let prod lhs (id, rhs) = match lhs with
| x::xs -> listprod lhs (id, rhs)
| [] -> List.map (fun y ->
let cur = Hashtbl.create (List.length rhs) in
Hashtbl.replace cur id y; cur
) rhs
in
fold (fun (id, curlist) acc -> prod acc (id, curlist)) set []