package frama-c

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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

API for Plug-ins Developers

type emitter
type kind =
  1. | Property_status
  2. | Alarm
  3. | Code_annot
  4. | Funspec
  5. | Global_annot
    (*

    When selecting Alarm, Code_annot is also automatically selected

    *)
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 name : string

Unique name of the datatype.

val descr : t Descr.t

Datatype descriptor.

val packed_descr : Structural_descr.pack

Packed version of the descriptor.

val reprs : t list

List of representants of the descriptor.

val equal : t -> t -> bool

Equality: same spec than Stdlib.(=).

val compare : t -> t -> int

Comparison: same spec than Stdlib.compare.

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.

val copy : t -> t

Deep copy: no possible sharing between x and copy x.

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.

  • raises Invalid_argument

    if an emitter with the given name already exist

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
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.

  • since 22.0-Titanium
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
val dummy : t
module Make_table (H : Datatype.Hashtbl) (E : sig ... end) (D : Datatype.S) (Info : 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.

OCaml

Innovation. Community. Security.