Frama-C API - Locations
Memory locations.
Locations
A Addresses.Bits.t and a size in bits.
include Datatype.S with type t := t
include Datatype.S_no_copy with type t := t
include Datatype.Ty with type t := t
val packed_descr : Structural_descr.packPacked version of the descriptor.
val reprs : t listList of representants of the descriptor.
val hash : t -> intHash function: same spec than Hashtbl.hash.
val mem_project : (Project_skeleton.t -> bool) -> t -> boolmem_project f x must return true iff there is a value p of type Project.t in x such that f p returns true.
val top : tval bottom : tval is_bottom : t -> boolval make : Addresses.Bits.t -> Z_or_top.t -> tval addr_bytes : t -> Addresses.Bytes.taddr_bytes l returns the address set corresponding to the given location, i.e. the location without the size information.
val size : t -> Z_or_top.tval is_volatile : t -> boolis_volatile loc returns false if none of the concrete locations represented by loc are volatile. It returns true if at least one of the represented locations may be volatile.
val base_access : size:Z_or_top.t -> access -> Base.accessConversion into a base access, with the size information. Accesses of unknown sizes are converted into empty accesses.
Is the given location entirely valid, without any access or as a destination for a read or write access.
Overapproximation of the valid part of the given location. Beware that is_valid (valid_part loc) does not necessarily hold, as garbled mix may not be reduced by valid_part. bitfield indicates whether the location may be the one of a bitfield, and is true by default. If it is set to false, the location is assumed to be byte aligned, and its offset (expressed in bits) is reduced to be congruent to 0 modulo 8.
val cardinal_zero_or_one : t -> boolIs the location bottom or a singleton?
val valid_cardinal_zero_or_one : for_writing:bool -> t -> boolIs the valid part of the location bottom or a singleton?
Is there a possibly non-empty intersection between two given locations? If partial is true, returns true if the two locations may be overlapping without being equal. If partial is false, also returns true if the two locations may be equal. Returns false when the two locations cannot be overlapping.
val pretty : Stdlib.Format.formatter -> t -> unitval pretty_english : prefix:bool -> Stdlib.Format.formatter -> t -> unitConversion functions
val enumerate_bits : t -> Memory_zone.tval enumerate_bits_under : t -> Memory_zone.tval enumerate_valid_bits : access -> t -> Memory_zone.tval enumerate_valid_bits_under : access -> t -> Memory_zone.tval zone_of_varinfo : Cil_types.varinfo -> Memory_zone.tval of_varinfo : Cil_types.varinfo -> tval of_type_offset : Base.t -> Cil_types.typ -> Cil_types.offset -> tDeprecated
type location = tmodule Location_Bytes = Addresses.Bytesmodule Location_Bits = Addresses.Bitsmodule Zone = Memory_zoneval loc_to_loc_without_size : t -> Addresses.Bytes.tval loc_bytes_to_loc_bits : Addresses.Bytes.t -> Addresses.Bits.tval loc_bits_to_loc_bytes : Addresses.Bits.t -> Addresses.Bytes.tval loc_bits_to_loc_bytes_under : Addresses.Bits.t -> Addresses.Bytes.tval loc_top : tval loc_bottom : tval is_bottom_loc : t -> boolval make_loc : Addresses.Bits.t -> Z_or_top.t -> tval loc_size : t -> Z_or_top.tval loc_of_varinfo : Cil_types.varinfo -> tval loc_of_typoffset : Base.t -> Cil_types.typ -> Cil_types.offset -> t