]> matita.cs.unibo.it Git - helm.git/commitdiff
Old modules (use.ml/mli, eval.ml/mli,...) eliminated.
authornatile <??>
Mon, 21 Oct 2002 16:58:37 +0000 (16:58 +0000)
committernatile <??>
Mon, 21 Oct 2002 16:58:37 +0000 (16:58 +0000)
helm/ocaml/mathql_interpreter/eval.ml [deleted file]
helm/ocaml/mathql_interpreter/eval.mli [deleted file]
helm/ocaml/mathql_interpreter/pattern.ml [deleted file]
helm/ocaml/mathql_interpreter/pattern.mli [deleted file]

diff --git a/helm/ocaml/mathql_interpreter/eval.ml b/helm/ocaml/mathql_interpreter/eval.ml
deleted file mode 100644 (file)
index 43296cd..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-(* Copyright (C) 2000, HELM Team.
- * 
- * This file is part of HELM, an Hypertextual, Electronic
- * Library of Mathematics, developed at the Computer Science
- * Department, University of Bologna, Italy.
- * 
- * HELM is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * 
- * HELM is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HELM; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA  02111-1307, USA.
- * 
- * For details, see the HELM World-Wide-Web page,
- * http://cs.unibo.it/helm/.
- *)
-
-(*
- *
- *)
-
-open MathQL;;
-
-(*
- * conversione di un pattern
- *)
-let rec patterneval p =
- match p with
-   [] -> ""
- | head::tail ->
-    let h = match head with
-               MQBC s -> Str.global_replace (Str.regexp "\.") "\\\\\." s
-            |  MQBD -> "/"
-            |  MQBQ -> "[^/#]?"
-            |  MQBS -> "[^/#]*"
-            |  MQBSS -> "[^#]*"
-    in
-     h ^ (patterneval tail)
-;;
-
-let rec fieval fi =
- match fi with
-    [] -> ""
-  | MQFC i :: tail -> "/" ^ (string_of_int i) ^ (fieval tail)
-  | MQFS :: tail -> "[^/]*" ^ (fieval tail)
-  | MQFSS :: tail -> ".*"  ^ (fieval tail)
-;;
-
-(*
- * conversione di un fragment identifier
- *)
-let fieval fi =
- if fi = [] then
-  ""
- else
-  "#xpointer\\\\(1" ^ fieval fi ^ "\\\\)"
-;;
-
-(*
- * valuta l'estensione
- *
- * 20/05/2002: non piu' necessario: l'estensione fa eventualmente
- * parte del pattern precedente
- *)
-let exteval ext =
- match ext with
-    "" -> ""
- |  _  -> ("\." ^ ext)
-;;
-
-(*
- * valuta il preambolo
- *)
-let preeval p =
- match p with 
-    Some s -> s
-  | None -> "[^/]*"
-;;
-
-(*
- * trasforma un pattern MathQL in un pattern postgresql
- *
- * si utilizzano espressioni regolari POSIX anziche' l'operatore
- * SQL standard LIKE perche' MathQL prevede esperssioni con "*"
- * e con "**".
- *)
-let pattern_match (preamble, pattern, fragid) =
- " ~ '^" ^ (preeval preamble) ^ ":/" ^ (patterneval pattern) ^ (fieval fragid) ^ "$'"
-;;
-
diff --git a/helm/ocaml/mathql_interpreter/eval.mli b/helm/ocaml/mathql_interpreter/eval.mli
deleted file mode 100644 (file)
index 00b64ed..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(* Copyright (C) 2000, HELM Team.
- * 
- * This file is part of HELM, an Hypertextual, Electronic
- * Library of Mathematics, developed at the Computer Science
- * Department, University of Bologna, Italy.
- * 
- * HELM is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * 
- * HELM is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HELM; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA  02111-1307, USA.
- * 
- * For details, see the HELM World-Wide-Web page,
- * http://cs.unibo.it/helm/.
- *)
-
-val pattern_match :
-  MathQL.mqtref -> string
diff --git a/helm/ocaml/mathql_interpreter/pattern.ml b/helm/ocaml/mathql_interpreter/pattern.ml
deleted file mode 100644 (file)
index 993617b..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-(* Copyright (C) 2000, HELM Team.
- * 
- * This file is part of HELM, an Hypertextual, Electronic
- * Library of Mathematics, developed at the Computer Science
- * Department, University of Bologna, Italy.
- * 
- * HELM is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * 
- * HELM is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HELM; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA  02111-1307, USA.
- * 
- * For details, see the HELM World-Wide-Web page,
- * http://www.cs.unibo.it/helm/.
- *)
-
-(*
- * implementazione del comando PATTERN
- *)
-
-open Dbconn;;
-open Utility;;
-open Eval;;
-open Mathql_semantics;;
-
-let pattern_ex (apreamble, apattern, afragid) =
- let c = pgc () in
-  (*let _ = print_string ("USE ")
-  and t = Sys.time () in*)
-  (*let r1 = helm_class_id "MathResource" in*)
-   (*let qq = "select att0 from t" ^ r1 ^ " where att0 " ^ (pattern_match apreamble apattern afragid) ^ " order by t" ^ r1 ^ ".att0 asc" in*)
-   (*PRE-CLAUDIO
-   let qq = "select uri from registry where uri " ^ (pattern_match apreamble apattern afragid) ^ " order by registry.uri asc" in
-    let result = 
-     let res =
-      c#exec (qq)
-     in
-      [["retVal"]] @ List.map (fun l -> [l]) (pgresult_to_string_list res)*)
-   let qq = "select uri from registry where uri " ^ (pattern_match (apreamble, apattern, afragid)) ^ " order by registry.uri asc" in
-print_endline qq ; flush stderr ;
-   (*let _ = print_endline qq in*)
-    let res =
-     c#exec (qq)
-    in
-(* PRE-CLAUDIO
-     (*let _ = print_endline (string_of_float (Sys.time () -. t)); flush stdout in*)
-      result*)
-     List.map
-      (function uri -> {uri = uri ; attributes = [] ; extra = ""})
-      (pgresult_to_string_list res)
-;;
diff --git a/helm/ocaml/mathql_interpreter/pattern.mli b/helm/ocaml/mathql_interpreter/pattern.mli
deleted file mode 100644 (file)
index 1fd21bd..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-(* Copyright (C) 2000, HELM Team.
- * 
- * This file is part of HELM, an Hypertextual, Electronic
- * Library of Mathematics, developed at the Computer Science
- * Department, University of Bologna, Italy.
- * 
- * HELM is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * 
- * HELM is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HELM; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA  02111-1307, USA.
- * 
- * For details, see the HELM World-Wide-Web page,
- * http://cs.unibo.it/helm/.
- *)
-
-val pattern_ex :
-  MathQL.mqtref ->
-   Mathql_semantics.result