let rec tau_of_ctype t = 
  tau_of_object (Ctypes.object_of t)

and tau_of_object = function
  | C_int _ -> Integer
  | C_float _ -> Real
  | C_pointer _ -> Pointer
  | C_comp c -> Record (record_of c)
  | C_array a -> Array(Integer,tau_of_ctype a.arr_element)
  
and tau_of_logic_type = function
  | Ctype c -> tau_of_ctype c
  | Linteger ->  Integer
  | Lreal ->  Real
  | Ltype( d , [] ) when d.lt_name = Utf8_logic.boolean -> Boolean
  | Ltype( {lt_name="set"} , [t] ) -> Set (tau_of_logic_type t)
  | Ltype( lt , ts) -> ADTADT.obtain lt , List.map tau_of_logic_type ts )
  | Lvar _ -> Wp_parameters.not_yet_implemented "logic type variables"
  | Larrow _ -> Wp_parameters.not_yet_implemented "type of logic function"