Cvalue.V_Or_Uninitialized
Values with 'undefined' and 'escaping addresses' flags.
Semantics of the constructors:
C_init_*
: definitely initializedC_uninit_*
: possibly uninitializedC_*_noesc
: never contains escaping addressesC_*_esc
: may contain escaping addressesC_uninit_noesc V.bottom
: guaranteed to be uninitializedC_init_esc V.bottom
: guaranteed to be an escaping addressC_uninit_esc V.bottom
: either uninitialized or an escaping addressC_init_noesc V.bottom
: "real" bottom, with an empty concretization. Corresponds to an unreachable state.include Offsetmap_lattice_with_isotropy.S
with type t := t
and type size_widen_hint = Locations.Location_Bytes.size_widen_hint
and type numerical_widen_hint =
Locations.Location_Bytes.numerical_widen_hint
and type widen_hint = Locations.Location_Bytes.widen_hint
type numerical_widen_hint = Locations.Location_Bytes.numerical_widen_hint
type size_widen_hint = Locations.Location_Bytes.size_widen_hint
include Lattice_type.Bounded_Join_Semi_Lattice with type t := t
include Lattice_type.Join_Semi_Lattice with type t := t
datatype of element of the lattice
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.pack
Packed version of the descriptor.
val reprs : t list
List of representants of the descriptor.
val hash : t -> int
Hash function: same spec than Hashtbl.hash
.
val pretty : Stdlib.Format.formatter -> t -> unit
Pretty print each value in an user-friendly way.
val mem_project : ( Project_skeleton.t -> bool ) -> t -> bool
mem_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 bottom : t
smallest element
include Lattice_type.With_Widening
with type t := t
and type widen_hint = size_widen_hint * numerical_widen_hint
with type widen_hint = Locations.Location_Bytes.widen_hint
type widen_hint = Locations.Location_Bytes.widen_hint
hints for the widening
val widen : widen_hint -> t -> t -> t
widen h t1 t2
is an over-approximation of join t1 t2
. Assumes is_included t1 t2
include Lattice_type.With_Cardinal_One with type t := t
val cardinal_zero_or_one : t -> bool
val pretty_typ : Cil_types.typ option -> t Pretty_utils.formatter
val is_isotropic : t -> bool
Are the bits independent?
Force a value to be isotropic, when a loss of imprecision occurs. The resulting value must verify is_isotropic
.
val extract_bits :
topify:Origin.kind ->
start:Integer.t ->
stop:Integer.t ->
size:Integer.t ->
t ->
bool * t
Extract the bits between start
and stop
in the value of type t
, assuming this value has size
bits. Return the corresponding value, and a boolean indicating that an imprecision occurred during the operation. In the latter case, the origin of the imprecision is flagged as having kind topify
.
val shift_bits :
topify:Origin.kind ->
offset:Integer.t ->
size:Integer.t ->
t ->
t
Left-shift the given value, of size size
, by offset
bits. topify
indicates which operation caused this shift to take place, for imprecision tracking.
val merge_distinct_bits :
topify:Origin.kind ->
conflate_bottom:bool ->
t ->
t ->
t
Merge the bits of the two given values, that span disjoint bit ranges by construction. (So either an abstraction of +
or |
are correct implementations.)
The conflate_bottom
argument deals with bottom
values in either of the arguments. If conflate_bottom
holds, any pre-existing bottom
value must result in bottom
. Otherwise, the bottom
value is ignored.
topify
indicates which operation caused this merge to take place, for imprecision tracking.
val merge_neutral_element : t
Value that can be passed to merge_distinct_bits
as the starting value. This value must be neutral wrt. merging of values.
include Lattice_type.With_Top with type t := t
val top : t
largest element
include Lattice_type.With_Top_Opt with type t := t
val top_opt : t option
optional largest element
val is_bottom : t -> bool
val is_initialized : t -> bool
is_initialized v = true
implies v
is definitely initialized. is_initialized v = false
implies v
is possibly uninitialized. is_initialized v = false && is_bottom v
implies v
is definitely uninitialized.
val is_noesc : t -> bool
is_noesc v = true
implies v
has no escaping addresses. is_noesc v = false
implies v
may have escaping addresses.
val is_indeterminate : t -> bool
is_indeterminate v = false
implies v
only has definitely initialized values and non-escaping addresses. is_indeterminate v = true
implies v
may have uninitialized values and/or escaping addresses.
val uninitialized : t
Returns the canonical representant of a definitely uninitialized value.
initialized v
returns the definitely initialized, non-escaping representant of v
.
reduce_by_initializedness initialized v
reduces v
so that its result r
verifies \initialized(r)
if initialized
is true
, and !\initialized(r)
otherwise.
reduce_by_danglingness dangling v
reduces v
so that its result r
verifies \dangling(r)
if dangling
is true
, and !\dangling(r)
otherwise.
Remove 'uninitialized' and 'escaping addresses' flags from the argument
val replace_base : Base.substitution -> t -> bool * t