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
-
SSylvain Chiron
-
LLoïc Correnson
-
JJulien Crétin
-
PPascal Cuoq
-
ZZaynah Dargaye
-
BBasile Desloges
-
JJean-Christophe Filliâtre
-
PPhilippe Herrmann
-
MMaxime Jacquemin
-
BBenjamin Jorge
-
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=095ffbb3086a6cd963a03e3defab4f0dc32e9a43f026e552ec9ae346a6e20522
doc/frama-c.kernel/Frama_c_kernel/Ast_attributes/index.html
Module Frama_c_kernel.Ast_attributes
This file contains attribute related types/functions/values.
Attributes lists/values
Name of the attribute that is automatically inserted (with an AINT size argument when querying the type of a field that is a bitfield.
Name of the attribute that is inserted when generating a name for a varinfo representing an anonymous function parameter.
val anonymous_attribute : Cil_types.attributeAttribute identifying anonymous function parameters.
Qualifiers and internal attributes to remove when doing a C cast.
Qualifiers and internal attributes to remove when doing a C cast.
Qualifiers and internal attributes to remove when doing a C cast.
A varinfo marked with this attribute is known to be a ghost formal.
A formal marked with this attribute is known to be a pointer to an object being initialized by the current function, which can thus assign any sub-object regardless of const status.
A field struct marked with this attribute is known to be mutable, i.e. it can be modified even on a const object.
A block marked with this attribute is known to be inlined, i.e. it replaces a call to an inline function.
Name of the attribute inserted by the elaboration to prevent user blocks from disappearing. It can be removed whenever block contracts have been processed.
Name of the attribute used to store the function that should be called when the corresponding variable exits its scope.
Name of the attribute used to indicate that a given static variable has a local syntactic scope (despite a global lifetime).
Attribute added when generating variadic functions from Frama-C's libc.
Attribute added by cabs2cil on functions calls encountered before any declaration/definition.
Attributes manipulations
val get_name : Cil_types.attribute -> stringReturn the name of an attribute.
val add : Cil_types.attribute -> Cil_types.attributes -> Cil_types.attributesAdd an attribute. Maintains the attributes in sorted order of the second argument. The attribute is not added if it is already there.
val add_list :
Cil_types.attributes ->
Cil_types.attributes ->
Cil_types.attributesAdd a list of attributes. Maintains the attributes in sorted order. The second argument must be sorted, but not necessarily the first.
val drop : string -> Cil_types.attributes -> Cil_types.attributesRemove all attributes with the given name. Maintains the attributes in sorted order.
val drop_list : string list -> Cil_types.attributes -> Cil_types.attributesRemove all attributes with names appearing in the string list. Maintains the attributes in sorted order.
val replace_params :
string ->
Cil_types.attrparam list ->
Cil_types.attributes ->
Cil_types.attributesval contains : string -> Cil_types.attributes -> boolTrue if the named attribute appears in the attribute list. The list of attributes must be sorted.
val find_params : string -> Cil_types.attributes -> Cil_types.attrparam listReturn the list of parameters associated to an attribute. The list is empty if there is no such attribute or it has no parameters at all.
val filter : string -> Cil_types.attributes -> Cil_types.attributesRetain attributes with the given name.
Attributes classes and registration
type attribute_info = {attr_class : attribute_class;(*Class of the attribute.
*)attr_ignore : bool;(*Ignore the attribute when comparing types.
*)attr_print : bool;(*Print the attribute when printing the AST.
*)
}Registered informations about an attribute.
val known_table : (string, attribute_info) Hashtbl.tTable containing all registered attributes.
val register : ?print:bool -> ?ignore:bool -> attribute_class -> string -> unitAdd a new attribute with a specified class, if it should be printed (default is true) and ignore when comparing types (default if true for AttrUnknown class and false otherwise).
val register_noprint : ?ignore:bool -> attribute_class -> string -> unitSame as register but with print set to false.
val register_list :
?print:bool ->
?ignore:bool ->
attribute_class ->
string list ->
unitCall register on a list of attributes with the same class and print status.
is_known attrname returns true if the attribute named attrname is known (registered) by Frama-C.
val find_known : string -> attribute_info optionfind_known attrname returns Some attrinfo if the attribute named attrname is known (registered) by Frama-C, None otherwise.
val get_class : default:attribute_class -> string -> attribute_classReturn the class of an attribute. The class `default' is returned for unknown and ignored attributes.
should_print attrname return the field attr_print of the attribute named attrname if it is known (registered) by Frama-C, and return true otherwise.
should_ignore attrname return the field attr_ignore of the attribute named attrname if it is known (registered) by Frama-C, and return false otherwise.
val partition :
default:attribute_class ->
Cil_types.attributes ->
Cil_types.attributes * Cil_types.attributes * Cil_types.attributesPartition the attributes into classes: name, function type and type. Statement attributes are removed with a warning, Unknown attributes are returned in the `default` attribute class. If this class is AttrUnknown, again, they are removed like AttrStmt without warning.
Utility functions
val filter_qualifiers : Cil_types.attributes -> Cil_types.attributesRetain attributes corresponding to type qualifiers (6.7.3)
val split_array_attributes :
Cil_types.attributes ->
Cil_types.attributes * Cil_types.attributesGiven some attributes on an array type, split them into those that belong to the type of the elements of the array (currently, qualifiers such as const and volatile), and those that must remain on the array, in that order.
val split_storage_modifiers :
Cil_types.attributes ->
Cil_types.attributes * Cil_types.attributesSeparate out the storage-modifier name attributes