]> matita.cs.unibo.it Git - helm.git/commitdiff
hgdome no longer used (RIP)
authorAndrea Asperti <andrea.asperti@unibo.it>
Fri, 8 Oct 2010 11:18:01 +0000 (11:18 +0000)
committerAndrea Asperti <andrea.asperti@unibo.it>
Fri, 8 Oct 2010 11:18:01 +0000 (11:18 +0000)
15 files changed:
matita/components/METAS/meta.helm-hgdome.src [deleted file]
matita/components/Makefile
matita/components/hgdome/.depend [deleted file]
matita/components/hgdome/.depend.opt [deleted file]
matita/components/hgdome/Makefile [deleted file]
matita/components/hgdome/domMisc.ml [deleted file]
matita/components/hgdome/domMisc.mli [deleted file]
matita/components/hgdome/xml2Gdome.ml [deleted file]
matita/components/hgdome/xml2Gdome.mli [deleted file]
matita/configure.ac
matita/matita/applyTransformation.ml
matita/matita/applyTransformation.mli
matita/matita/matitaEngine.ml
matita/matita/matitaGuiTypes.mli
matita/matita/matitaMathView.ml

diff --git a/matita/components/METAS/meta.helm-hgdome.src b/matita/components/METAS/meta.helm-hgdome.src
deleted file mode 100644 (file)
index d06666f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-requires="helm-xml gdome2"
-version="0.0.1"
-archive(byte)="hgdome.cma"
-archive(native)="hgdome.cmxa"
index de0d4ed30433b6684676475fc6c4c3ab4c7f05e9..d536ec37b0aaeff78c0b2c68268ec5a5167f024c 100644 (file)
@@ -8,7 +8,6 @@ NULL =
 MODULES =                      \
        extlib                  \
        xml                     \
-       hgdome                  \
        registry                \
        syntax_extensions       \
        thread                  \
