Module Eval_op

module Eval_op: sig .. end

Numeric evaluation. Factored with evaluation in the logic.


val offsetmap_of_v : typ:Cil_types.typ -> Cvalue.V.t -> Cvalue.V_Offsetmap.t

Transformation a value into an offsetmap of size sizeof(typ) bytes.

val offsetmap_of_loc : Precise_locs.precise_location ->
Cvalue.Model.t -> Cvalue.V_Offsetmap.t Eval.or_bottom

Returns the offsetmap at a precise_location from a state. May raise Abstract_interp.Error_Top.

val backward_comp_left_from_type : Cil_types.logic_type ->
bool -> Abstract_interp.Comp.t -> Cvalue.V.t -> Cvalue.V.t -> Cvalue.V.t

Reduction of a Cvalue.V.t by ==, !=, >=, >, <= and <. backward_comp_left_from_type positive op l r reduces l so that the relation l op r holds. typ is the type of l.

val reduce_by_initialized_defined : (Cvalue.V_Or_Uninitialized.t -> Cvalue.V_Or_Uninitialized.t) ->
Locations.location -> Cvalue.Model.t -> Cvalue.Model.t
val apply_on_all_locs : (Locations.location -> 'a -> 'a) -> Locations.location -> 'a -> 'a

apply_all_locs f loc state folds f on all the atomic locations in loc, provided there are less than plevel. Useful mainly when loc is exact or an over-approximation.

val reduce_by_valid_loc : positive:bool ->
Locations.access ->
Locations.location -> Cil_types.typ -> Cvalue.Model.t -> Cvalue.Model.t
val make_loc_contiguous : Locations.location -> Locations.location

'Simplify' the location if it represents a contiguous zone: instead of multiple offsets with a small size, change it into a single offset with a size that covers the entire range.

val pretty_stitched_offsetmap : Stdlib.Format.formatter -> Cil_types.typ -> Cvalue.V_Offsetmap.t -> unit
val pretty_offsetmap : Cil_types.typ -> Stdlib.Format.formatter -> Cvalue.V_Offsetmap.t -> unit
val find_under_approximation : Cvalue.Model.t -> Locations.location -> Cvalue.V_Or_Uninitialized.t option