module Plugin: sig
.. end
Provided plug-general services for plug-ins.
Since Beryllium-20090601-beta1
val at_normal_exit : (unit -> unit) -> unit
Register a hook executed whenever Frama-C exits without error (the exit
code is 0).
Since Beryllium-20090901
val run_normal_exit_hook : unit -> unit
Signatures
type
group
Group of parameters.
Since Beryllium-20090901
module type Parameter = sig
.. end
Generic outputs signatures of parameters.
module type BOOL = sig
.. end
Signature for a boolean parameter.
module type INT = sig
.. end
Signature for an integer parameter.
module type STRING = sig
.. end
Signature for a string parameter.
module type GEN_STRING_SET = sig
.. end
Signature for a generic set of strings option.
module type STRING_SET = sig
.. end
module type STRING_LIST = GEN_STRING_SET
with type t = string list
Complex values indexed by strings
module type INDEXED_VAL = sig
.. end
option interface
module type Parameter_input = sig
.. end
Minimal signature to implement for each parameter corresponding to an
option on the command line argument.
module type Parameter_input_with_arg = sig
.. end
Minimal signature to implement for each parameter corresponding to an
option on the command line argument which requires an argument.
module type COMPLEX_VALUE = sig
.. end
input signature for IndexedVal
module type S = sig
.. end
module type General_services = sig
.. end
Configuration of functor applications generating parameters
You can apply the below functions juste before applying one of the functors
provided by the functor Register
and generating a new parameter.
val set_cmdline_stage : Cmdline.stage -> unit
Set the stage where the option corresponding to the parameter is
recognized. Default is Cmdline.Configuring
.
Since Beryllium-20090601-beta1
val do_not_journalize : unit -> unit
Call this function in order to not journalize the parameter.
Since Beryllium-20090601-beta1
val do_not_projectify : unit -> unit
Do not projectify the parameter.
Since Beryllium-20090601-beta1
val register_kernel : unit -> unit
To be called just before
Plugin.Register
in order to activate a
special mode corresponding to registering some parts of the Frama-C
kernel and not a standard plug-in.
Since Beryllium-20090601-beta1
val set_negative_option_name : string -> unit
For boolean parameters, set the name of the negative
option generating automatically from the positive one (the given option
name). The default used value prefixes the given option name by "-no".
Assume that the given string is a valid option name or empty.
If it is empty, no negative option is created.
Since Beryllium-20090601-beta1
val set_negative_option_descr : string -> unit
For boolean parameters, set the description of the negative
option generating automatically.
Assume that the given string is non empty.
Since Beryllium-20090601-beta1
val set_optional_descr : (unit, Format.formatter, unit) Pervasives.format -> unit
Concatenate an additional description just after the default one.
Since Beryllium-20090601-beta1
val set_group : group -> unit
Change the group of the parameter.
Since Beryllium-20090901
val set_module_name : string -> unit
This function must be call if and only if the next functor application
generates a new **kernel** parameter. So this function should not be used
by plug-in developer.
The given argument must be the module name corresponding to the
parameter.
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 descr : string
description of the module. Free-form text.
end
) ->
General_services
Functors for generating plug-ins parameters.
Handling groups of parameters
type 'a
option_accessor = private {
|
get : unit -> 'a ; |
|
set : 'a -> unit ; |
|
is_set : unit -> bool ; |
}
type
kind = private
type
parameter = private {
|
o_name : string ; |
|
o_descr : string ; |
|
o_kind : kind ; |
}
Since Beryllium-20090901
type
plugin = private {
}
Since Beryllium-20090901
val iter_on_plugins : (plugin -> unit) -> unit
Iterate on each registered plug-ins.
Since Beryllium-20090901
val get_selection : unit -> Project.Selection.t
val dynamic_funname : modname:string -> funname:string -> statename:string -> string
Not for casual users.