let identifier_of_lc hash_table id_generator lc_state =
try Hashtbl.find hash_table lc_state
with Not_found -> (
let (id:int) = id_generator () in
let lc_state = Array.map Array.copy lc_state in
Hashtbl.add hash_table lc_state id;
id)