whyconf.mli 2.28 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
(**************************************************************************)
(*                                                                        *)
(*  Copyright (C) 2010-                                                   *)
(*    Francois Bobot                                                      *)
(*    Jean-Christophe Filliatre                                           *)
(*    Johannes Kanig                                                      *)
(*    Andrei Paskevich                                                    *)
(*                                                                        *)
(*  This software is free software; you can redistribute it and/or        *)
(*  modify it under the terms of the GNU Library General Public           *)
(*  License version 2.1, with the special exception on linking            *)
(*  described in file LICENSE.                                            *)
(*                                                                        *)
(*  This software is distributed in the hope that it will be useful,      *)
(*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *)
(*                                                                        *)
(**************************************************************************)

open Util

type config_prover = {
23 24 25
  name    : string;   (* "Alt-Ergo v2.95 (special)" *)
  command : string;   (* "exec why-limit %t %m alt-ergo %f" *)
  driver  : string;   (* "/usr/local/share/why/drivers/ergo-spec.drv" *)
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
}

type config = {
  conf_file : string;       (* "/home/innocent_user/.why.conf" *)
  loadpath  : string list;  (* "/usr/local/share/why/theories" *)
  timelimit : int option;   (* default prover time limit in seconds *)
  memlimit  : int option;   (* default prover memory limit in megabytes *)
  provers   : config_prover Mstr.t;   (* indexed by short identifiers *)
}

(* if conf_file is not given, tries the following:
   "$WHY_CONFIG"; "./why.conf"; "./.why.conf";
   "$HOME/.why.conf"; "$USERPROFILE/.why.conf" *)

val read_config : ?conf_file:string -> unit -> config

val save_config : config -> unit

(** error reporting *)

type error

exception Error of error

val report : Format.formatter -> error -> unit
MARCHE Claude's avatar
whyrc  
MARCHE Claude committed
51