diff --git a/infer/src/topl/Topl.ml b/infer/src/topl/Topl.ml index 7e57b7c36..5a8ff780a 100644 --- a/infer/src/topl/Topl.ml +++ b/infer/src/topl/Topl.ml @@ -51,8 +51,7 @@ let evaluate_static_guard label (e_fun, arg_ts) = let name = Typ.Procname.hashable_name n in let re = Str.regexp label.ToplAst.procedure_name in let result = Str.string_match re name 0 in - if Config.trace_topl then - tt "match name='%s' re='%s' result=%b@\n" name label.ToplAst.procedure_name result ; + tt "match name='%s' re='%s' result=%b@\n" name label.ToplAst.procedure_name result ; result | _ -> false diff --git a/infer/src/topl/ToplAutomaton.ml b/infer/src/topl/ToplAutomaton.ml index 536c60553..0fdad01f6 100644 --- a/infer/src/topl/ToplAutomaton.ml +++ b/infer/src/topl/ToplAutomaton.ml @@ -56,7 +56,7 @@ let make properties = in Array.of_list (List.dedup_and_sort ~compare:Vname.compare (List.concat_map ~f properties)) in - if Config.trace_topl then Array.iteri ~f:(fun i (p, v) -> tt "state[%d]=(%s,%s)@\n" i p v) states ; + Array.iteri ~f:(fun i (p, v) -> tt "state[%d]=(%s,%s)@\n" i p v) states ; let vindex = index_in (module Vname.Table) states in let transitions : transition array = let f p = @@ -77,9 +77,8 @@ let make properties = in Array.of_list (List.concat_map ~f properties) in - if Config.trace_topl then - Array.iteri transitions ~f:(fun i {source; target; label} -> - tt "transition%d %d -> %d on %s@\n" i source target label.ToplAst.procedure_name ) ; + Array.iteri transitions ~f:(fun i {source; target; label} -> + tt "transition%d %d -> %d on %s@\n" i source target label.ToplAst.procedure_name ) ; let outgoing : tindex list array = let vcount = Array.length states in let a = Array.create ~len:vcount [] in diff --git a/infer/src/topl/ToplUtils.ml b/infer/src/topl/ToplUtils.ml index 52b609bef..543ac482b 100644 --- a/infer/src/topl/ToplUtils.ml +++ b/infer/src/topl/ToplUtils.ml @@ -52,5 +52,6 @@ let is_synthesized = function let debug fmt = - Logging.debug Analysis Verbose "ToplTrace: " ; - Logging.debug Analysis Verbose fmt + let mode = if Config.trace_topl then Logging.Quiet else Logging.Verbose in + Logging.debug Analysis mode "ToplTrace: " ; + Logging.debug Analysis mode fmt