package frama-c

  1. Overview
  2. Docs
On This Page
  1. Handling plugins
Legend:
Library
Module
Module type
Parameter
Class
Class type

Plugin registration and general services.

module type S_no_log = sig ... end

Special signature for Kernel services, whose messages are handled in an ad'hoc manner. Should not be of any use for a standard plug-in, who would rather rely on Plugin.S below.

module type S = sig ... end

Provided plug-general services for plug-ins.

type plugin = private {
  1. p_name : string;
  2. p_shortname : string;
  3. p_help : string;
  4. p_parameters : (string, Typed_parameter.t list) Stdlib.Hashtbl.t;
}
  • since Beryllium-20090901
  • before 22.0-Titanium

    only "iterable" parameters were included; now all parameters are.

module type General_services = sig ... end
module Register (P : sig ... end) : General_services

Functors for registering a new plug-in. It provides access to several services.

val is_share_visible : unit -> unit

Make visible to the end-user the -<plug-in>-share option. To be called just before applying Register to create plug-in services.

  • since Oxygen-20120901
val is_session_visible : unit -> unit

Make visible to the end-user the -<plug-in>-session option. To be called just before applying Register to create plug-in services.

  • since Neon-20140301
val is_config_visible : unit -> unit

Make visible to the end-user the -<plug-in>-config option. To be called just before applying Register to create plug-in services.

  • since Neon-20140301
val plugin_subpath : string -> unit

Use the given string as the sub-directory in which the plugin files will be installed (ie. share/frama-c/plugin_subpath...). Relevant for directories Share, Session and Config above.

  • since Neon-20140301

Handling plugins

val get_from_shortname : string -> plugin

Get a plug-in from its shortname.

  • since Oxygen-20120901
val get_from_name : string -> plugin

Get a plug-in from its name.

  • since Oxygen-20120901
val is_present : string -> bool

Whether a plug-in already exists. Plugins are identified by their short name.

  • since Magnesium-20151001
val iter_on_plugins : (plugin -> unit) -> unit

Iterate on each registered plug-in.

  • since Beryllium-20090901
val fold_on_plugins : (plugin -> 'a -> 'a) -> 'a -> 'a

Fold f on each registered plug-in.

  • since 22.0-Titanium
OCaml

Innovation. Community. Security.