]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/binaries/matex/options.ml
MaTeX:
[helm.git] / matita / components / binaries / matex / options.ml
index dc094441e712dfbbe219dd2cb25e2c2a6f83b32e..81cf705bae64e91486872c228e05647a8aea5e8f 100644 (file)
@@ -11,7 +11,8 @@
 
 module F = Filename
 
-module R  = Helm_registry
+module R = Helm_registry
+module P = NCicPp
 
 (* internal *****************************************************************)
 
@@ -19,13 +20,74 @@ let default_no_init = true
 
 let default_out_dir = F.current_dir_name
 
+let default_proc_id = "H"
+
+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
+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 macro_gref = ref default_macro          (* data eta-conversion and constant rendering *)
+
+let is_global_id s =
+   !global_alpha && s <> dno_id
+
+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
+   out_dir := default_out_dir;
+   proc_id := default_proc_id;
+   test := default_test;
+   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