Frama-C API - Cmdline
Command line parsing.
Stage configurations
(* ************************************************************************** *)
Frama-C uses several stages for parsing its command line. Each of them may be customized.
type stage =
| Early
(*Initial stage for very specific almost hard-coded options. Do not use it.
*)| Extending
(*Before loading plug-ins. Run only once.
*)| Extended
(*The stage where plug-ins are loaded. It is also the first stage each time the Frama-C main loop is run (e.g. after each "-then").
*)| Exiting
(*Run once when exiting Frama-C.
*)| Loading
(*After
*)Extended
, the stage where a previous Frama-C internal states is restored (e.g. the one specified by -load or by running the journal).| Configuring
(*The stage where all the parameters which were not already set may be modified to take into account cmdline options. Just after this stage, Frama-C will run the plug-in mains.
*)
The different stages, from the first to be executed to the last one.
Register an action to be executed at the end of the early stage.
Register an action to be executed during the extending stage.
Register an action to be executed at the end of the extended stage.
val nop : exit
val run_after_exiting_stage : (unit -> exit) -> unit
Register an action to be executed at the end of the exiting stage. The guarded action must finish by exit n
.
Register an action to be executed at the end of the loading stage.
To be call if one action is going to run after the loading stage. It is not necessary to call this function if the running action is set by an option put on the command line.
Register an action to be executed at the end of the configuring stage.
Register an action to be executed just after setting the files put on the command line. The argument of the function is the list of files.
Register a hook executed whenever Frama-C exits without error (the exit code is 0).
Register a hook executed whenever Frama-C exits with error (the exit code is greater than 0). The argument of the hook is the exception at the origin of the error.
module Group : sig ... end
Group of command line options.