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
-
AAnne Pacalet
-
VValentin Perrelle
-
GGuillaume Petiot
-
DDario Pinto
-
VVirgile Prevosto
-
AArmand Puccetti
-
FFélix Ridoux
-
VVirgile Robles
-
MMuriel Roger
-
JJulien Signoles
-
NNicolas Stouls
-
KKostyantyn Vorobyov
-
BBoris Yakobowski
Maintainers
Sources
sha256=5b13574a16a58971c27909bee94ae7f37b17d897852b40c768a3d4e2e09e39d2
doc/frama-c.kernel/Frama_c_kernel/Ast_info/index.html
Module Frama_c_kernel.Ast_info
AST manipulation utilities.
Expressions
val is_integral_const : Cil_types.constant -> booltrue iff the constant is an integer constant (i.e. neither a float nor a string). Enum tags and chars are integer constants.
val possible_value_of_integral_const : Cil_types.constant -> Integer.t optionreturns the value of the corresponding integer literal or None if the constant is not an integer (i.e. is_integral_const returns false).
val possible_value_of_integral_expr : Cil_types.exp -> Integer.t optionreturns the value of the corresponding integer constant expression, or None if the expression is not a constant expression or does not evaluate to an integer constant.
val value_of_integral_const : Cil_types.constant -> Integer.treturns the value of the corresponding integer literal. It is the responsability of the caller to ensure the constant is indeed an integer constant. If unsure, use possible_value_of_integral_const.
val value_of_integral_expr : Cil_types.exp -> Integer.treturns the value of the corresponding integer constant expression. It is the responsibility of the caller to ensure that the argument is indeed an integer constant expression. If unsure, use possible_value_of_integral_expr.
val is_null_expr : Cil_types.exp -> booltrue iff the expression is a constant expression that evaluates to a null pointer, i.e. 0 or a cast to 0.
val is_non_null_expr : Cil_types.exp -> booltrue iff the expression is a constant expression that evaluates to a non-null pointer.
Warning: note that for the purpose of this function &x is not a constant expression, hence the function will return false in this case.
Logical terms
val is_integral_logic_const : Cil_types.logic_constant -> boolval possible_value_of_integral_logic_const :
Cil_types.logic_constant ->
Integer.t optionval value_of_integral_logic_const : Cil_types.logic_constant -> Integer.tval possible_value_of_integral_term : Cil_types.term -> Integer.t optionval term_lvals_of_term : Cil_types.term -> Cil_types.term_lval listval precondition : goal:bool -> Cil_types.funspec -> Cil_types.predicateBuilds the precondition from b_assumes and b_requires clauses. With ~goal:true, only returns assert and check predicates. With ~goal:false, only returns assert and admit predicates.
val behavior_assumes : Cil_types.funbehavior -> Cil_types.predicateBuilds the conjunction of the b_assumes.
val behavior_precondition :
goal:bool ->
Cil_types.funbehavior ->
Cil_types.predicateBuilds the precondition from b_assumes and b_requires clauses. For flag ~goal see Ast_info.precondition above.
val behavior_postcondition :
goal:bool ->
Cil_types.funbehavior ->
Cil_types.termination_kind ->
Cil_types.predicateBuilds the postcondition from b_assumes and b_post_cond clauses. For flag ~goal see Ast_info.precondition above.
val disjoint_behaviors :
Cil_types.funspec ->
string list ->
Cil_types.predicateBuilds the disjoint_behaviors property for the behavior names.
val complete_behaviors :
Cil_types.funspec ->
string list ->
Cil_types.predicateBuilds the disjoint_behaviors property for the behavior names.
val merge_assigns_from_complete_bhvs :
?warn:bool ->
?unguarded:bool ->
Cil_types.funbehavior list ->
string list list ->
Cil_types.assignsOptional warn argument can be used to force emitting or cancelation of warnings.
val merge_assigns_from_spec :
?warn:bool ->
Cil_types.funspec ->
Cil_types.assignsIt is a shortcut for merge_assigns_from_complete_bhvs spec.spec_complete_behaviors spec.spec_behavior. Optional warn argument can be used to force emitting or cancelation of warnings
val merge_assigns :
?warn:bool ->
Cil_types.funbehavior list ->
Cil_types.assignsReturns the assigns of an unguarded behavior. Optional warn argument can be used to force emitting or cancelation of warnings.
val variable_term : Cil_types.location -> Cil_types.logic_var -> Cil_types.termval constant_term : Cil_types.location -> Integer.t -> Cil_types.termval is_null_term : Cil_types.term -> boolStatements
val is_loop_statement : Cil_types.stmt -> boolval get_sid : Cil_types.kinstr -> intval mkassign :
Cil_types.lval ->
Cil_types.exp ->
Cil_types.location ->
Cil_types.instrval mkassign_statement :
Cil_types.lval ->
Cil_types.exp ->
Cil_types.location ->
Cil_types.stmtval is_block_local : Cil_types.varinfo -> Cil_types.block -> booldetermines if a var is local to a block.
val block_of_local : Cil_types.fundec -> Cil_types.varinfo -> Cil_types.blocklocal_block f vi returns the block of f in which vi is declared. vi must be a variable of f.
Types
val array_type :
?length:Cil_types.exp ->
?attr:Cil_types.attributes ->
Cil_types.typ ->
Cil_types.typval direct_array_size : Cil_types.typ -> Integer.tval array_size : Cil_types.typ -> Integer.tval direct_element_type : Cil_types.typ -> Cil_types.typval element_type : Cil_types.typ -> Cil_types.typval direct_pointed_type : Cil_types.typ -> Cil_types.typval pointed_type : Cil_types.typ -> Cil_types.typFunctions
val is_function_type : Cil_types.varinfo -> boolReturn true iff the type of the given varinfo is a function type.
module Function : sig ... endOperations on cil function.