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=29612882330ecb6eddd0b4ca3afc0492b70d0feb3379a1b8e893194c6e173983
doc/frama-c-eva.gui/Eva_gui/Gui_eval/Make/argument-1-X/Val/index.html
Module X.Val
include Frama_c_kernel.Datatype.S
include Frama_c_kernel.Datatype.S_no_copy
val descr : t Frama_c_kernel.Descr.tDatatype descriptor.
val packed_descr : Frama_c_kernel.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 : (Frama_c_kernel.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.
val pretty_typ :
Frama_c_kernel.Cil_types.typ option ->
t Frama_c_kernel.Pretty_utils.formatterPretty the abstract value assuming it has the type given as argument.
Lattice Structure
val top : tval narrow : t -> t -> t Eva.Eval.or_bottomConstructors
val zero : tval one : tval top_int : tval inject_int : Frama_c_kernel.Cil_types.typ -> Frama_c_kernel.Integer.t -> tAbstract address for the given varinfo. (With type "pointer to the type of the variable" if the abstract values are typed.)
Alarms
These functions are used to create the alarms that report undesirable behaviors, when a value abstraction does not meet the prerequisites of an operation. Thereafter, the value is assumed to meet them to continue the analysis. See the documentation of the truth type for more details.
val assume_bounded :
Frama_c_kernel.Alarms.bound_kind ->
Eva__.Abstract_value.bound ->
t ->
[ `False | `Unknown of t | `True | `TrueReduced of t | `Unreachable ]val assume_not_nan :
assume_finite:bool ->
Frama_c_kernel.Cil_types.fkind ->
t ->
[ `False | `Unknown of t | `True | `TrueReduced of t | `Unreachable ]Assumes that the abstract value only represents well-formed pointer values: pointers either to an element of an array object or one past the last element of an array object. (A pointer to an object that is not an element of an array is viewed as a pointer to the first element of an array of length one with the type of the object as its element type.) The NULL pointer is always a valid pointer value. Function pointers are also considered as valid pointer values for now.
Forward Operations
val constant :
Frama_c_kernel.Cil_types.exp ->
Frama_c_kernel.Cil_types.constant ->
tEmbeds C constants into value abstractions: returns an abstract value for the given constant. The constant cannot be an enumeration constant.
val forward_unop :
Frama_c_kernel.Cil_types.typ ->
Frama_c_kernel.Cil_types.unop ->
t ->
t Eva.Eval.or_bottomforward_unop typ unop v evaluates the value unop v, resulting from the application of the unary operator unop to the value v. typ is the type of v.
val forward_binop :
Frama_c_kernel.Cil_types.typ ->
Frama_c_kernel.Cil_types.binop ->
t ->
t ->
t Eva.Eval.or_bottomforward_binop typ binop v1 v2 evaluates the value v1 binop v2, resulting from the application of the binary operator binop to the values v1 and v2. typ is the type of v1.
rewrap_integer irange t wraps around the abstract value t to fit the integer range irange, assuming 2's complement.
val forward_cast :
src_type:Eva__.Eval_typ.scalar_typ ->
dst_type:Eva__.Eval_typ.scalar_typ ->
t ->
t Eva.Eval.or_bottomAbstract evaluation of casts operators from src_type to dst_type.
Backward Operations
For an unary forward operation F, the inverse backward operator B tries to reduce the argument values of the operation, given its result.
It must satisfy: if B arg res = v then ∀ a ⊆ arg such that F a ⊆ res, a ⊆ v
i.e. B arg res returns a value v larger than all subvalues of arg whose result through F is included in res.
If F arg ∈ res is impossible, then v should be bottom. If the value arg cannot be reduced, then v should be None.
Any n-ary operator may be considered as a unary operator on a vector of values, the inclusion being lifted pointwise.
val backward_binop :
input_type:Frama_c_kernel.Cil_types.typ ->
resulting_type:Frama_c_kernel.Cil_types.typ ->
Frama_c_kernel.Cil_types.binop ->
left:t ->
right:t ->
result:t ->
(t option * t option) Eva.Eval.or_bottomBackward evaluation of the binary operation left binop right = result; tries to reduce the argument left and right according to result. input_type is the type of left, resulting_type the type of result.
val backward_unop :
typ_arg:Frama_c_kernel.Cil_types.typ ->
Frama_c_kernel.Cil_types.unop ->
arg:t ->
res:t ->
t option Eva.Eval.or_bottomBackward evaluation of the unary operation unop arg = res; tries to reduce the argument arg according to res. typ_arg is the type of arg.
val backward_cast :
src_typ:Frama_c_kernel.Cil_types.typ ->
dst_typ:Frama_c_kernel.Cil_types.typ ->
src_val:t ->
dst_val:t ->
t option Eva.Eval.or_bottomBackward evaluation of the cast of the value src_val of type src_typ into the value dst_val of type dst_typ. Tries to reduce scr_val according to dst_val.
Misc
val resolve_functions :
t ->
Frama_c_kernel.Kernel_function.t list Eva.Eval.or_top * boolresolve_functions v returns the list of functions that may be pointed to by the abstract value v (representing a function pointer). The returned boolean must be true if some of the values represented by v do not correspond to functions. It is always safe to return `Top, true.
val replace_base : Frama_c_kernel.Base.substitution -> t -> tFor pointer values, replace_base substitution value replaces the bases pointed to by value according to substitution. For arithmetic values, this function returns the value unchanged.
val structure : t Eva__.Abstract.Value.structureval get : 'a Eva__.Structure.Key_Value.key -> (t -> 'a) optionFor a key of type k key:
- if the values of type
tcontain a subpart of typekfrom a module identified by the key, thenget keyreturns an accessor for it. - otherwise,
get keyreturns None.
For a key of type k key:
- if the values of type
tcontain a subpart of typekfrom a module identified by the key, thenset key v treturns the valuetin which this subpart has been replaced byv. - otherwise,
set key _is the identity function.
Iterators on the components of a structure.
val iter : polymorphic_iter_fun -> t -> unitval fold : 'b polymorphic_fold_fun -> t -> 'b -> 'bval map : polymorphic_map_fun -> t -> t