]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/mqint.ml
Relation patched, property added.
[helm.git] / helm / ocaml / mathql_interpreter / mqint.ml
index e9f606b2e897ffec2a8dfb43f645bbe9b66f34da..03247f64f5283c45f4c77940008cfd2c52941345 100644 (file)
@@ -37,12 +37,12 @@ open Dbconn;;
 open Union;;
 open Intersect;;
 open Meet;;
+open Property;;
 open Sub;;
 open Context;;
 open Diff;;
 open Relation;;
 open Func;;
-open Attribute;;
 open Pattern;;
 
 exception BooleExpTrue
@@ -121,17 +121,18 @@ let rec exec_set_exp c = function
          print_endline (string_of_float (Sys.time() -. before) ^ "s");
          flush stdout); 
        res
-   | MathQL.Relation (inv, rop, path, sexp, attl) -> 
+   | MathQL.Relation (inv, rop, path, sexp, assl) -> 
         let before = Sys.time() in
        if ! dbname = postgres_db then
-        (let res = relation_ex inv rop path (exec_set_exp c sexp) [] in (* tolto attl solo pe far compilare, rimetterlo *)
+        (let res = relation_ex inv rop path (exec_set_exp c sexp) assl in
         if ! stat then 
         (print_string ("RELATION " ^ (fst path) ^ " = " ^ string_of_int(List.length res) ^ ": ");
           print_endline (string_of_float (Sys.time() -. before) ^ "s");
           flush stdout);
          res)
+       
        else
-        (let res = relation_galax_ex inv rop path (exec_set_exp c sexp) [] in (* tolto attl solo pe far compilare, rimetterlo *)
+        (let res = relation_galax_ex inv rop path (exec_set_exp c sexp) assl in
          if !stat then
          (print_string ("RELATION-GALAX " ^ (fst path) ^ " = " ^ string_of_int(List.length res) ^ ": ");
           print_endline (string_of_float (Sys.time() -. before) ^ "s");
@@ -207,7 +208,7 @@ and exec_val_exp c = function
    | MathQL.VVar s -> List.assoc s c.vvars                               
    | MathQL.RefOf sexp -> List.map (fun (s,_) -> s) (exec_set_exp c sexp)
    | MathQL.Fun (s, vexp) -> fun_ex s (exec_val_exp c vexp)
-   | MathQL.Property (inv, rop, path, vexp) -> attribute_ex rop path inv (exec_val_exp c vexp) 
+   | MathQL.Property (inv, rop, path, vexp) -> property_ex rop path inv (exec_val_exp c vexp) 
 
 (* valuta una MathQL.set_exp nel contesto vuoto e ritorna un MathQL.resource_set *)
 and execute x =