module Whyconf:sig..end
Managing the configuration of Why3
type config
A configuration linked to an rc file. Whyconf gives access to
every section of the rc file (Whyconf.User.get_section,
Whyconf.User.set_section, Whyconf.User.get_family,
Whyconf.User.set_family) but the section main and the family prover
which are dealt by it (Whyconf.get_main, Whyconf.set_main,
Whyconf.get_provers, Whyconf.set_provers)
exception ConfigFailure of string * string
exception DuplicateShortcut of string
val read_config : string option -> configread_config conf_file :
Rc.CannotOpen is raised,WHY3CONFIG environment
variable exists, then the above steps are executed with
the content of the variable (possibly empty).WHY3CONFIG are present, the file
$HOME/.why3.conf (or $USERPROFILE/.why3.conf under
Windows) is checked for existence:
val init_config : ?extra_config:string list -> string option -> configinit_config ?extra_config conf_file
adds the automatically generated part of the configuration, and loads plugins
val read_config_rc : string option -> string * Rc.tread_config_rc conf_file same rule than Whyconf.init_config but just returned
the parsed Rc file
val add_extra_config : config -> string -> configadd_extra_config config filename merges the content of filename
into config
val empty_rc : Rc.t
val save_config : config -> unitsave_config config save the configuration
val default_config : string -> config default_config filename create a default configuration which is going
to be saved in filename
val get_conf_file : config -> stringget_conf_file config get the rc file corresponding to this
configuration
val rc_of_config : config -> Rc.ttype main
val get_main : config -> mainget_main config get the main section stored in the Rc file
val set_main : config -> main -> configset_main config main replace the main section by the given one
val set_stdlib : bool -> config -> configSet if the standard library should be added to loadpath
val set_load_default_plugins : bool -> config -> configSet if the plugins in the default path should be loaded
val libdir : main -> string
val set_libdir : main -> string -> main
val datadir : main -> string
val set_datadir : main -> string -> main
val loadpath : main -> string list
val set_loadpath : main -> string list -> main
val timelimit : main -> float
val memlimit : main -> int
val running_provers_max : main -> int
val set_limits : main -> float -> int -> int -> main
val stdlib_path : string Stdlib.ref
val default_editor : main -> stringEditor name used when no specific editor is known for a prover
val set_default_editor : main -> string -> main
val plugins : main -> string list
val pluginsdir : main -> string
val set_plugins : main -> string list -> main
val add_plugin : main -> string -> main
val load_plugins : main -> unittype prover = {
|
prover_name : |
|
prover_version : |
|
prover_altern : |
}
record of necessary data for a given external prover
val print_prover : Stdlib.Format.formatter -> prover -> unit
val print_prover_parseable_format : Stdlib.Format.formatter -> prover -> unit
val prover_parseable_format : prover -> stringPrinter for prover
module Prover:OrderedHashedTypewith type t = prover
module Mprover:Extmap.Swith type key = prover
module Sprover:Extset.Swith module M = Mprover
module Hprover:Exthtbl.Swith type key = prover
type config_prover = {
|
prover : |
|
command : |
|
command_steps : |
|
driver : |
|
in_place : |
|
editor : |
|
interactive : |
|
extra_options : |
|
extra_drivers : |
}
val get_complete_command : config_prover -> with_steps:bool -> stringadd the extra_options to the command
val get_provers : config -> config_prover Mprover.tget_provers config get the prover family stored in the Rc file. The
keys are the unique ids of the prover (argument of the family)
val get_prover_config : config -> prover -> config_proverget_prover_config config prover gets the prover config as stored in
the config. Raise Not_found if the prover does not exists in the config.
val set_provers : config ->
?shortcuts:prover Wstdlib.Mstr.t ->
config_prover Mprover.t -> configset_provers config provers replace all the family prover by the
one given
val add_provers : config ->
config_prover Mprover.t ->
prover Wstdlib.Mstr.t -> configadd_provers config provers shortcuts augments the prover family
of config by the one given in provers, and with the given
shortcuts. In case a new prover has the same name, version and
alternative of an old one, the old one is kept. Similarly, if a new
shortcut is identical to an old one, the old one is kept.
val is_prover_known : config -> prover -> booltest if a prover is detected
val get_prover_shortcuts : config -> prover Wstdlib.Mstr.treturn the prover shortcuts
val set_prover_shortcuts : config -> prover Wstdlib.Mstr.t -> configset the prover shortcuts
type config_editor = {
|
editor_name : |
|
editor_command : |
|
editor_options : |
}
module Meditor:Extmap.Swith type key = string
val set_editors : config -> config_editor Meditor.t -> configreplace the set of editors
val get_editors : config -> config_editor Meditor.treturns the set of editors
val editor_by_id : config -> string -> config_editorreturn the configuration of the editor if found, otherwise raise
Not_found
val set_prover_editors : config -> string Mprover.t -> config
val get_prover_editors : config -> string Mprover.t
val get_prover_editor : config -> prover -> stringprover upgrade policy
type prover_upgrade_policy =
| |
CPU_keep |
| |
CPU_upgrade of |
| |
CPU_duplicate of |
| |
CPU_remove |
val print_prover_upgrade_policy : Stdlib.Format.formatter -> prover_upgrade_policy -> unit
val set_prover_upgrade_policy : config ->
prover -> prover_upgrade_policy -> configset_prover_upgrade c p cpu sets or updates the policy to follow if the
prover p is absent from the system
val get_prover_upgrade_policy : config -> prover -> prover_upgrade_policyget_prover_upgrade config returns a map providing the policy to
follow for each absent prover (if it has already been decided
by the user and thus stored in the config)
val get_policies : config -> prover_upgrade_policy Mprover.t
val set_policies : config ->
prover_upgrade_policy Mprover.t -> configstrategies
type config_strategy = {
|
strategy_name : |
|
strategy_desc : |
|
strategy_code : |
|
strategy_shortcut : |
}
val get_strategies : config -> config_strategy Wstdlib.Mstr.t
val add_strategy : config -> config_strategy -> config
type filter_prover
filter prover
val mk_filter_prover : ?version:string -> ?altern:string -> string -> filter_prover
val print_filter_prover : Stdlib.Format.formatter -> filter_prover -> unit
val parse_filter_prover : string -> filter_proverparse the string representing a filter_prover:
regexp must start with ^. Partial match will be used.
val filter_prover_with_shortcut : config -> filter_prover -> filter_proverresolve prover shortcut in filter
val filter_prover : filter_prover -> prover -> booltest if the prover match the filter prover
val filter_provers : config ->
filter_prover -> config_prover Mprover.tGet all the provers that match this filter
exception ProverNotFound of config * filter_prover
exception ProverAmbiguity of config * filter_prover
* config_prover Mprover.t
exception ParseFilterProver of string
val filter_one_prover : config -> filter_prover -> config_proverfind the unique prover that verifies the filter. If it doesn't exist,
raise ProverNotFound or ProverAmbiguity
val why3_regexp_of_string : string -> Re.Str.regexpmodule User:sig..end
module type Command =functor (*:sig
end) ->sig..end
val commands : (module Whyconf.Command) Wstdlib.Hstr.t
val register_command : string -> (module Whyconf.Command) -> unit
module Args:sig..end
val unknown_to_known_provers : config_prover Mprover.t ->
prover ->
prover list * prover list * prover listreturn others, same name, same version