]> matita.cs.unibo.it Git - helm.git/blob - matita/components/binaries/matex/options.ml
- matex: we separate axioms (propositions) and assumptions (other)
[helm.git] / matita / components / binaries / matex / options.ml
1 (*
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.                     
5     ||I||                                                                
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_______________________________________________________________ *)
11
12 module F = Filename
13
14 module R = Helm_registry
15 module P = NCicPp
16
17 (* internal *****************************************************************)
18
19 let default_no_init = true
20
21 let default_out_dir = F.current_dir_name
22
23 let default_proc_id = "H"
24
25 let default_check = false
26
27 let default_no_types = false
28
29 let default_no_proofs = false
30
31 let default_global_alpha = false
32
33 let default_log_alpha = false
34
35 let default_log_missing = false
36
37 let default_list_och = None
38
39 let default_alpha = []
40
41 let default_macro = []
42
43 (* interface ****************************************************************)
44
45 let dno_id = "_"                            (* identifier for not-occurring premises *)
46
47 let nan = -1                                (* not a number *)
48
49 let status = new P.status
50
51 let no_init = ref default_no_init
52
53 let out_dir = ref default_out_dir           (* directory of generated files *)
54
55 let proc_id = ref default_proc_id           (* identifer for anticipations *)
56
57 let check = ref default_check               (* check transformations *)
58
59 let no_types = ref default_no_types         (* omit types *)
60
61 let no_proofs = ref default_no_proofs       (* omit proofs *)
62
63 let global_alpha = ref default_global_alpha (* log alpha-unconverted identifiers *)
64
65 let log_alpha = ref default_log_alpha       (* log alpha-unconverted identifiers *)
66
67 let log_missing = ref default_log_missing   (* log missing notational macros *)
68
69 let list_och = ref default_list_och         (* output stream for list file *)
70
71 let alpha_type = ref default_alpha          (* data for type-based alpha-conversion *)
72
73 let alpha_sort = ref default_alpha          (* data for sort-based alpha-conversion *)
74
75 let alpha_gref = ref default_alpha          (* data for constant renaming *)
76
77 let macro_gref = ref default_macro          (* data for eta-conversion and constant rendering *)
78
79 let is_global_id s =
80    !global_alpha && s <> dno_id
81
82 let close_list () = match !list_och with
83    | None     -> ()
84    | Some och -> close_out och
85
86 let clear () =
87    R.clear (); close_list ();
88    no_init := default_no_init;
89    out_dir := default_out_dir;
90    proc_id := default_proc_id;
91    check := default_check;
92    no_types := default_no_types;
93    no_proofs := default_no_proofs;
94    global_alpha := default_global_alpha;
95    log_alpha := default_log_alpha;
96    log_missing := default_log_missing;
97    list_och := default_list_och;
98    alpha_type := default_alpha;
99    alpha_sort := default_alpha;
100    alpha_gref := default_alpha;
101    macro_gref := default_macro