Frama-C API - Plugin
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 {
p_name : string;
p_shortname : string;
p_help : string;
p_parameters : (string, Typed_parameter.t list) Stdlib.Hashtbl.t;
}
module type General_services = sig ... end
module Register (_ : sig ... end) : General_services
Functors for registering a new plug-in. It provides access to several services.
Make visible to the end-user the -<plug-in>-share option. To be called just before applying Register
to create plug-in services.
Make visible to the end-user the -<plug-in>-session option. To be called just before applying Register
to create plug-in services.
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.
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.
Whether a plug-in already exists. Plugins are identified by their short name.
val iter_on_plugins : (plugin -> unit) -> unit
Iterate on each registered plug-in.
val fold_on_plugins : (plugin -> 'a -> 'a) -> 'a -> 'a
Fold f
on each registered plug-in.