]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/binaries/matex/options.ml
MaTeX:
[helm.git] / matita / components / binaries / matex / options.ml
index 14dc4e2c9af388932608150f1fab059a9d5e7ee8..81cf705bae64e91486872c228e05647a8aea5e8f 100644 (file)
@@ -26,24 +26,68 @@ let default_test = false
 
 let default_no_types = false
 
+let default_global_alpha = false
+
+let default_log_alpha = false
+
+let default_log_missing = false
+
+let default_list_och = None
+
+let default_alpha = []
+
+let default_macro = []
+
 (* interface ****************************************************************)
 
+let dno_id = "_"                            (* identifier for not-occurring premises *)
+
+let nan = -1                                (* not a number *)
+
 let status = new P.status
 
 let no_init = ref default_no_init
 
-let out_dir = ref default_out_dir   (* directory of generated files *)
+let out_dir = ref default_out_dir           (* directory of generated files *)
+
+let proc_id = ref default_proc_id           (* identifer for anticipations *)
+
+let test = ref default_test                 (* test anticipation *)
+
+let no_types = ref default_no_types         (* omit types *)
+
+let global_alpha = ref default_global_alpha (* log alpha-unconverted identifiers *)
+
+let log_alpha = ref default_log_alpha       (* log alpha-unconverted identifiers *)
+
+let log_missing = ref default_log_missing   (* log missing notational macros *)
+
+let list_och = ref default_list_och         (* output stream for list file *)
+
+let alpha_type = ref default_alpha          (* data for type-based alpha-conversion *)
+
+let alpha_sort = ref default_alpha          (* data for sort-based alpha-conversion *)
 
-let proc_id = ref default_proc_id   (* identifer of anticipations *)
+let macro_gref = ref default_macro          (* data eta-conversion and constant rendering *)
 
-let test = ref default_test         (* test anticipation *)
+let is_global_id s =
+   !global_alpha && s <> dno_id
 
-let no_types = ref default_no_types (* omit types *)
+let close_list () = match !list_och with
+   | None     -> ()
+   | Some och -> close_out och
 
 let clear () =
-   R.clear ();
+   R.clear (); close_list ();
    no_init := default_no_init;
    out_dir := default_out_dir;
    proc_id := default_proc_id;
    test := default_test;
-   no_types := default_no_types
+   no_types := default_no_types;
+   global_alpha := default_global_alpha;
+   log_alpha := default_log_alpha;
+   log_missing := default_log_missing;
+   list_och := default_list_och;
+   alpha_type := default_alpha;
+   alpha_sort := default_alpha;
+   macro_gref := default_macro