begin
Mqint.set_database Mqint.postgres_db ;
(* Mqint.init "dbname=helm_mowgli" ; *)
- Mqint.init "host=mowgli.cs.unibo.it dbname=helm_mowgli user=helm" ;
+ (* Mqint.init "host=mowgli.cs.unibo.it dbname=helm_mowgli user=helm" ; *)
+ Mqint.init "host=mowgli.cs.unibo.it dbname=helm_mowgli_new_schema user=helm" ;
end ;
ignore (GtkMain.Main.init ()) ;
initialize_everything () ;
let searchPattern e c t level =
let module M = MathQL in
let module L = MQueryLevels in
+ let mainConclusion =
+ "http://www.cs.unibo.it/helm/schemas/schema-helm#MainConclusion" in
+ let inConclusion =
+ "http://www.cs.unibo.it/helm/schemas/schema-helm#InConclusion" in
let in_path s = (s, []) in
let assign v p = (in_path v, in_path p) in
- let v_pos = M.Const ["MainConclusion"; "InConclusion"] in
+ let v_pos = M.Const [mainConclusion; inConclusion] in
let q_where =
M.Sub
(M.RefOf
else restrict level tail
in
let build_select (r, b, v) =
- let pos = if b then "MainConclusion" else "InConclusion" in
+ let pos = if b then mainConclusion else inConclusion in
M.Select
("uri",
M.Relation (false, M.RefineExact, ("backPointer", []),
let universe = M.Const (List.map uri_of_entry levels) in
let q_let_u = M.LetVVar ("universe", universe, q_select) in
let q_let_p = M.LetVVar ("positions", v_pos, q_let_u) in
+prerr_endline ("### " ^ MQueryUtil.text_of_query q_let_p) ;
execute_query q_let_p