Frama-C API - Additive
include Frama_c_kernel.Datatype.S
include Frama_c_kernel.Datatype.S_no_copy
val descr : t Frama_c_kernel.Descr.t
Datatype descriptor.
val packed_descr : Frama_c_kernel.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 : (Frama_c_kernel.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
.
The field over which the abstraction is defined.
module Scalar = Scalar
type scalar = Scalar.t
The monad used to encode context dependent computations.
module Computation = Computation
type 'a computation = 'a Computation.t
Constants and constructors.
val zero : t
val one : t
The call singleton r
returns the abstract representation of the singleton subset containing r
.
The call between l r
returns the abstract representation of the subset containing all scalars between l
and u
included.
Lattice structure.
val top : t
val narrow : t -> t -> t Frama_c_kernel.Lattice_bounds.or_bottom
Projection into an interval.
The lower
and upper
functions are provided as convenience.
val bounds : t -> scalar Frama_c_kernel.Field.bounds
Arithmetic operations.
val neg : t computation -> t computation
val sqrt : t computation -> t computation
val (+) : t computation -> t computation -> t computation
val (-) : t computation -> t computation -> t computation
val (*) : t computation -> t computation -> t computation
val (/) : t computation -> t computation -> t computation
Backward reductions.
val backward_left_less_than : left:t -> right:t -> t Frama_c_kernel.Lattice_bounds.or_bottom
The call backward_left_less_than ~left ~right
returns a reduced abstraction of left
based on the assumption that left <= right
. If the assumption is wrong because no concrete element of left
can possibly be less than any concrete element of right
, the function must return `Bottom
.
val backward_left_greater_than : left:t -> right:t -> t Frama_c_kernel.Lattice_bounds.or_bottom
The call backward_left_greater_than ~left ~right
returns a reduced abstraction of left
based on the assumption that left >= right
. If the assumption is wrong because no concrete element of left
can possibly be greater than any concrete element of right
, the function must return `Bottom
.