Module Plugin

module Plugin: 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_no_log = sig .. end
module type S = sig .. end

Provided plug-general services for plug-ins.

type plugin = private {
   p_name : string;
   p_shortname : string;
   p_help : string;
   p_parameters : (string, Typed_parameter.t list) Stdlib.Hashtbl.t;
}

Only iterable parameters (see do_iterate and do_not_iterate) are registered in the field p_parameters.

module type General_services = sig .. end
module Register: 
functor (P : sig
val name : string

Name of the module. Arbitrary non-empty string.

val shortname : string

Prefix for plugin options. No space allowed.

val help : string

description of the module. Free-form text.

end-> General_services 

Functors for registering a new plug-in.

val is_share_visible : unit -> unit

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

val is_session_visible : unit -> unit

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

val is_config_visible : unit -> unit

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

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.

val default_msg_keys : string list -> unit
Deprecated.since Chlorine-20180501 use directly functions from Log (add_debug_keys and del_debug_keys) to manage the default status of each category

Debug message keys set by default for the plugin.

Handling plugins

val get_from_shortname : string -> plugin

Get a plug-in from its shortname.

val get_from_name : string -> plugin

Get a plug-in from its name.

val is_present : string -> bool

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

val get : string -> plugin
Deprecated.since Oxygen-20120901

Get a plug-in from its name.

val iter_on_plugins : (plugin -> unit) -> unit

Iterate on each registered plug-ins.