X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2FmQueryInterpreter.ml;h=453b1643ce7fec85eef7483312848fde097f0298;hb=97c2d258a5c524eb5c4b85208899d80751a2c82f;hp=b2bfd445dd59ae71d247bcea7b6800a7a6d90c42;hpb=caf8d6cf32c9a9ec8d3fba0aa912d080ff5f7d52;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml b/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml index b2bfd445d..453b1643c 100644 --- a/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml +++ b/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml @@ -56,7 +56,7 @@ let execute h x = if C.set h C.Warn then begin C.log h "MQIExecute: waring: reference to undefined variables: "; - P.text_of_query (C.log h) q "\n" + P.text_of_query (C.log h) "\n" q end in let rec eval_val c = function @@ -131,17 +131,17 @@ let execute h x = | M.Log (_,b,x) -> if b then begin let t = P.start_time () in - P.text_of_query (C.log h) x "\n"; + P.text_of_query (C.log h) "\n" x; let s = P.stop_time t in - if C.set h C.Stat then + if C.set h C.Times then C.log h (Printf.sprintf "Log source: %s\n" s); eval_query c x end else begin let s = (eval_query c x) in let t = P.start_time () in - P.text_of_result (C.log h) s "\n"; + P.text_of_result (C.log h) "\n" s; let r = P.stop_time t in - if C.set h C.Stat then + if C.set h C.Times then C.log h (Printf.sprintf "Log: %s\n" r); s end @@ -196,7 +196,7 @@ let execute h x = let t = P.start_time () in let r = MQIProperty.exec h q1 subj cons_true cons_false exp in let s = P.stop_time t in - if C.set h C.Stat then + if C.set h C.Times then C.log h (Printf.sprintf "Property: %s,%i\n" s (List.length r)); r | M.StatQuery x -> @@ -234,10 +234,12 @@ let execute h x = with Not_found -> warn (M.AVar i); [] in let c = {svars = []; avars = []; groups = []; vvars = []} in - let t = P.start_time () in + let t = P.start_time () in + if C.set h C.Source then P.text_of_query (C.log h) "\n" x; let r = eval_query c x in + if C.set h C.Result then P.text_of_result (C.log h) "\n" r; let s = P.stop_time t in - if C.set h C.Stat then + if C.set h C.Times then C.log h (Printf.sprintf "MQIExecute: %s,%s\n" s (C.string_of_flags (C.flags h))); r