Frama-C API - Eval_typ
Functions related to type conversions
val sizeof_lval_typ : Frama_c_kernel.Cil_types.typ -> Frama_c_kernel.Int_Base.tSize of the type of a lval, taking into account that the lval might have been a bitfield.
val offsetmap_matches_type : Frama_c_kernel.Cil_types.typ -> Frama_c_kernel.Cvalue.V_Offsetmap.t -> booloffsetmap_matches_type t o returns true if either:
ocontains a single scalar binding, of the expected scalar typet(float or integer)ocontains multiple bindings, pointers, etc.tis not a scalar type.
val need_cast : Frama_c_kernel.Cil_types.typ -> Frama_c_kernel.Cil_types.typ -> boolreturn true if the two types are statically distinct, and a cast from one to the other may have an effect on an abstract value.
val compatible_functions : Frama_c_kernel.Cil_types.typ -> ?args:Frama_c_kernel.Cil_types.typ list -> Frama_c_kernel.Kernel_function.t list -> Frama_c_kernel.Kernel_function.t list * boolAbstraction of an integer type, more convenient than an ikind because it can also be used for bitfields.
module DatatypeIntegerRange : Frama_c_kernel.Datatype.S with type t = integer_rangeval ik_range : Frama_c_kernel.Cil_types.ikind -> integer_rangeval ik_attrs_range : Frama_c_kernel.Cil_types.ikind -> Frama_c_kernel.Cil_types.attributes -> integer_rangeRange for an integer type with some attributes. The attribute Ast_attributes.bitfield_attribute_name influences the width of the type.
val pointer_range : unit -> integer_rangeRange for a pointer type.
val range_inclusion : integer_range -> integer_range -> boolChecks inclusion of two integer ranges.
val range_lower_bound : integer_range -> Frama_c_kernel.Z.tval range_upper_bound : integer_range -> Frama_c_kernel.Z.ttype scalar_typ = | TSInt of integer_range| TSPtr of integer_range| TSFloat of Frama_c_kernel.Cil_types.fkind
Abstraction of scalar types -- in particular, all those that can be involved in a cast. Enum and integers are coalesced.
val classify_as_scalar : Frama_c_kernel.Cil_types.typ -> scalar_typ optionval integer_range : ptr:bool -> Frama_c_kernel.Cil_types.typ -> integer_range option