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
16 module B = NCicLibrary
17 module C = NCicTypeChecker
22 module D = MatitaRemove
32 if !O.no_init then begin
35 H.set_log_callback no_log;
39 let scan_uri devel str =
40 M.from_string (R.get "matita.basedir") devel str;
44 let devel, uri = E.get_uri devel in
47 let set_g () = O.exclude := `Generated :: !O.exclude
49 let set_p () = O.exclude := `Provided :: !O.exclude
51 let out_i () = E.out_int !O.net
53 let out_on () = E.out_length !O.objs
55 let out_os () = E.out_uris !O.objs
57 let out_sn () = E.out_length !O.srcs
59 let out_ss () = E.out_uris !O.srcs
62 if L.is_uri s then scan_uri "" s
63 else if E.is_registry s then init s
67 D.objects (); O.clear ()
70 let help = "Usage: probe [ -X | <configuration file> | -gp | HELM (base)uri | -i | -on | os | -sn | -ss ]*" in
71 let help_X = " Clear configuration, options and counters" in
72 let help_g = " Exclude generated objects" in
73 let help_i = " Print the total intrinsic size" in
74 let help_p = " Exclude provided objects" in
75 let help_on = " Print the number of objects" in
76 let help_os = " Print the list of objects" in
77 let help_sn = " Print the number of sources" in
78 let help_ss = " Print the list of sources" in
80 "-X" , A.Unit clear, help_X;
81 "-g" , A.Unit set_g, help_g;
82 "-i" , A.Unit out_i, help_i;
83 "-on", A.Unit out_on, help_on;
84 "-os", A.Unit out_os, help_os;
85 "-p" , A.Unit set_p, help_p;
86 "-sn", A.Unit out_sn, help_sn;
87 "-ss", A.Unit out_ss, help_ss;