diff --git a/matita/components/hgdome/.depend b/matita/components/hgdome/.depend
deleted file mode 100644 (file)
index 072d969..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-domMisc.cmi: 
-xml2Gdome.cmi: 
-domMisc.cmo: domMisc.cmi 
-domMisc.cmx: domMisc.cmi 
-xml2Gdome.cmo: xml2Gdome.cmi 
-xml2Gdome.cmx: xml2Gdome.cmi 
diff --git a/matita/components/hgdome/.depend.opt b/matita/components/hgdome/.depend.opt
deleted file mode 100644 (file)
index 072d969..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-domMisc.cmi: 
-xml2Gdome.cmi: 
-domMisc.cmo: domMisc.cmi 
-domMisc.cmx: domMisc.cmi 
-xml2Gdome.cmo: xml2Gdome.cmi 
-xml2Gdome.cmx: xml2Gdome.cmi 
diff --git a/matita/components/hgdome/Makefile b/matita/components/hgdome/Makefile
deleted file mode 100644 (file)
index 9630da2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-PACKAGE = hgdome
-
-# modules which have both a .ml and a .mli
-INTERFACE_FILES =              \
-       domMisc.mli             \
-       xml2Gdome.mli           \
-       $(NULL)
-
-IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
-
-include ../../Makefile.defs
-include ../Makefile.common
diff --git a/matita/components/hgdome/domMisc.ml b/matita/components/hgdome/domMisc.ml
deleted file mode 100644 (file)
index 97a15b7..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-(* Copyright (C) 2000-2002, 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/.
- *)
-
-(******************************************************************************)
-(*                                                                            *)
-(*                               PROJECT HELM                                 *)
-(*                                                                            *)
-(*                Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>               *)
-(*                                 06/01/2002                                 *)
-(*                                                                            *)
-(*                                                                            *)
-(******************************************************************************)
-
-(* $Id$ *)
-
-let domImpl = Gdome.domImplementation ()
-let helm_ns = Gdome.domString "http://www.cs.unibo.it/helm"
-let xlink_ns = Gdome.domString "http://www.w3.org/1999/xlink"
-let mathml_ns = Gdome.domString "http://www.w3.org/1998/Math/MathML"
-let boxml_ns = Gdome.domString "http://helm.cs.unibo.it/2003/BoxML"
-
diff --git a/matita/components/hgdome/domMisc.mli b/matita/components/hgdome/domMisc.mli
deleted file mode 100644 (file)
index 25d642b..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-(* Copyright (C) 2000-2002, 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/.
- *)
-
-(******************************************************************************)
-(*                                                                            *)
-(*                               PROJECT HELM                                 *)
-(*                                                                            *)
-(*                Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>               *)
-(*                                 15/01/2003                                 *)
-(*                                                                            *)
-(*                                                                            *)
-(******************************************************************************)
-
-val domImpl : Gdome.domImplementation
-
-val helm_ns   : Gdome.domString   (** HELM namespace *)
-val xlink_ns  : Gdome.domString   (** XLink namespace *)
-val mathml_ns : Gdome.domString   (** MathML namespace *)
-val boxml_ns  : Gdome.domString   (** BoxML namespace *)
-
diff --git a/matita/components/hgdome/xml2Gdome.ml b/matita/components/hgdome/xml2Gdome.ml
deleted file mode 100644 (file)
index eb6a764..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-(* Copyright (C) 2000-2002, 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/.
- *)
-
-(* $Id$ *)
-
-let document_of_xml (domImplementation : Gdome.domImplementation) strm =
- let module G = Gdome in
- let module X = Xml in
-  let rec update_namespaces ((defaultns,bindings) as namespaces) =
-   function
-      [] -> namespaces
-    | (None,"xmlns",value)::tl ->
-       update_namespaces (Some (Gdome.domString value),bindings) tl
-    | (prefix,name,value)::tl when prefix = Some "xmlns"  ->
-        update_namespaces (defaultns,(name,Gdome.domString value)::bindings) tl
-    | _::tl -> update_namespaces namespaces tl in
-  let rec namespace_of_prefix (defaultns,bindings) =
-   function
-      None -> None
-    | Some "xmlns" -> Some (Gdome.domString "xml-ns")
-    | Some p' ->
-       try
-        Some (List.assoc p' bindings)
-       with
-        Not_found ->
-         raise
-          (Failure ("The prefix " ^ p' ^ " is not bound to any namespace")) in
-  let get_qualified_name p n =
-   match p with
-      None -> Gdome.domString n
-    | Some p' -> Gdome.domString (p' ^ ":" ^ n) in
-  let root_prefix,root_name,root_attributes,root_content =
-   ignore (Stream.next strm) ; (* to skip the <?xml ...?> declaration *)
-   ignore (Stream.next strm) ; (* to skip the DOCTYPE declaration *)
-   match Stream.next strm with
-      X.Empty(p,n,l) -> p,n,l,[<>]
-    | X.NEmpty(p,n,l,c) -> p,n,l,c
-    | _ -> assert false
-  in
-   let namespaces = update_namespaces (None,[]) root_attributes in
-   let namespaceURI = namespace_of_prefix namespaces root_prefix in
-   let document =
-    domImplementation#createDocument ~namespaceURI
-     ~qualifiedName:(get_qualified_name root_prefix root_name)
-     ~doctype:None
-   in
-   let rec aux namespaces (node : Gdome.node) =
-    parser
-      [< 'X.Str a ; s >] ->
-        let textnode = document#createTextNode ~data:(Gdome.domString a) in
-         ignore (node#appendChild ~newChild:(textnode :> Gdome.node)) ;
-         aux namespaces node s
-    | [< 'X.Empty(p,n,l) ; s >] ->
-        let namespaces' = update_namespaces namespaces l in
-         let namespaceURI = namespace_of_prefix namespaces' p in
-          let element =
-           document#createElementNS ~namespaceURI
-            ~qualifiedName:(get_qualified_name p n)
-          in
-           List.iter
-            (function (p,n,v) ->
-              if p = None then
-               element#setAttribute ~name:(Gdome.domString n)
-                ~value:(Gdome.domString v)
-              else
-               let namespaceURI = namespace_of_prefix namespaces' p in
-                element#setAttributeNS
-                 ~namespaceURI
-                 ~qualifiedName:(get_qualified_name p n)
-                 ~value:(Gdome.domString v)
-            ) l ;
-          ignore
-           (node#appendChild
-             ~newChild:(element : Gdome.element :> Gdome.node)) ;
-          aux namespaces node s
-    | [< 'X.NEmpty(p,n,l,c) ; s >] ->
-        let namespaces' = update_namespaces namespaces l in
-         let namespaceURI = namespace_of_prefix namespaces' p in
-          let element =
-           document#createElementNS ~namespaceURI
-            ~qualifiedName:(get_qualified_name p n)
-          in
-           List.iter
-            (function (p,n,v) ->
-              if p = None then
-               element#setAttribute ~name:(Gdome.domString n)
-                ~value:(Gdome.domString v)
-              else
-               let namespaceURI = namespace_of_prefix namespaces' p in
-                element#setAttributeNS ~namespaceURI
-                 ~qualifiedName:(get_qualified_name p n)
-                 ~value:(Gdome.domString v)
-            ) l ;
-           ignore (node#appendChild ~newChild:(element :> Gdome.node)) ;
-           aux namespaces' (element :> Gdome.node) c ;
-           aux namespaces node s
-    | [< >] -> ()
-   in
-    let root = document#get_documentElement in
-     List.iter
-      (function (p,n,v) ->
-        if p = None then
-         root#setAttribute ~name:(Gdome.domString n)
-          ~value:(Gdome.domString v)
-        else
-         let namespaceURI = namespace_of_prefix namespaces p in
-          root#setAttributeNS ~namespaceURI
-           ~qualifiedName:(get_qualified_name p n)
-           ~value:(Gdome.domString v)
-      ) root_attributes ;
-     aux namespaces (root : Gdome.element :> Gdome.node) root_content ;
-     document
-;;
diff --git a/matita/components/hgdome/xml2Gdome.mli b/matita/components/hgdome/xml2Gdome.mli
deleted file mode 100644 (file)
index 45d0e95..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-(* Copyright (C) 2000-2002, 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 document_of_xml :
-  Gdome.domImplementation -> Xml.token Stream.t -> Gdome.document
index 8df69da9a89101c37ba48b7a6cf1922752160052..97d8c66736722056fc68ed56365b0fe635da8f2d 100644 (file)
@@ -79,7 +79,6 @@ helm-ng_disambiguation \
 helm-ng_cic_content \
 helm-grafite_parser \
 helm-content_pres \
-helm-hgdome \
 helm-ng_paramodulation \
 helm-ng_tactics \
 "
index 6cbad3b505d50cbcbce9ed8ab09075cec69ff0b3..f21677e5de38d02f2cb6d14a3419adc13f250d6f 100644 (file)
 let mpres_document pres_box =
   Xml.add_xml_declaration (CicNotationPres.print_box pres_box)
 
-let nmml_of_cic_sequent status metasenv subst sequent =
-  let content_sequent,ids_to_refs =
-   NTermCicContent.nmap_sequent status ~metasenv ~subst sequent in 
-  let pres_sequent = 
-   Sequent2pres.nsequent2pres ids_to_refs subst content_sequent in
-  let xmlpres = mpres_document pres_sequent in
-   Xml2Gdome.document_of_xml DomMisc.domImpl xmlpres
-
 let ntxt_of_cic_sequent ~map_unicode_to_tex size status metasenv subst sequent =
   let content_sequent,ids_to_refs =
    NTermCicContent.nmap_sequent status ~metasenv ~subst sequent in 
@@ -55,13 +47,6 @@ let ntxt_of_cic_sequent ~map_unicode_to_tex size status metasenv subst sequent =
    BoxPp.render_to_string ~map_unicode_to_tex
     (function x::_ -> x | _ -> assert false) size pres_sequent
 
-let nmml_of_cic_object status obj =
- let cobj,ids_to_nrefs = NTermCicContent.nmap_obj status obj in 
- let pres_sequent = Content2pres.ncontent2pres ~ids_to_nrefs cobj in
- let xmlpres = mpres_document pres_sequent in
-  Xml2Gdome.document_of_xml DomMisc.domImpl xmlpres
-;;
-
 let ntxt_of_cic_object ~map_unicode_to_tex size status obj =
  let cobj,ids_to_nrefs = NTermCicContent.nmap_obj status obj in 
  let pres_sequent = Content2pres.ncontent2pres ~ids_to_nrefs cobj in
index 5816455c2e6c017379b1c6f88f7d9502bacf7aa0..93d8afc1946377f9db581e97953a627cf55a18b5 100644 (file)
 (*                                                                         *)
 (***************************************************************************)
 
-val nmml_of_cic_sequent:
- #NCicCoercion.status ->
- NCic.metasenv -> NCic.substitution ->          (* metasenv, substitution *)
- int * NCic.conjecture ->                       (* sequent *)
-  Gdome.document                                (* Math ML *)
-
 val ntxt_of_cic_sequent:
  map_unicode_to_tex:bool -> int ->
  #NCicCoercion.status ->
@@ -46,7 +40,5 @@ val ntxt_of_cic_sequent:
  int * NCic.conjecture ->                       (* sequent *)
   string                                        (* text *)
 
-val nmml_of_cic_object: #NCicCoercion.status -> NCic.obj -> Gdome.document
-
 val ntxt_of_cic_object:
  map_unicode_to_tex:bool -> int -> #NCicCoercion.status -> NCic.obj -> string
index c80405922efa8eab9905065805da10e40f994ad0..dcc111a95a944064c5d563644f77e94d66ec865f 100644 (file)
@@ -40,6 +40,7 @@ let disambiguate_command lexicon_status_ref grafite_status cmd =
   grafite_status,cmd
 
 let eval_macro_screenshot (status : GrafiteTypes.status) name =
+  assert false (* MATITA 1.0
   let _,_,metasenv,subst,_ = status#obj in
   let sequent = List.hd metasenv in
   let mathml = 
@@ -56,6 +57,7 @@ let eval_macro_screenshot (status : GrafiteTypes.status) name =
     Filename.quote (name^".png")));
   HLog.debug ("generated " ^ name ^ ".png");
   status, `New []
+  *)
 ;;
 
 let eval_ast ?do_heavy_checks status (text,prefix_len,ast) =
index af4a6b31d9a8d234852b99a362c9fea256b40e1c..7fc6f9ae56280ec1827307a8b89564482e44d53c 100644 (file)
@@ -109,8 +109,8 @@ object
 
   method load_root : root:string -> unit
   method remove_selections: unit
-  method set_selection: Gdome.element option -> unit
-  method get_selections: Gdome.element list
+  method set_selection: unit option -> unit
+  method get_selections: unit list
   method set_font_size: int -> unit
 
 
index 8a7b8fdcba47988dfbc090223a83422d965bce3f..fd5b6d4aca731c1ae83a2490e1bea3787f392102 100644 (file)
@@ -65,6 +65,7 @@ let near (x1, y1) (x2, y2) =
   let distance = sqrt (((x2 -. x1) ** 2.) +. ((y2 -. y1) ** 2.)) in
   (distance < 4.)
 
+(*
 let mathml_ns = Gdome.domString "http://www.w3.org/1998/Math/MathML"
 let xlink_ns = Gdome.domString "http://www.w3.org/1999/xlink"
 let helm_ns = Gdome.domString "http://www.cs.unibo.it/helm"
@@ -83,10 +84,12 @@ let empty_mathml = lazy (
 let empty_boxml = lazy (
   domImpl#createDocument ~namespaceURI:(Some DomMisc.boxml_ns) 
     ~qualifiedName:(Gdome.domString "box") ~doctype:None)
+    *)
 
   (** shown for goals closed by side effects *)
 let closed_goal_mathml = lazy "chiuso per side effect..."
 
+(*
 (* ids_to_terms should not be passed here, is just for debugging *)
 let find_root_id annobj id ids_to_father_ids ids_to_terms ids_to_inner_types =
   assert false (* MATITA 1.0
@@ -177,6 +180,7 @@ let rec has_maction (elt :Gdome.element) =
         has_maction (new Gdome.element_of_node node)
     | _ -> false
 ;;
+*)
 
 class clickableMathView obj =
 let text_width = 80 in
@@ -198,8 +202,8 @@ object (self)
     ~stop:(self#buffer#get_iter `END);
     self#buffer#insert root
   method remove_selections = (() : unit)
-  method set_selection = (fun _ -> () : Gdome.element option -> unit)
-  method get_selections = (assert false : Gdome.element list)
+  method set_selection = (fun _ -> () : unit option -> unit)
+  method get_selections = (assert false : unit list)
   method set_font_size font_size =
    self#misc#modify_font_by_name
      (sprintf "%s %d" BuildTimeConf.script_font font_size)