X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2FmQueryInterpreter.ml;h=511e01c701e5b0eef27802a6aec22628807b80b3;hb=9cbce40d56958c466459b028cf250441ec29c9fe;hp=7c7ef8a5631482df5da6ff2d6db8d3271f160f87;hpb=786284e9dfb25a31aad2161d59cdc5f36657e94a;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml b/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml index 7c7ef8a56..511e01c70 100644 --- a/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml +++ b/helm/ocaml/mathql_interpreter/mQueryInterpreter.ml @@ -55,15 +55,14 @@ let execute h x = if C.set h C.Warn then begin C.log h "MQIExecute: waring: reference to undefined variables: "; - F.text_of_query (C.log h) q "\n" + F.text_of_query (C.log h) "\n" q end in - let subj v = List.map (fun s -> (s, [])) v in let proj v = List.map fst v in let rec eval_query c = function | M.Const r -> r | M.Dot i p -> begin - try subj (List.assoc p (List.assoc i c.groups)) + try U.mql_subj (List.assoc p (List.assoc i c.groups)) with Not_found -> warn (M.Dot i p); [] end | M.Ex l y -> let rec ex_aux h = function @@ -133,7 +132,10 @@ let execute h x = then select_aux t else h :: select_aux t in select_aux (eval_query c x) - | M.Fun p pl xl -> L.exec (eval_query c) h p pl xl + | M.Fun p pl xl -> + let e = {L.eval = eval_query c; L.conn = h} in + L.eval e (F.text_out_spec (C.log h) "\n") + p pl xl and eval_grp c = function | M.Attr gs -> let attr_aux g (p, y) = U.mql_union g [p, proj (eval_query c y)] in