X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=helm%2Focaml%2Ftactics%2Ffilter_auto.ml;fp=helm%2Focaml%2Ftactics%2Ffilter_auto.ml;h=0000000000000000000000000000000000000000;hp=73eaed638c4aee767a317f4431c3bf246fefa774;hb=1696761e4b8576e8ed81caa905fd108717019226;hpb=5325734bc2e4927ed7ec146e35a6f0f2b49f50c1 diff --git a/helm/ocaml/tactics/filter_auto.ml b/helm/ocaml/tactics/filter_auto.ml deleted file mode 100644 index 73eaed638..000000000 --- a/helm/ocaml/tactics/filter_auto.ml +++ /dev/null @@ -1,67 +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/. - *) - - -let in_hypothesis = "'http://www.cs.unibo.it/helm/schemas/schema-helm#InHypothesis'" ;; - -let main_hypothesis = "'http://www.cs.unibo.it/helm/schemas/schema-helm#MainHypothesis'" ;; - -let main_conclusion = "'http://www.cs.unibo.it/helm/schemas/schema-helm#MainConclusion'" ;; - -let in_conclusion = "'http://www.cs.unibo.it/helm/schemas/schema-helm#InConclusion'" ;; - -let escape = Str.global_replace (Str.regexp_string "\'") "\\'";; - -let hyp_const (conn:Mysql.dbd) uri = - let uri = escape uri in - (*query to obtain all the constants in the hypothesis of the theorem*) - let query = - "select h_occurrence from refObj where source='"^uri^ - "' and (h_position="^main_hypothesis^" or h_position="^in_hypothesis^ - "or h_position="^main_conclusion^" or h_position="^in_conclusion^")" in - prerr_endline ("$$$$$$$$$$$$$$$"^query); - let result = Mysql.exec conn query in - (* now we transform the result in a set *) - let f a = - match (Array.to_list a) with - [Some uri] -> uri - | _ -> assert false in - let result = Mysql.map ~f:f result in - List.fold_left - (fun set uri -> - NewConstraints.StringSet.add uri set) - NewConstraints.StringSet.empty result -;; - -(* for each uri check if its costants are a subset of - const, the set of the costants of the proof *) -let filter_new_constants (conn:Mysql.dbd) const (_,uri) = - let hyp = hyp_const conn uri in - prerr_endline (NewConstraints.pp_StringSet hyp); - NewConstraints.StringSet.subset hyp const -;; - - -