let basename ty =
let rec typ_basename ty =
match object_of ty with
| C_int i -> Pretty_utils.sfprintf "%a" Ctypes.pp_int i
| C_float f -> Pretty_utils.sfprintf "%a" Ctypes.pp_float f
| C_pointer _ -> "pointer"
| C_comp c -> (if c.cstruct then "struct_" else "union_")^
c.cname
| C_array arr -> typ_basename arr.Ctypes.arr_element^"_array"
in
match ty with
| Ctype c -> "is_"^typ_basename c
| Linteger | Lreal -> ""
| Lvar x -> x
| Ltype (lt,_) -> lt.lt_name
| Larrow _ ->""