package frama-c

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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 =
  1. | Misalign_read of LocationLattice.t
    (*

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

    *)
  2. | Leaf of LocationLattice.t
    (*

    Result of a function without a body

    *)
  3. | Merge of LocationLattice.t
    (*

    Join between two control-flows

    *)
  4. | Arith of LocationLattice.t
    (*

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

    *)
  5. | Well
    (*

    Imprecise variables of the initial state

    *)
  6. | Unknown

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

include Datatype.S with type t = origin
include Datatype.S_no_copy with type t = origin
val name : string

Unique name of the datatype.

val descr : t Descr.t

Datatype descriptor.

val packed_descr : Structural_descr.pack

Packed version of the descriptor.

val reprs : t list

List of representants of the descriptor.

val equal : t -> t -> bool

Equality: same spec than Stdlib.(=).

val compare : t -> t -> int

Comparison: same spec than Stdlib.compare.

val hash : t -> int

Hash function: same spec than Hashtbl.hash.

val pretty : 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 copy : t -> t

Deep copy: no possible sharing between x and copy x.

type kind =
  1. | K_Misalign_read
  2. | K_Leaf
  3. | K_Merge
  4. | K_Arith
val current : kind -> origin

This is automatically extracted from Cil.CurrentLoc

val pretty_as_reason : 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 meet : t -> t -> t
val narrow : t -> t -> t
val is_included : t -> t -> bool