Module Origin

module Origin: sig .. end

The datastructures of this module can be used to track the origin of a major imprecision in the values of an abstract domain.


This module is generic, although currently used only by the plugin Value. Within Value, values that have an imprecision origin are "garbled mix", ie. a numeric value that contains bits extracted from at least one pointer, and that are not the result of a translation

module LocationLattice: sig .. end

Lattice of source locations.

type origin = 
| Misalign_read of LocationLattice.t (*

Read of not all the bits of a pointer, typically through a pointer cast

*)
| Leaf of LocationLattice.t (*

Result of a function without a body

*)
| Merge of LocationLattice.t (*

Join between two control-flows

*)
| Arith of LocationLattice.t (*

Arithmetic operation that cannot be represented, eg. '&x * 2'

*)
| Well (*

Imprecise variables of the initial state

*)
| Unknown

List of possible origins. Most of them also include the set of source locations where the operation took place.

include Datatype.S
type kind = 
| K_Misalign_read
| K_Leaf
| K_Merge
| K_Arith
val current : kind -> origin

This is automatically extracted from Cil.CurrentLoc

val pretty_as_reason : Stdlib.Format.formatter -> t -> unit

Pretty-print because of <origin> if the origin is not Unknown, or nothing otherwise

val top : t
val is_top : t -> bool
val bottom : t
val join : t -> t -> t
val link : t -> t -> t
val meet : t -> t -> t
val narrow : t -> t -> t
val is_included : t -> t -> bool