module Annotations:sig..end
val code_annot : ?emitter:Emitter.t ->
?filter:(Cil_types.code_annotation -> bool) ->
Cil_types.stmt -> Cil_types.code_annotation listemitter (resp. filter) is specified, return only the annotations that
has been generated by this emitter (resp. that satisfies the given
predicate).val code_annot_emitter : ?filter:(Emitter.t -> Cil_types.code_annotation -> bool) ->
Cil_types.stmt -> (Cil_types.code_annotation * Emitter.t) listAnnotations.code_annot, but also returns the emitter who emitted the
annotation.exception No_funspec of Emitter.t
val funspec : ?emitter:Emitter.t ->
?populate:bool -> Cil_types.kernel_function -> Cil_types.funspecemitter is specified, return only the annotations that
has been generated by this emitter. If populate is set to false
(default is true), then the default contract of function declaration is
generated.No_funspec whenever the given function has no specificationval behaviors : ?emitter:Emitter.t ->
?populate:bool ->
Cil_types.kernel_function ->
(Cil_types.identified_predicate, Cil_types.identified_term)
Cil_types.behavior listemitter and populate is similar to Annotations.funspec.No_funspec whenever the given function has no specificationval decreases : ?emitter:Emitter.t ->
?populate:bool ->
Cil_types.kernel_function -> Cil_types.term Cil_types.variant optionemitter and populate is similar to Annotations.funspec.No_funspec whenever the given function has no specificationval terminates : ?emitter:Emitter.t ->
?populate:bool ->
Cil_types.kernel_function -> Cil_types.identified_predicate optionemitter and populate is similar to Annotations.funspec.No_funspec whenever the given function has no specificationval complete : ?emitter:Emitter.t ->
?populate:bool -> Cil_types.kernel_function -> string list listemitter and populate is similar to Annotations.funspec.No_funspec whenever the given function has no specificationval disjoint : ?emitter:Emitter.t ->
?populate:bool -> Cil_types.kernel_function -> string list listemitter and populate is similar to
Annotations.funspec.No_funspec whenever the given function has no specificationval model_fields : ?emitter:Emitter.t -> Cil_types.typ -> Cil_types.model_info listval iter_code_annot : (Emitter.t -> Cil_types.code_annotation -> unit) -> Cil_types.stmt -> unitval fold_code_annot : (Emitter.t -> Cil_types.code_annotation -> 'a -> 'a) ->
Cil_types.stmt -> 'a -> 'aval iter_all_code_annot : ?sorted:bool ->
(Cil_types.stmt -> Emitter.t -> Cil_types.code_annotation -> unit) -> unitsorted is true (the default), iteration is sorted according
to the location of the statements and by emitter. Note that the
sorted version is less efficient than the unsorted iteration.val fold_all_code_annot : ?sorted:bool ->
(Cil_types.stmt -> Emitter.t -> Cil_types.code_annotation -> 'a -> 'a) ->
'a -> 'asorted argument.val iter_global : (Emitter.t -> Cil_types.global_annotation -> unit) -> unitval fold_global : (Emitter.t -> Cil_types.global_annotation -> 'a -> 'a) -> 'a -> 'aval iter_requires : (Emitter.t -> Cil_types.identified_predicate -> unit) ->
Cil_types.kernel_function -> string -> unitval fold_requires : (Emitter.t -> Cil_types.identified_predicate -> 'a -> 'a) ->
Cil_types.kernel_function -> string -> 'a -> 'aval iter_assumes : (Emitter.t -> Cil_types.identified_predicate -> unit) ->
Cil_types.kernel_function -> string -> unitval fold_assumes : (Emitter.t -> Cil_types.identified_predicate -> 'a -> 'a) ->
Cil_types.kernel_function -> string -> 'a -> 'aval iter_ensures : (Emitter.t ->
Cil_types.termination_kind * Cil_types.identified_predicate -> unit) ->
Cil_types.kernel_function -> string -> unitval fold_ensures : (Emitter.t ->
Cil_types.termination_kind * Cil_types.identified_predicate -> 'a -> 'a) ->
Cil_types.kernel_function -> string -> 'a -> 'aval iter_assigns : (Emitter.t -> Cil_types.identified_term Cil_types.assigns -> unit) ->
Cil_types.kernel_function -> string -> unitval fold_assigns : (Emitter.t -> Cil_types.identified_term Cil_types.assigns -> 'a -> 'a) ->
Cil_types.kernel_function -> string -> 'a -> 'aval iter_allocates : (Emitter.t -> Cil_types.identified_term Cil_types.allocation -> unit) ->
Cil_types.kernel_function -> string -> unitval fold_allocates : (Emitter.t -> Cil_types.identified_term Cil_types.allocation -> 'a -> 'a) ->
Cil_types.kernel_function -> string -> 'a -> 'aval iter_extended : (Emitter.t -> string * int * Cil_types.identified_predicate list -> unit) ->
Cil_types.kernel_function -> string -> unitval fold_extended : (Emitter.t -> string * int * Cil_types.identified_predicate list -> 'a -> 'a) ->
Cil_types.kernel_function -> string -> 'a -> 'a
val iter_behaviors : (Emitter.t ->
(Cil_types.identified_predicate, Cil_types.identified_term)
Cil_types.behavior -> unit) ->
Cil_types.kernel_function -> unitval fold_behaviors : (Emitter.t ->
(Cil_types.identified_predicate, Cil_types.identified_term)
Cil_types.behavior -> 'a -> 'a) ->
Cil_types.kernel_function -> 'a -> 'aval iter_complete : (Emitter.t -> string list -> unit) -> Cil_types.kernel_function -> unitval fold_complete : (Emitter.t -> string list -> 'a -> 'a) ->
Cil_types.kernel_function -> 'a -> 'aval iter_disjoint : (Emitter.t -> string list -> unit) -> Cil_types.kernel_function -> unitval fold_disjoint : (Emitter.t -> string list -> 'a -> 'a) ->
Cil_types.kernel_function -> 'a -> 'aval iter_terminates : (Emitter.t -> Cil_types.identified_predicate -> unit) ->
Cil_types.kernel_function -> unitval fold_terminates : (Emitter.t -> Cil_types.identified_predicate -> 'a -> 'a) ->
Cil_types.kernel_function -> 'a -> 'aval iter_decreases : (Emitter.t -> Cil_types.term Cil_types.variant -> unit) ->
Cil_types.kernel_function -> unitval fold_decreases : (Emitter.t -> Cil_types.term Cil_types.variant -> 'a -> 'a) ->
Cil_types.kernel_function -> 'a -> 'aval add_code_annot : Emitter.t ->
?kf:Cil_types.kernel_function ->
Cil_types.stmt -> Cil_types.code_annotation -> unitkf is
provided, the function runs faster.
There might be at most one statement contract associated to a given statement and a given set of enclosing behaviors. Trying to associate more than one will result in a merge of the contracts.
The same things happens with loop assigns and allocates/frees.
There can be at most one loop variant registered per statement.
Attempting to register a second one will result in a fatal error.
val add_assert : Emitter.t ->
?kf:Cil_types.kernel_function ->
Cil_types.stmt -> Cil_types.predicate Cil_types.named -> unitkf is
provided, the function runs faster.val add_global : Emitter.t -> Cil_types.global_annotation -> unittype'acontract_component_addition =Emitter.t ->
Cil_types.kernel_function ->
?stmt:Cil_types.stmt -> ?active:string list -> 'a -> unit
stmt). In the latter case active may be used to state the
list of enclosing behavior(s) for which the contract is supposed to hold.
active defaults to the empty list, meaning that the contract must
always hold.type'abehavior_component_addition =Emitter.t ->
Cil_types.kernel_function ->
?stmt:Cil_types.stmt -> ?active:string list -> ?behavior:string -> 'a -> unit
behavior inside a contract. The
contract is found in a similar way as for Annotations.contract_component_addition
functions. Similarly, active has the same meaning as for
Annotations.contract_component_addition.
Default for behavior is Cil.default_behavior_name.
Since Aluminium-20160501
val add_behaviors : ?register_children:bool ->
Cil_types.funbehavior list contract_component_additionregister_children is true (the default), inner clauses of the
behavior will also be registered by the function.val add_decreases : Emitter.t ->
Cil_types.kernel_function -> Cil_types.term Cil_types.variant -> unitval add_terminates : Cil_types.identified_predicate contract_component_additionval add_complete : string list contract_component_additionFatal if one of the given name
is either an unknown behavior or Cil.default_behavior_name.val add_disjoint : string list contract_component_additionFatal if one of the given name
is either an unknown behavior or Cil.default_behavior_name.val add_requires : Cil_types.identified_predicate list behavior_component_additionval add_assumes : Cil_types.identified_predicate list behavior_component_addition
Does nothing but emitting a warning if an attempt is
made to add assumes clauses to the default behavior.
Change in Aluminium-20160501: restructuration of annotations management
val add_ensures : (Cil_types.termination_kind * Cil_types.identified_predicate) list
behavior_component_additionval add_assigns : keep_empty:bool ->
Cil_types.identified_term Cil_types.assigns
behavior_component_addition
If keep_empty is true and the assigns clause were empty, then
the assigns clause remains empty. (That corresponds to the ACSL semantics of
an assigns clause: if no assigns is specified, that is equivalent to assigns
everything.)
Change in Aluminium-20160501: restructuration of annotations management
val add_allocates : Cil_types.identified_term Cil_types.allocation
behavior_component_additionval add_extended : (string * int * Cil_types.identified_predicate list)
behavior_component_additionval remove_code_annot : Emitter.t ->
?kf:Cil_types.kernel_function ->
Cil_types.stmt -> Cil_types.code_annotation -> unitval remove_global : Emitter.t -> Cil_types.global_annotation -> unitval remove_behavior : ?force:bool ->
Emitter.t ->
Cil_types.kernel_function ->
(Cil_types.identified_predicate, Cil_types.identified_term)
Cil_types.behavior -> unitforce is false (which is the default),
it is not possible to remove a behavior whose the name is used in a
complete/disjoint clause. If force is true, it is the responsibility
of the user to ensure that complete/disjoint clauses refer to existing
behaviors.val remove_behavior_components : Emitter.t -> Cil_types.kernel_function -> Cil_types.funbehavior -> unitval remove_decreases : Emitter.t -> Cil_types.kernel_function -> unitval remove_terminates : Emitter.t -> Cil_types.kernel_function -> unitval remove_complete : Emitter.t -> Cil_types.kernel_function -> string list -> unitval remove_disjoint : Emitter.t -> Cil_types.kernel_function -> string list -> unitval remove_requires : Emitter.t ->
Cil_types.kernel_function -> Cil_types.identified_predicate -> unitval remove_assumes : Emitter.t ->
Cil_types.kernel_function -> Cil_types.identified_predicate -> unitval remove_ensures : Emitter.t ->
Cil_types.kernel_function ->
Cil_types.termination_kind * Cil_types.identified_predicate -> unitval remove_allocates : Emitter.t ->
Cil_types.kernel_function ->
Cil_types.identified_term Cil_types.allocation -> unitval remove_assigns : Emitter.t ->
Cil_types.kernel_function ->
Cil_types.identified_term Cil_types.assigns -> unitval remove_extended : Emitter.t ->
Cil_types.kernel_function ->
string * int * Cil_types.identified_predicate list -> unitval has_code_annot : ?emitter:Emitter.t -> Cil_types.stmt -> booltrue iff there is some annotation attached to the given statement
(and generated by the given emitter, if any).val emitter_of_code_annot : Cil_types.code_annotation -> Cil_types.stmt -> Emitter.tNot_found if the code annotation does not exist, or if it is
registered at another statement.val emitter_of_global : Cil_types.global_annotation -> Emitter.tNot_found if the global annotation is not registered.val logic_info_of_global : string -> Cil_types.logic_info listNot_found if no global annotation declare such a variableval behavior_names_of_stmt_in_kf : Cil_types.kernel_function -> string listval code_annot_of_kf : Cil_types.kernel_function ->
(Cil_types.stmt * Cil_types.code_annotation) listval fresh_behavior_name : Cil_types.kernel_function -> string -> stringval code_annot_state : State.tval funspec_state : State.tval global_state : State.tval populate_spec_ref : (Cil_types.kernel_function -> Cil_types.funspec -> bool) Pervasives.ref
val unsafe_add_global : Emitter.t -> Cil_types.global_annotation -> unit
val register_funspec : ?emitter:Emitter.t -> ?force:bool -> Cil_types.kernel_function -> unit
val remove_alarm_ref : (Emitter.Usable_emitter.t ->
Cil_types.stmt -> Cil_types.code_annotation -> unit)
Pervasives.ref