package frama-c
Install
dune-project
Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
QQuentin Bouillaguet
-
DDavid Bühler
-
ZZakaria Chihani
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
FFlorent Kirchner
-
AAlexander Kogtenkov
-
TTristan Le Gall
-
JJean-Christophe Léchenet
-
MMatthieu Lemerre
-
DDara Ly
-
DDavid Maison
-
CClaude Marché
-
AAndré Maroneze
-
TThibault Martin
-
FFonenantsoa Maurica
-
MMelody Méaulle
-
BBenjamin Monate
-
YYannick Moy
-
PPierre Nigron
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
JJan Rochel
-
MMuriel Roger
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=0c80dae8074fcb3f6a33d7a41faf9939a2a336478a8d2c79e20e2d7bab953735
doc/frama-c.kernel/Frama_c_kernel/Int_val/index.html
Module Frama_c_kernel.Int_val
Integer values abstractions: an abstraction represents a set of integers. Provided with a lattice structure and over-approximations of arithmetic operations.
include Datatype.S_with_collections
include Datatype.S
include Datatype.S_no_copy
include Datatype.Ty
module Set : Datatype.Set with type elt = tmodule Map : Datatype.Map with type key = tmodule Hashtbl : Datatype.Hashtbl with type key = tmodule Widen_Hints = Datatype.Integer.Settype size_widen_hint = Integer.ttype generic_widen_hint = Widen_Hints.tinclude Eva_lattice_type.Full_AI_Lattice_with_cardinality
with type t := t
and type widen_hint = size_widen_hint * generic_widen_hint
include Eva_lattice_type.AI_Lattice_with_cardinal_one
with type t := t
with type widen_hint = size_widen_hint * generic_widen_hint
include Eva_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.packPacked version of the descriptor.
val reprs : t listList of representants of the descriptor.
val hash : t -> intHash function: same spec than Hashtbl.hash.
val pretty : Format.formatter -> t -> unitPretty print each value in an user-friendly way.
val mem_project : (Project_skeleton.t -> bool) -> t -> boolmem_project f x must return true iff there is a value p of type Project.t in x such that f p returns true.
include Eva_lattice_type.With_Top with type t := t
val top : tlargest element
include Eva_lattice_type.With_Widening
with type t := t
with type widen_hint = size_widen_hint * generic_widen_hint
type widen_hint = size_widen_hint * generic_widen_hinthints for the widening
val widen : widen_hint -> t -> t -> twiden h t1 t2 is an over-approximation of join t1 t2. Assumes is_included t1 t2
include Eva_lattice_type.With_Cardinal_One with type t := t
include Eva_lattice_type.With_Narrow with type t := t
val narrow : t -> t -> t Lattice_bounds.or_bottomover-approximation of intersection
include Eva_lattice_type.With_Under_Approximation with type t := t
val meet : t -> t -> t Lattice_bounds.or_bottomunder-approximation of intersection
include Eva_lattice_type.With_Intersects with type t := t
include Eva_lattice_type.With_Diff with type t := t
val diff : t -> t -> t Lattice_bounds.or_bottomdiff t1 t2 is an over-approximation of t1-t2. t2 must be an under-approximation or exact.
include Eva_lattice_type.With_Diff_One with type t := t
val diff_if_one : t -> t -> t Lattice_bounds.or_bottomdiff_if_one t1 t2 is an over-approximation of t1-t2.
include Eva_lattice_type.With_Enumeration with type t := t
Fold on the elements of the value one by one if possible. Raises Abstract_interp.Not_less_than when there is an infinite number of elements to enumerate.
val zero : tval one : tval minus_one : tval zero_or_one : tval positive_integers : tAll positive integers, including 0.
val negative_integers : tAll negative integers, including 0.
Building.
inject_range min max returns an abstraction of all integers between min and max included. None means that the abstraction is unbounded.
val inject_interval :
min:Integer.t option ->
max:Integer.t option ->
rem:Integer.t ->
modu:Integer.t ->
tBuilds an abstraction of all integers between min and max included and congruent to rem modulo modu. For min and max, None is the corresponding infinity. Checks that min <= max, modu > 0 and 0 <= rest < modu, and fails otherwise. If possible, reduces min and max according to the modulo.
As inject_interval, but also checks that min and max are congruent to rem modulo modu.
Accessors.
Returns the smallest integer represented by an abstraction. Returns None if it does not exist, i.e. if the abstraction is unbounded.
Returns the highest integer represented by an abstraction. Returns None if it does not exist, i.e. if the abstraction is unbouded.
Returns the smallest and highest integers represented by an abstraction.
Returns min, max, rem, modu such that for all integers i represented by the given abstraction, i satisfies min ≤ i ≤ max and i ≅ rem modu.
val is_small_set : t -> boolIs an abstraction internally represented as a small integer set?
Cardinality.
val is_singleton : t -> boolval cardinal_zero_or_one : t -> boolval cardinal_less_than : t -> int -> intval cardinal_is_less_than : t -> int -> boolval is_zero : t -> boolval contains_zero : t -> boolval contains_non_zero : t -> boolArithmetics.
val add_under : t -> t -> t Lattice_bounds.or_bottomUnder-approximation of the addition of two integer abstractions
Addition of an integer abstraction with a singleton integer. Exact operation.
scale f v returns an abstraction of the integers f * x for all x in v. This operation is exact.
scale_div f v is an over-approximation of the elements x / f for all elements x in v. Uses the computer division (like in C99) if pos is false, and the euclidean division if pos is true.
val scale_div_under : pos:bool -> Integer.t -> t -> t Lattice_bounds.or_bottomUnder-approximation of the division.
Over-approximation of the remainder of the division. Uses the computer division (like in C99) if pos is false, and the euclidean division if pos is true.
val div : t -> t -> t Lattice_bounds.or_bottomval c_rem : t -> t -> t Lattice_bounds.or_bottomval shift_left : t -> t -> t Lattice_bounds.or_bottomval shift_right : t -> t -> t Lattice_bounds.or_bottomComparisons
val forward_comp :
Abstract_interp.Comp.t ->
t ->
t ->
Abstract_interp.Comp.resultforward_comp op l r returns the result of the comparison l op r.
val backward_comp_left :
Abstract_interp.Comp.t ->
t ->
t ->
t Lattice_bounds.or_bottombackward_comp_left op l r reduces l by assuming l op r holds.
Misc
Extracts bits from start to stop from the given integer abstraction, start and stop being included.
val create_all_values : signed:bool -> size:int -> tBuilds an abstraction of all integers in a C integer type.
all_values ~size v returns true iff v contains all integer values representable in size bits.
val complement_under :
size:int ->
signed:bool ->
t ->
t Lattice_bounds.or_bottomReturns an under-approximation of the integers of the given size and signedness that are *not* represented by the given value.
Iterates on all integers represented by an abstraction, in increasing order by default. If increasing is set to false, iterate by decreasing order.