package frama-c
Install
dune-project
Dependency
Authors
-
MMichele Alberti
-
TThibaud Antignac
-
GGergö Barany
-
PPatrick Baudin
-
NNicolas Bellec
-
TThibaut Benjamin
-
AAllan Blanchard
-
LLionel Blatter
-
FFrançois Bobot
-
RRichard Bonichon
-
VVincent Botbol
-
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
-
RRemi Lazarini
-
TTristan Le Gall
-
KKilyan Le Gallic
-
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
-
CCécile Ruet-Cros
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=93a291a8764644df2f3618d7ea18258b5fbe0912ec98dfdfd180967afdf24474
doc/frama-c-e-acsl.core/E_ACSL/Assert/index.html
Module E_ACSL.Assert
Module with the context to hold the data contributing to an assertion and general functions to create assertion statements.
val empty :
loc:Frama_c_kernel.Cil_types.location ->
Frama_c_kernel.Cil_types.kernel_function ->
Env.t ->
t * Env.tEmpty assertion context.
val no_data : tNo data assertion context.
Contrary to an empty assertion context, a "no data" assertion context will always have no data in it, even when calling register on it. The goal is to have a context to pass to functions that need one even if we do not need it afterwards. For instance there is no following assertion statement.
val with_data_from :
loc:Frama_c_kernel.Cil_types.location ->
Frama_c_kernel.Cil_types.kernel_function ->
Env.t ->
t ->
t * Env.twith_data_from ~loc kf env from creates a new assertion context with the same data than the from assertion context. If from is a "no data" assertion context, then the new context is also a "no data" assertion context.
merge_right ~loc env adata1 adata2 merges the assertion data of adata1 into adata2 if adata2 is not a "no data" assertion context.
val clean : loc:Frama_c_kernel.Cil_types.location -> Env.t -> t -> Env.tclean ~loc env adata generates a call to the C cleanup function for the assertion context. This function *must* be used if the assertion context is not given to runtime_check or runtime_check_with_msg, otherwise the memory allocated in the C structure will not be freed.
push_pending_register_data adds a data registration to a stack of pending data registration to be generated later
do_pending_register_data performs all the pending restrations
val register :
loc:Frama_c_kernel.Cil_types.location ->
?force:bool ->
string ->
Frama_c_kernel.Cil_types.exp ->
t ->
tregister ~loc env ?force name e adata registers the data e corresponding to the name name to the assertion context adata. If force is false (default), the data is not registered if the expression is a constant. If force is true, the data is registered even if the expression is a constant.
val register_term :
loc:Frama_c_kernel.Cil_types.location ->
?force:bool ->
Frama_c_kernel.Cil_types.term ->
Frama_c_kernel.Cil_types.exp ->
t ->
tregister_term ~loc env ?force t e adata registers the data e corresponding to the term t to the assertion context adata. The parameter force has the same signification than for the function register.
val register_pred :
loc:Frama_c_kernel.Cil_types.location ->
Env.t ->
?force:bool ->
Frama_c_kernel.Cil_types.predicate ->
Frama_c_kernel.Cil_types.exp ->
t ->
tregister_pred ~loc env ?force p e adata registers the data e corresponding to the predicate p to the assertion context adata. The parameter force has the same signification than for the function register.
val register_pred_or_term :
loc:Frama_c_kernel.Cil_types.location ->
Env.t ->
?force:bool ->
Analyses_types.pred_or_term ->
Frama_c_kernel.Cil_types.exp ->
t ->
tregister_pred_or_term ~loc kf env ?force pot e adata registers the data e corresponding to the predicate or term pot to the assertion context adata. The parameter force has the same signification than for the function register.
val runtime_check :
adata:t ->
pred_kind:Frama_c_kernel.Cil_types.predicate_kind ->
Analyses_types.annotation_kind ->
Frama_c_kernel.Cil_types.kernel_function ->
Env.t ->
Frama_c_kernel.Cil_types.exp ->
Frama_c_kernel.Cil_types.predicate ->
Frama_c_kernel.Cil_types.stmt * Env.truntime_check ~adata ~pred_kind kind kf env e p generates a runtime check for predicate p by building a call to __e_acsl_assert. e (or !e if reverse is set to true) is the C translation of p. adata is the assertion context holding the data contributing to the assertion. pred_kind indicates if the assert should be blocking or not. kind is the annotation kind of p. kf is the current kernel_function. env is the current environment.
val runtime_check_with_msg :
adata:t ->
loc:Frama_c_kernel.Cil_types.location ->
?name:string ->
string ->
pred_kind:Frama_c_kernel.Cil_types.predicate_kind ->
Analyses_types.annotation_kind ->
Frama_c_kernel.Cil_types.kernel_function ->
Env.t ->
Frama_c_kernel.Cil_types.exp ->
Frama_c_kernel.Cil_types.stmt * Env.truntime_check_with_msg ~adata ~loc ?name msg ~pred_kind kind kf env e generates a runtime check for e (or !e if reverse is true) by building a call to __e_acsl_assert. adata is the assertion context holding the data contributing to the assertion. loc is the location printed in the message if the runtime check fails. name is the name of the predicate printed if the runtime check fails. msg is the message printed if the runtime check fails. pred_kind indicates if the assert should be blocking or not. kind is the annotation kind of p. kf is the current kernel_function. env is the current environment.