why3session_lib.mli 2.55 KB
Newer Older
Andrei Paskevich's avatar
Andrei Paskevich committed
1 2 3
(********************************************************************)
(*                                                                  *)
(*  The Why3 Verification Platform   /   The Why3 Development Team  *)
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
4
(*  Copyright 2010-2014   --   INRIA - CNRS - Paris-Sud University  *)
Andrei Paskevich's avatar
Andrei Paskevich committed
5 6 7 8 9 10
(*                                                                  *)
(*  This software is distributed under the terms of the GNU Lesser  *)
(*  General Public License version 2.1, with the special exception  *)
(*  on linking described in file LICENSE.                           *)
(*                                                                  *)
(********************************************************************)
11 12 13 14

open Why3
open Whyconf

15 16
val verbose: Debug.flag

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
type spec_list = (Arg.key * Arg.spec * Arg.doc) list

type cmd =
    {
      cmd_spec : spec_list;
      cmd_desc : string;
      cmd_name : string;
      cmd_run  : unit -> unit;
    }



(** {2 Anonymous argument} *)
val iter_files : (string -> unit) -> unit
val anon_fun : Arg.anon_fun

(** print_version *)
val print_version : unit -> unit


(** {2 Spec for version, debug} *)
38
(* val simple_spec : spec_list *)
39

MARCHE Claude's avatar
MARCHE Claude committed
40
(*
Andrei Paskevich's avatar
Andrei Paskevich committed
41
val read_simple_spec : unit -> bool
42
(** return if we must exit *)
MARCHE Claude's avatar
MARCHE Claude committed
43
*)
44

45 46
(** {2 Spec for configuration, loadpath} *)
val common_options : spec_list
47 48 49 50 51

val read_env_spec : unit -> Env.env * Whyconf.config * bool
(** read_simple_spec also *)

val read_update_session :
52 53 54
  allow_obsolete:bool -> Why3.Env.env ->
  Why3.Whyconf.config -> string ->
  unit Why3.Session.env_session * bool * bool
55 56

(** {2 Spec for filtering } *)
57
type filter_prover
58 59

val read_opt_prover : string -> filter_prover
60 61
val prover_of_filter_prover : config -> filter_prover -> Why3.Whyconf.prover
val provers_of_filter_prover : config -> filter_prover -> Why3.Whyconf.Sprover.t
62

63
type filters
64 65 66 67 68

val filter_spec : spec_list

val read_filter_spec : Whyconf.config -> filters * bool

69 70 71
val theory_iter_proof_attempt_by_filter :
  filters ->
  ('key Session.proof_attempt -> unit) -> 'key Session.theory -> unit
72 73 74
val session_iter_proof_attempt_by_filter :
  filters ->
  ('key Session.proof_attempt -> unit) -> 'key Session.session -> unit
75 76 77 78 79


(* quite ad-hoc *)
type filter_three = | FT_Yes | FT_No | FT_All
val set_filter_verified_goal : filter_three -> unit
80 81 82 83

(** force obsolete *)
val opt_force_obsolete : bool ref
val force_obsolete_spec : spec_list
84 85 86 87 88 89 90 91


(** ask yes/no question to the user *)
val ask_yn : unit -> bool

val ask_yn_nonblock : callback:(bool -> unit) -> (unit -> bool)
(** call the callback when an answer have been given,
    return true if it must be retried *)