Skip to content

Commit

Permalink
fixed printing problem where a comma is printed when it should not be…
Browse files Browse the repository at this point in the history
… printed
  • Loading branch information
reb-ddm committed Feb 13, 2025
1 parent f3b223d commit 8c818c7
Showing 1 changed file with 31 additions and 34 deletions.
65 changes: 31 additions & 34 deletions core/KaSa_rep/frontend/handler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -842,43 +842,40 @@ let print_guard_mvbdu_decompose parameters error kappa_handler bdu_handler
let error, bdu_handler, _ =
List.fold_left
(fun (error, bdu_handler, with_comma) mvbdu ->
let error, bdu_handler =
let error, bdu_handler, is_true =
mvbdu_is_true_for_guards parameters bdu_handler error mvbdu
restriction_bdu
let error, bdu_handler, is_true =
mvbdu_is_true_for_guards parameters bdu_handler error mvbdu
restriction_bdu
in
let error, bdu_handler, variables =
Ckappa_sig.Views_bdu.variables_list_of_mvbdu parameters bdu_handler
error mvbdu
in
let error, bdu_handler, nr_variables =
Ckappa_sig.Views_bdu.nbr_variables parameters bdu_handler error
variables
in
if is_true then
error, bdu_handler, with_comma
else (
let () =
if with_comma then
Loggers.fprintf (Remanent_parameters.get_logger parameters) ","
in
let error, bdu_handler, variables =
Ckappa_sig.Views_bdu.variables_list_of_mvbdu parameters bdu_handler
error mvbdu

let () =
if nr_variables > 1 then
Loggers.fprintf (Remanent_parameters.get_logger parameters) "("
in
let error, bdu_handler, nr_variables =
Ckappa_sig.Views_bdu.nbr_variables parameters bdu_handler error
variables
let error, bdu_handler =
print_guard_mvbdu parameters error kappa_handler bdu_handler
~with_comma:false mvbdu
in
if is_true then
error, bdu_handler
else (
let () =
if with_comma then
Loggers.fprintf (Remanent_parameters.get_logger parameters) ","
in

let () =
if nr_variables > 1 then
Loggers.fprintf (Remanent_parameters.get_logger parameters) "("
in
let error, bdu_handler =
print_guard_mvbdu parameters error kappa_handler bdu_handler
~with_comma:false mvbdu
in
let () =
if nr_variables > 1 then
Loggers.fprintf (Remanent_parameters.get_logger parameters) ")"
in
error, bdu_handler
)
in
error, bdu_handler, true)
let () =
if nr_variables > 1 then
Loggers.fprintf (Remanent_parameters.get_logger parameters) ")"
in
error, bdu_handler, true
))
(error, bdu_handler, with_comma)
mvbdu_list
in
Expand Down

0 comments on commit 8c818c7

Please sign in to comment.