Frama-C API - Emitter
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.
API for Plug-ins Developers
include Datatype.S_with_collections with type t = emitter
include Datatype.S with type t = emitter
include Datatype.S_no_copy with type t = emitter
val packed_descr : Structural_descr.pack
Packed version of the descriptor.
val reprs : t list
List of representants of the descriptor.
val hash : t -> int
Hash function: same spec than Hashtbl.hash
.
val pretty : Stdlib.Format.formatter -> t -> unit
Pretty print each value in an user-friendly way.
val mem_project : (Project_skeleton.t -> bool) -> t -> bool
mem_project f x
must return true
iff there is a value p
of type Project.t
in x
such that f p
returns true
.
module Set : Datatype.Set with type elt = t
module Map : Datatype.Map with type key = t
module Hashtbl : Datatype.Hashtbl with type key = t
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.
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.
val kernel : t
The special emitter corresponding to the kernel. Only the kernel should use this emitter when emitting annotations or statuses.
val orphan : t
special emitter for adopting annotations that were generated by an emitter that is no longer available (in particular, annotations loaded from a state that was generated from a different set of plug-ins than in current session). Should not be used outside of the kernel.
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.
val distinct_correctness_parameters : Usable_emitter.t -> Datatype.String.Set.t
Return the correctness_parameters which distinguishes this usable emitter from the other ones.
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
val dummy : t
module Make_table (H : Datatype.Hashtbl) (E : sig ... end) (D : Datatype.S) (_ : sig ... end) : sig ... end
Table indexing: key -> emitter (or equivalent data) -> value. Quick access + handle cleaning in the right way (only remove relevant bindings when required.