Skip to content

Commit 0c07514

Browse files
committed
Remove debug_warnings
1 parent 9bce7a9 commit 0c07514

File tree

8 files changed

+6
-30
lines changed

8 files changed

+6
-30
lines changed

src/bin/js/options_interface.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ let set_options r =
113113
set_options_opt Options.set_debug_uf r.debug_uf;
114114
set_options_opt Options.set_debug_unsat_core r.debug_unsat_core;
115115
set_options_opt Options.set_debug_use r.debug_use;
116-
set_options_opt Options.set_debug_warnings r.debug_warnings;
117116
set_options_opt Options.set_rule r.rule;
118117

119118
set_options_opt Options.set_case_split_policy

src/bin/js/worker_interface.ml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ type options = {
181181
debug_uf : bool option;
182182
debug_unsat_core : bool option;
183183
debug_use : bool option;
184-
debug_warnings : bool option;
185184
rule : int option;
186185

187186
case_split_policy : case_split_policy option;
@@ -281,7 +280,6 @@ let init_options () = {
281280
debug_uf = None;
282281
debug_unsat_core = None;
283282
debug_use = None;
284-
debug_warnings = None;
285283
rule = None;
286284

287285
case_split_policy = None;
@@ -395,12 +393,11 @@ let opt_dbg3_encoding =
395393
conv
396394
(fun dbg3 -> dbg3)
397395
(fun dbg3 -> dbg3)
398-
(obj5
396+
(obj4
399397
(opt "debug_types" bool)
400398
(opt "debug_uf" bool)
401399
(opt "debug_unsat_core" bool)
402400
(opt "debug_use" bool)
403-
(opt "debug_warnings" bool)
404401
)
405402

406403
let opt1_encoding =
@@ -551,8 +548,7 @@ let options_to_json opt =
551548
(opt.debug_types,
552549
opt.debug_uf,
553550
opt.debug_unsat_core,
554-
opt.debug_use,
555-
opt.debug_warnings)
551+
opt.debug_use)
556552
in
557553
let all_opt1 =
558554
(opt.rule,
@@ -677,8 +673,7 @@ let options_from_json options =
677673
let (debug_types,
678674
debug_uf,
679675
debug_unsat_core,
680-
debug_use,
681-
debug_warnings) = dbg_opt3 in
676+
debug_use) = dbg_opt3 in
682677
let (rule,
683678
case_split_policy,
684679
enable_adts_cs,
@@ -762,7 +757,6 @@ let options_from_json options =
762757
debug_uf;
763758
debug_unsat_core;
764759
debug_use;
765-
debug_warnings;
766760
rule;
767761
case_split_policy;
768762
enable_adts_cs;

src/bin/js/worker_interface.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ type options = {
7878
debug_uf : bool option;
7979
debug_unsat_core : bool option;
8080
debug_use : bool option;
81-
debug_warnings : bool option;
8281
rule : int option;
8382

8483
case_split_policy : case_split_policy option;

src/lib/structures/expr.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,8 +1146,7 @@ let mk_forall_ter =
11461146
let q = match form_view lem with Lemma q -> q | _ -> assert false in
11471147
assert (equal q.main f (* should be true *));
11481148
if compare_quant q new_q <> 0 then raise Exit;
1149-
Printer.print_wrn ~warning:(Options.get_debug_warnings ())
1150-
"(sub) axiom %s replaced with %s" name q.name;
1149+
Printer.print_wrn "(sub) axiom %s replaced with %s" name q.name;
11511150
lem
11521151
with Not_found | Exit ->
11531152
let d = new_q.main.depth in (* + 1 ?? *)

src/lib/util/options.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ let debug_types = ref false
175175
let debug_uf = ref false
176176
let debug_unsat_core = ref false
177177
let debug_use = ref false
178-
let debug_warnings = ref false
179178
let debug_commands = ref false
180179
let debug_optimize = ref false
181180
let rule = ref (-1)
@@ -204,7 +203,6 @@ let set_debug_types b = debug_types := b
204203
let set_debug_uf b = debug_uf := b
205204
let set_debug_unsat_core b = debug_unsat_core := b
206205
let set_debug_use b = debug_use := b
207-
let set_debug_warnings b = debug_warnings := b
208206
let set_debug_commands b = debug_commands := b
209207
let set_debug_optimize b = debug_optimize := b
210208
let set_rule b = rule := b
@@ -233,7 +231,6 @@ let get_debug_types () = !debug_types
233231
let get_debug_uf () = !debug_uf
234232
let get_debug_unsat_core () = !debug_unsat_core
235233
let get_debug_use () = !debug_use
236-
let get_debug_warnings () = !debug_warnings
237234
let get_debug_commands () = !debug_commands
238235
let get_debug_optimize () = !debug_optimize
239236
let get_rule () = !rule

src/lib/util/options.mli

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ val set_debug_unsat_core : bool -> unit
173173
(** Set [debug_use] accessible with {!val:get_debug_use} *)
174174
val set_debug_use : bool -> unit
175175

176-
(** Set [debug_warnings] accessible with {!val:get_debug_warnings} *)
177-
val set_debug_warnings : bool -> unit
178-
179176
(** Set [debug_commands] accessible with {!val:get_debug_commands} *)
180177
val set_debug_commands : bool -> unit
181178

@@ -465,9 +462,6 @@ val set_used_context_file : string -> unit
465462
(** Get the debugging flag. *)
466463
val get_debug : unit -> bool
467464

468-
(** Get the debugging flag of warnings. *)
469-
val get_debug_warnings : unit -> bool
470-
471465
(** Get the debugging flag of commands. If enabled, Alt-Ergo will display all
472466
the commands that are sent to the solver. *)
473467
val get_debug_commands : unit -> bool

src/lib/util/printer.ml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,10 @@ let print_err ?(flushed=true) ?(header=(Options.get_output_with_headers ()))
227227
end
228228
else Format.ifprintf Format.err_formatter s
229229

230-
let print_wrn ?(flushed=true) ?(header=(Options.get_output_with_headers ()))
231-
?(warning=true) s =
230+
let print_wrn ?(flushed=true) ?(header=(Options.get_output_with_headers ())) s =
232231
if Options.get_warning_as_error () then
233-
print_err ~flushed ~header ~error:warning s
232+
print_err ~flushed ~header ~error:true s
234233
else
235-
if warning then begin
236234
let fmt = Options.Output.get_fmt_diagnostic () in
237235
Format.fprintf fmt "@[<v 0>%s" (pp_smt clean_wrn_print);
238236
if header then
@@ -242,8 +240,6 @@ let print_wrn ?(flushed=true) ?(header=(Options.get_output_with_headers ()))
242240
Format.fprintf fmt "@[<v 10>[Warning] " ;
243241
if flushed || Options.get_output_with_forced_flush ()
244242
then Format.kfprintf flush fmt s else Format.fprintf fmt s
245-
end
246-
else Format.ifprintf Format.err_formatter s
247243

248244
let print_dbg ?(flushed=true) ?(header=(Options.get_output_with_headers ()))
249245
?(module_name="") ?(function_name="") s =

src/lib/util/printer.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@ val print_err :
4747

4848
(** Print warning message on the warning formatter accessible with
4949
{!val:Options.get_fmt_wrn} and set by default to stderr.
50-
Prints only if warning (true by default) is true.
5150
If header is set, prints a header "[Warning]".
5251
The wrn formatter is flushed after the print if flushed is set *)
5352
val print_wrn :
5453
?flushed:bool ->
5554
?header:bool ->
56-
?warning:bool ->
5755
('a, Format.formatter, unit) format -> 'a
5856

5957
(** Print debug message on the debug formatter accessible with

0 commit comments

Comments
 (0)