2 ||M|| This file is part of HELM, an Hypertextual, Electronic
3 ||A|| Library of Mathematics, developed at the Computer Science
4 ||T|| Department, University of Bologna, Italy.
6 ||T|| HELM is free software; you can redistribute it and/or
7 ||A|| modify it under the terms of the GNU General Public License
8 \ / version 2 or (at your option) any later version.
9 \ / This software is distributed as is, NO WARRANTY.
10 V_______________________________________________________________ *)
14 module R = Helm_registry
17 (* internal *****************************************************************)
19 let default_no_init = true
21 let default_out_dir = F.current_dir_name
23 let default_proc_id = "H"
25 let default_test = false
27 let default_no_types = false
29 let default_global_alpha = false
31 let default_log_alpha = false
33 let default_log_missing = false
35 let default_list_och = None
37 let default_alpha = []
39 let default_macro = []
41 (* interface ****************************************************************)
43 let dno_id = "_" (* identifier for not-occurring premises *)
45 let nan = -1 (* not a number *)
47 let status = new P.status
49 let no_init = ref default_no_init
51 let out_dir = ref default_out_dir (* directory of generated files *)
53 let proc_id = ref default_proc_id (* identifer for anticipations *)
55 let test = ref default_test (* test anticipation *)
57 let no_types = ref default_no_types (* omit types *)
59 let global_alpha = ref default_global_alpha (* log alpha-unconverted identifiers *)
61 let log_alpha = ref default_log_alpha (* log alpha-unconverted identifiers *)
63 let log_missing = ref default_log_missing (* log missing notational macros *)
65 let list_och = ref default_list_och (* output stream for list file *)
67 let alpha_type = ref default_alpha (* data for type-based alpha-conversion *)
69 let alpha_sort = ref default_alpha (* data for sort-based alpha-conversion *)
71 let alpha_gref = ref default_alpha (* data for constant renaming *)
73 let macro_gref = ref default_macro (* data eta-conversion and constant rendering *)
76 !global_alpha && s <> dno_id
78 let close_list () = match !list_och with
80 | Some och -> close_out och
83 R.clear (); close_list ();
84 no_init := default_no_init;
85 out_dir := default_out_dir;
86 proc_id := default_proc_id;
88 no_types := default_no_types;
89 global_alpha := default_global_alpha;
90 log_alpha := default_log_alpha;
91 log_missing := default_log_missing;
92 list_och := default_list_och;
93 alpha_type := default_alpha;
94 alpha_sort := default_alpha;
95 alpha_gref := default_alpha;
96 macro_gref := default_macro