]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter_galax/test_intersect.ml
commit of galax mathql interpreter
[helm.git] / helm / ocaml / mathql_interpreter_galax / test_intersect.ml
diff --git a/helm/ocaml/mathql_interpreter_galax/test_intersect.ml b/helm/ocaml/mathql_interpreter_galax/test_intersect.ml
new file mode 100755 (executable)
index 0000000..e86251d
--- /dev/null
@@ -0,0 +1,69 @@
+
+
+
+
+
+open Mathql_semantics;;
+open MathQL;;
+
+(* stampa tutti i documenti che fanno match con un pattern di input *)
+List.iter
+ (function atturi -> print_endline ("output: " ^ atturi))
+  (match Mqint2.execute
+   (MQList
+    (MQIntersect
+     (
+                 (MQSelect
+                   (
+                    (*SELECT*) "uri0",
+                    (*  IN  *) MQUse
+                     (MQPattern
+                     (
+                       Some "cic",
+                       [MQBD; MQBC"Algebra"; MQBD; MQBC "Basics"; MQBD; MQBSS],
+                        []
+                     ),
+                     "$s0"
+                     ),
+      (*WHERE *)   MQIs
+                    (
+                    MQStringSVar "$s0",
+                    MQConclusion
+                    )
+                   )
+                 ),
+                 (MQSelect
+                   (
+                    (*SELECT*) "uri0",
+                    (*  IN  *) MQUse
+                     (MQPattern
+                     (
+                       Some "cic",
+                       [MQBD; MQBC"Algebra"; MQBD; MQBC "Basics"; MQBD; MQBC "max.con"],
+                        []
+                     ),
+                     "$s0"
+                     ),
+      (*WHERE *)   MQIs
+                    (
+                    MQStringSVar "$s0",
+                    MQConclusion
+                    )
+                   )
+                 )               
+     )
+    )
+   )
+   with MQRefs l -> l
+  );
+
+;;
+
+
+
+
+
+
+
+