module Emitter: sig
.. end
Emitter. An emitter is the Frama-C entity which is able to emit annotations
and property status. Thus you have to create (at least) one of your own if
you want to do such tasks.
Since Nitrogen-20111001
Consult the Plugin Development Guide for additional details.
API for Plug-ins Developers
type
emitter
type
kind =
| |
Property_status |
| |
Alarm |
| |
Code_annot |
| |
Funspec |
| |
Global_annot |
include Datatype.S_with_collections
val create : string ->
kind list ->
correctness:Typed_parameter.t list -> tuning:Typed_parameter.t list -> t
Emitter.create name kind ~correctness ~tuning
creates a new emitter with
the given name. The given parameters are the ones which impact the generated
annotations/status. A "correctness" parameter may fully change a generated
element when its value changes (for instance, a valid status may become
invalid and conversely). A "tuning" parameter may improve a generated
element when its value changes (for instance, a "dont_know" status may
become valid or invalid, but a valid status cannot become invalid).
The given name must be unique.
Raises Invalid_argument
if an emitter with the given name already exist
Consult the Plugin Development Guide for additional details.
val get_name : t -> string
val correctness_parameters : t -> string list
val tuning_parameters : t -> string list
val end_user : t
The special emitter corresponding to the end-user. Only the kernel should
use this emitter when emitting annotations or statuses.
Since Oxygen-20120901
val kernel : t
The special emitter corresponding to the kernel. Only the kernel should
use this emitter when emitting annotations or statuses.
Since Oxygen-20120901
module Usable_emitter: sig
.. end
Usable emitters are the ones which can really emit something.
val distinct_tuning_parameters : Usable_emitter.t -> Datatype.String.Set.t
Return the tuning parameter which distinguishes this usable emitter from the
other ones.
Since Oxygen-20120901
val distinct_correctness_parameters : Usable_emitter.t -> Datatype.String.Set.t
Return the correctness_parameters which distinguishes this usable emitter
from the other ones.
Since Oxygen-20120901
Kernel Internal API
val get : t -> Usable_emitter.t
Get the emitter which is really able to emit something.
This function must be called at the time of the emission. No action must
occur between the call to get
and the emission (in particular no update
of any parameter of the emitter.
val self : State.t
module Make_table: functor (
H
:
Datatype.Hashtbl
) ->
functor (
E
:
sig
include Datatype.S_with_collections
val local_clear : H.key -> 'a Hashtbl.t -> unit
val usable_get : t -> Emitter.Usable_emitter.t
val get : t -> Emitter.emitter
end
) ->
functor (
D
:
Datatype.S
) ->
functor (
Info
:
sig
include State_builder.Info_with_size
val kinds : Emitter.kind list
end
) ->
sig
.. end
Table indexing: key -> emitter (or equivalent data) -> value.