let atom_to_id a = try Atomtbl.find atomtbl a with Not_found -> let i = !id in id := !id + 1; Atomtbl.add atomtbl a i; Inttbl.add inttbl i a; i