method register_type id tp =
    if (Hashtbl.mem tab id) then
      Hashtbl.find tab id
    else
      (Hashtbl.add tab id tp ;
       tp)