Module Annotations


module Annotations: sig .. end
Annotations associated with a statement. The AST should be computed before calling functions of this module.
Consult the Plugin Development Guide for additional details.

val get_code_annotation : Cil_types.rooted_code_annotation -> Cil_types.code_annotation
extract the undecorated code_annotation from an annotation.
val add : Cil_types.kernel_function ->
Cil_types.stmt -> State.t list -> Cil_types.rooted_code_annotation -> unit
Associate one more annotation with the given stmt. The list is the states required for computing this binding. See State_builder.DASHTBL_OUTPUT.add for details.
Change in Nitrogen-20111001
Change in Boron-20100401
val add_assert : Cil_types.kernel_function ->
Cil_types.stmt -> State.t list -> Cil_types.predicate Cil_types.named -> unit
Associate one more assertion annotation with the given stmt. The list is the states required for computing this binding.
Change in Boron-20100401
Change in Nitrogen-20111001: Argument before suppressed: it is always before
Consult the Plugin Development Guide for additional details.
val set_annot : ?reset:bool ->
Cil_types.kernel_function ->
Cil_types.stmt ->
State.t list ->
(Cil_types.rooted_code_annotation -> Cil_types.rooted_code_annotation) ->
unit
replace ~reset kf stmt f applies f on each annotation a associated to the given stmt of kf in order to replace it by f a.
Since Nitrogen-20111001
val reset_stmt : reset:bool -> Cil_types.kernel_function -> Cil_types.stmt -> unit
Erase all the annotations associated to the given stmt. reset is true iff all the dependencies of all the bindings of this statement must be cleared.
Change in Boron-20100401
val get : ?who:State.t list ->
Cil_types.stmt ->
State.t -> (Cil_types.rooted_code_annotation * State.t) list
Return all the bindings associated with the stmt and state. See State_builder.DASHTBL_OUTPUT.find_all_local for details.
Since Boron-20100401
val get_annotations : ?who:State.t list ->
Cil_types.stmt -> State.t -> Cil_types.rooted_code_annotation list
Return all the annotations associated with the stmt and state.
Since Boron-20100401
val get_all : ?who:State.t list ->
Cil_types.stmt -> (Cil_types.rooted_code_annotation * State.t) list
Return all the bindings associated with the stmt.
Change in Boron-20100401
val get_all_annotations : ?who:State.t list -> Cil_types.stmt -> Cil_types.rooted_code_annotation list
Return all the annotations associated with the stmt. since Boron-20100401
val get_by_state : Cil_types.stmt -> (State.t * Cil_types.rooted_code_annotation list) list
Return all the annotations associated with the stmt and sorted by states.
Since Boron-20100401
val get_filter : (Cil_types.code_annotation -> bool) ->
Cil_types.stmt -> Cil_types.rooted_code_annotation list
Returns all the annotation associated with the stmt that respects the given condition. Use it in conjunction with Logic_utils.is_* to retrieve a particular kind of annotations.
val iter_stmt : (State.t option -> Cil_types.rooted_code_annotation * State.t -> unit) ->
Cil_types.stmt -> unit
Iterator on each bindings of the given statement.
Since Boron-20100401
val single_iter_stmt : (Cil_types.rooted_code_annotation -> unit) -> Cil_types.stmt -> unit
Iterator on each annotations of the given statement. Multiple bindings are only applied once.
Since Boron-20100401
val fold_stmt : (State.t option -> Cil_types.rooted_code_annotation * State.t -> 'a -> 'a) ->
Cil_types.stmt -> 'a -> 'a
Folder on each bindings of the given statement
Since Boron-20100401
val single_fold_stmt : (Cil_types.rooted_code_annotation -> 'a -> 'a) -> Cil_types.stmt -> 'a -> 'a
Folder on each annotations of the given statement. Multiple bindings are only applied once.
Since Boron-20100401
val iter : (Cil_types.stmt ->
State.t option -> Cil_types.rooted_code_annotation * State.t -> unit) ->
unit
Iterator on each bindings.
Since Boron-20100401
val fold : (Cil_types.stmt ->
State.t option -> Cil_types.rooted_code_annotation * State.t -> 'a -> 'a) ->
'a -> 'a
Folder on each bindings.
Since Boron-20100401
val filter : reset:bool ->
(Cil_types.stmt -> State.t option -> Cil_types.rooted_code_annotation -> bool) ->
Cil_types.kernel_function -> Cil_types.stmt -> unit
Filter the bindings associated to the given statement. See State_builder.DASHTBL_OUTPUT.filter for details.
Since Boron-20100401
val self : State.t
Internal states of the table associated annotations to statements.
Since Boron-20100401