Commit a6fb3775 authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

rename Debug.register_flag into register_info_flag

and Debug.register_stop_flag into register_flag. While information
flags (selectable by --debug-all) are more common, it is safer to
treat a generic debug flag as behaviour-changing by default.
parent 3a8e66bf
...@@ -83,9 +83,9 @@ open Format ...@@ -83,9 +83,9 @@ open Format
type callback = tool_id -> prob_id -> type callback = tool_id -> prob_id ->
task -> int -> proof_attempt_status -> unit task -> int -> proof_attempt_status -> unit
let debug_call = Debug.register_flag "call" let debug_call = Debug.register_info_flag "call"
~desc:"Show when call to provers are done" ~desc:"Show when call to provers are done"
let debug = Debug.register_flag "bench_core" let debug = Debug.register_info_flag "bench_core"
~desc:"About the scheduling" ~desc:"About the scheduling"
......
...@@ -28,7 +28,7 @@ module BenchUtil = Bench.BenchUtil ...@@ -28,7 +28,7 @@ module BenchUtil = Bench.BenchUtil
let load_driver = Env.Wenv.memoize 2 (fun env -> let load_driver = Env.Wenv.memoize 2 (fun env ->
memo_string 10 (Driver.load_driver env)) memo_string 10 (Driver.load_driver env))
let debug = Debug.register_flag "benchdb" let debug = Debug.register_info_flag "benchdb"
~desc:"About the communication from the database" ~desc:"About the communication from the database"
type path = type path =
......
...@@ -29,7 +29,7 @@ open Trans ...@@ -29,7 +29,7 @@ open Trans
module B = Bench module B = Bench
module C = Call_provers module C = Call_provers
let debug = Debug.register_flag "main" let debug = Debug.register_info_flag "main"
~desc:"About initialization of the bench" ~desc:"About initialization of the bench"
let usage_msg = sprintf let usage_msg = sprintf
......
...@@ -168,7 +168,7 @@ let forget_all printer = ...@@ -168,7 +168,7 @@ let forget_all printer =
(** Sanitizers *) (** Sanitizers *)
let unsanitizable = Debug.register_flag "unsanitizable" let unsanitizable = Debug.register_info_flag "unsanitizable"
~desc:"About@ the@ sanitazing@ during@ the@ pretty-printing." ~desc:"About@ the@ sanitazing@ during@ the@ pretty-printing."
let char_to_alpha c = match c with let char_to_alpha c = match c with
......
...@@ -28,9 +28,9 @@ open Decl ...@@ -28,9 +28,9 @@ open Decl
open Theory open Theory
open Task open Task
let debug_print_labels = Debug.register_flag "print_labels" let debug_print_labels = Debug.register_info_flag "print_labels"
~desc:"Print@ labels@ of@ identifiers@ and@ expressions." ~desc:"Print@ labels@ of@ identifiers@ and@ expressions."
let debug_print_locs = Debug.register_flag "print_locs" let debug_print_locs = Debug.register_info_flag "print_locs"
~desc:"Print@ locations@ of@ identifiers@ and@ expressions." ~desc:"Print@ locations@ of@ identifiers@ and@ expressions."
let iprinter,aprinter,tprinter,pprinter = let iprinter,aprinter,tprinter,pprinter =
......
...@@ -27,7 +27,7 @@ open Decl ...@@ -27,7 +27,7 @@ open Decl
open Theory open Theory
open Task open Task
let debug = Debug.register_flag "transform" let debug = Debug.register_info_flag "transform"
~desc:"About@ which@ transformations@ are@ applied@ and@ with@ which@ \ ~desc:"About@ which@ transformations@ are@ applied@ and@ with@ which@ \
arguments, ie metas." arguments, ie metas."
......
...@@ -55,7 +55,7 @@ open Whyconf ...@@ -55,7 +55,7 @@ open Whyconf
module Wc = Whyconf module Wc = Whyconf
open Rc open Rc
let debug = Debug.register_flag "autodetect" let debug = Debug.register_info_flag "autodetect"
~desc:"About@ the@ autodetection@ of@ external@ provers." ~desc:"About@ the@ autodetection@ of@ external@ provers."
(* auto-detection of provers *) (* auto-detection of provers *)
......
...@@ -122,7 +122,7 @@ let rec grep out l = match l with ...@@ -122,7 +122,7 @@ let rec grep out l = match l with
with Not_found -> grep out l end with Not_found -> grep out l end
let debug = Debug.register_flag "call_prover" let debug = Debug.register_info_flag "call_prover"
~desc:"About@ external@ prover@ calls@ and@ results." ~desc:"About@ external@ prover@ calls@ and@ results."
type post_prover_call = unit -> prover_result type post_prover_call = unit -> prover_result
......
...@@ -24,7 +24,7 @@ open Util ...@@ -24,7 +24,7 @@ open Util
open Rc open Rc
open Whyconf open Whyconf
let debug = Debug.register_flag "ide_info" let debug = Debug.register_info_flag "ide_info"
~desc:"About why3ide." ~desc:"About why3ide."
let () = Debug.set_flag debug let () = Debug.set_flag debug
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
open Ident open Ident
let flag = Debug.register_flag "glob" let flag = Debug.register_info_flag "glob"
~desc:"TODO, used in parsing?" ~desc:"TODO, used in parsing?"
let () = Debug.unset_flag flag (* make sure it is unset by default *) let () = Debug.unset_flag flag (* make sure it is unset by default *)
......
...@@ -77,9 +77,9 @@ let () = Exn_printer.register (fun fmt e -> match e with ...@@ -77,9 +77,9 @@ let () = Exn_printer.register (fun fmt e -> match e with
fprintf fmt "Unbound symbol '%a'" (print_list dot pp_print_string) sl fprintf fmt "Unbound symbol '%a'" (print_list dot pp_print_string) sl
| _ -> raise e) | _ -> raise e)
let debug_parse_only = Debug.register_stop_flag "parse_only" let debug_parse_only = Debug.register_flag "parse_only"
~desc:"Stop@ after@ the@ parsing." ~desc:"Stop@ after@ the@ parsing."
let debug_type_only = Debug.register_stop_flag "type_only" let debug_type_only = Debug.register_flag "type_only"
~desc:"Stop@ after@ the@ typing." ~desc:"Stop@ after@ the@ typing."
(** Environments *) (** Environments *)
......
...@@ -29,7 +29,7 @@ open Typing ...@@ -29,7 +29,7 @@ open Typing
open Ptree open Ptree
open Pgm_module open Pgm_module
let debug_extraction = Debug.register_stop_flag "extraction" let debug_extraction = Debug.register_flag "extraction"
~desc:"for internal use" ~desc:"for internal use"
exception ClashModule of string exception ClashModule of string
......
...@@ -27,9 +27,9 @@ open Pretty ...@@ -27,9 +27,9 @@ open Pretty
open Pgm_types.T open Pgm_types.T
open Pgm_ttree open Pgm_ttree
let debug_print_labels = Debug.register_flag "print_labels" let debug_print_labels = Debug.register_info_flag "print_labels"
~desc:"Print@ labels@ of@ identifiers@ and@ expressions." ~desc:"Print@ labels@ of@ identifiers@ and@ expressions."
let debug_print_locs = Debug.register_flag "print_locs" let debug_print_locs = Debug.register_info_flag "print_locs"
~desc:"Print@ locations@ of@ identifiers@ and@ expressions." ~desc:"Print@ locations@ of@ identifiers@ and@ expressions."
(* pretty-printing (for debugging) *) (* pretty-printing (for debugging) *)
......
...@@ -34,7 +34,7 @@ open Pgm_types ...@@ -34,7 +34,7 @@ open Pgm_types
open Pgm_types.T open Pgm_types.T
open Pgm_module open Pgm_module
let debug = Debug.register_flag "whyml_typing" let debug = Debug.register_info_flag "whyml_typing"
~desc:"Print@ details@ of@ program@ typechecking." ~desc:"Print@ details@ of@ program@ typechecking."
let is_debug () = Debug.test_flag debug let is_debug () = Debug.test_flag debug
......
...@@ -33,7 +33,7 @@ open Pgm_types ...@@ -33,7 +33,7 @@ open Pgm_types
open Pgm_types.T open Pgm_types.T
open Pgm_module open Pgm_module
let debug = Debug.register_flag "whyml_wp" let debug = Debug.register_info_flag "whyml_wp"
~desc:"Print@ details@ of@ verification@ condition@ generation." ~desc:"Print@ details@ of@ verification@ condition@ generation."
(* mutable fields *) (* mutable fields *)
......
...@@ -28,7 +28,7 @@ module PHprover = Whyconf.Hprover ...@@ -28,7 +28,7 @@ module PHprover = Whyconf.Hprover
module C = Whyconf module C = Whyconf
module Tc = Termcode module Tc = Termcode
let debug = Debug.register_flag "session" let debug = Debug.register_info_flag "session"
~desc:"About the why3 session creation, reading and writing." ~desc:"About the why3 session creation, reading and writing."
(** {2 Type definitions} *) (** {2 Type definitions} *)
......
...@@ -22,7 +22,7 @@ open Format ...@@ -22,7 +22,7 @@ open Format
open Session open Session
open Debug open Debug
let debug = register_flag "scheduler" let debug = register_info_flag "scheduler"
~desc:"About@ the@ session@ scheduler@ which@ schedules@ the@ application@ \ ~desc:"About@ the@ session@ scheduler@ which@ schedules@ the@ application@ \
of@ transformtions@ or@ the@ call@ of@ provers." of@ transformtions@ or@ the@ call@ of@ provers."
......
...@@ -31,7 +31,7 @@ let print_shape = Format.pp_print_string ...@@ -31,7 +31,7 @@ let print_shape = Format.pp_print_string
let string_of_shape x = x let string_of_shape x = x
let shape_of_string x = x let shape_of_string x = x
let debug = Debug.register_flag "session_pairing" let debug = Debug.register_info_flag "session_pairing"
~desc:"About@ the@ way@ old@ goals@ recorded@ in@ sessions@ are@ paired@ \ ~desc:"About@ the@ way@ old@ goals@ recorded@ in@ sessions@ are@ paired@ \
with@ new@ goals@ obtained@ after@ modifications@ of@ the@ source@ \ with@ new@ goals@ obtained@ after@ modifications@ of@ the@ source@ \
file." file."
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
let parse_error s = raise (Parse_error s) let parse_error s = raise (Parse_error s)
open Debug open Debug
let debug = register_flag "xml" let debug = register_info_flag "xml"
~desc:"About the xml parsing." ~desc:"About the xml parsing."
} }
......
...@@ -81,10 +81,10 @@ module Mvsl = Stdlib.Map.Make(VsList) ...@@ -81,10 +81,10 @@ module Mvsl = Stdlib.Map.Make(VsList)
module Svsl = Mvsl.Set module Svsl = Mvsl.Set
(**************************** PRINTING ***************************************) (**************************** PRINTING ***************************************)
let debug = Debug.register_flag "induction" let debug = Debug.register_info_flag "induction"
~desc:"About@ the@ transformation@ of@ the@ goal@ using@ induction." ~desc:"About@ the@ transformation@ of@ the@ goal@ using@ induction."
let debug_verbose = Debug.register_flag "induction-verbose" let debug_verbose = Debug.register_info_flag "induction-verbose"
~desc:"Same@ as@ induction, but@ print@ also@ the@ variables, the@ \ ~desc:"Same@ as@ induction, but@ print@ also@ the@ variables, the@ \
heuristics@ and@ the lexicographic@ order@ used." heuristics@ and@ the lexicographic@ order@ used."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment