X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2FmQueryUtil.ml;h=e8344b0d60daa3fdb3c94bc833c1d220ba4a2296;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=30e6688ee79196671f9d69894fa376f27678318f;hpb=68e62a195d6228befb75b4e2edd59bc58b1cdb0c;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQueryUtil.ml b/helm/ocaml/mathql_interpreter/mQueryUtil.ml index 30e6688ee..e8344b0d6 100644 --- a/helm/ocaml/mathql_interpreter/mQueryUtil.ml +++ b/helm/ocaml/mathql_interpreter/mQueryUtil.ml @@ -37,7 +37,7 @@ let txt_str out s = out ("\"" ^ s ^ "\"") let txt_path out p = out "/"; txt_list out (txt_str out) "/" p -let text_of_query out x sep = +let text_of_query out sep x = let module M = MathQL in let txt_path_list l = txt_list out (txt_path out) ", " l in let txt_svar sv = out ("%" ^ sv) in @@ -116,46 +116,46 @@ let text_of_query out x sep = | M.Const s -> txt_str out s | M.Set l -> txt_val_list l | M.VVar vv -> txt_vvar vv - | M.Dot av p -> txt_avar av; out "."; txt_path out p - | M.Proj op x -> out "proj "; txt_opt_path op; txt_set x - | M.Ex b x -> out "ex "; txt_val x + | M.Dot (av,p) -> txt_avar av; out "."; txt_path out p + | M.Proj (op,x) -> out "proj "; txt_opt_path op; txt_set x + | M.Ex (b,x) -> out "ex "; txt_val x (* | M.Ex b x -> out "ex ["; txt_list out txt_avar "," b; out "] "; txt_val x *) | M.Not x -> out "not "; txt_val x - | M.Test k x y -> out "("; txt_val x; txt_test k; txt_val y; out ")" + | M.Test (k,x,y) -> out "("; txt_val x; txt_test k; txt_val y; out ")" | M.StatVal x -> out "stat "; txt_val x | M.Count x -> out "count "; txt_val x - | M.Align s x -> out "align "; txt_str out s; out " in "; txt_val x + | M.Align (s,x) -> out "align "; txt_str out s; out " in "; txt_val x and txt_set = function | M.Empty -> out "empty" | M.SVar sv -> txt_svar sv | M.AVar av -> txt_avar av - | M.Property q0 q1 q2 mc ct cfl xl b x -> + | M.Property (q0,q1,q2,mc,ct,cfl,xl,b,x) -> out "property "; txt_qualif q0 q1 q2; main mc; txt_istrue ct; txt_list out txt_isfalse "" cfl; txt_exp_list xl; out " of "; pattern b; txt_val x - | M.Bin k x y -> out "("; txt_set x; txt_bin k; txt_set y; + | M.Bin (k,x,y) -> out "("; txt_set x; txt_bin k; txt_set y; out ")" - | M.LetSVar sv x y -> out "let "; txt_svar sv; out " be "; + | M.LetSVar (sv,x,y) -> out "let "; txt_svar sv; out " be "; txt_set x; out " in "; txt_set y - | M.LetVVar vv x y -> out "let "; txt_vvar vv; out " be "; + | M.LetVVar (vv,x,y) -> out "let "; txt_vvar vv; out " be "; txt_val x; out " in "; txt_set y - | M.Select av x y -> out "select "; txt_avar av; out " from "; + | M.Select (av,x,y) -> out "select "; txt_avar av; out " from "; txt_set x; out " where "; txt_val y | M.Subj x -> out "subj "; txt_val x - | M.For k av x y -> out "for "; txt_avar av; out " in "; + | M.For (k,av,x,y) -> out "for "; txt_avar av; out " in "; txt_set x; txt_gen k; txt_set y - | M.If x y z -> out "if "; txt_val x; out " then "; + | M.If (x,y,z) -> out "if "; txt_val x; out " then "; txt_set y; out " else "; txt_set z - | M.Add d g x -> out "add "; txt_distr d; txt_grp g; + | M.Add (d,g,x) -> out "add "; txt_distr d; txt_grp g; out " in "; txt_set x - | M.Log a b x -> out "log "; txt_log a b; txt_set x + | M.Log (a,b,x) -> out "log "; txt_log a b; txt_set x | M.StatQuery x -> out "stat "; txt_set x - | M.Keep b l x -> out "keep "; txt_allbut b; txt_path_list l; + | M.Keep (b,l,x) -> out "keep "; txt_allbut b; txt_path_list l; txt_set x in txt_set x; out sep -let text_of_result out x sep = +let text_of_result out sep x = let txt_attr = function | (p, []) -> txt_path out p | (p, l) -> txt_path out p; out " = "; txt_list out (txt_str out) ", " l