Types.Ctypes
val pp_value : Stdlib.Format.formatter -> value -> unit
module Pred : sig ... end
val pp_index : Stdlib.Format.formatter -> index -> unit
and descr =
| Void
| Base of basic
| Structure of structure
| Ptr of pointer
| Enum of enum
| Array of typ * value option
Arguments: element type, and the number of elements, if statically known.
*)| Function of typ * typ list
| Name of string
| Application of constr * Pred.expr list
| Existential of typ * string * typ
| Union of union
| Weak of typ
val pp_descr : Stdlib.Format.formatter -> descr -> unit
val pp : Stdlib.Format.formatter -> typ -> unit
val pp_constr : Stdlib.Format.formatter -> constr -> unit
equiv a b returns true if it can show that a is a subtype of b and b is a subtype a.
val is_pointer_type : typ -> bool
contains t u
determines whether t contains u. (Definition: t contains u iff t = u or a component of t (e.g. a structure member) contains u.
val sizeof : typ -> int
Returns the size of the type (in bytes), if possible
These functions allow to update or query the binding from type names to types.
val add_type_name_definition : string -> typ -> unit
Maps a name to a type.
val type_of_name : string -> typ
Retrieve the type associated to a name. raise Undefined_type
if not found.
val pp_ctype : Stdlib.out_channel -> typ -> unit
val pp_ctype_list : Stdlib.out_channel -> typ list -> unit
Unroll the definitions of a type (i.e. replace a name with the corresponding type)
val add_constr_name_definition : string -> constr -> unit
Maps a name to a type constructor.
val constr_of_name : string -> constr
Retrieve the type constructor associated to a name. raise Undefined_type
if not found.
Unroll the definitions of a constructor (i.e. replace a name with the corresponding constructor)
Applies a constructor by substituting parameters in a constructor by some arguments. raise Application_error
if too many or not enough arguments
val add_function_name_definition : string -> typ -> unit
val function_of_name : string -> typ
Retrieve the type associated to a function name. raise Undefined_type
if not found.
val char : typ
Common base types.
val short : typ
val int : typ
val long : typ
val long_long : typ
val word : byte_size:int -> typ
module type Type_settings = sig ... end