\ / This software is distributed as is, NO WARRANTY.
V_______________________________________________________________ *)
-module F = Filename
-module P = Printf
+module KF = Filename
+module KP = Printf
module U = NUri
module C = Cps
module L = Log
module Y = Time
+module P = Marks
module G = Options
-module J = Marks
module H = Hierarchy
module N = Layer
module E = Entity
| CrgEntity of Crg.entity
let print_counters st = function
- | G.Crg -> DO.print_counters C.start st.dc
- | G.Brg -> BO.print_counters C.start st.bc
- | G.Bag -> ZO.print_counters C.start st.zc
+ | G.V4 -> DO.print_counters C.start st.dc
+ | G.V3 -> BO.print_counters C.start st.bc
+ | G.V0 -> ZO.print_counters C.start st.zc
let xlate_entity st entity = match !G.kernel, entity with
- | G.Brg, CrgEntity e ->
+ | G.V3, CrgEntity e ->
let f e = (BrgEntity e) in E.xlate f BD.brg_of_crg e
- | G.Bag, CrgEntity e ->
+ | G.V0, CrgEntity e ->
let f e = (BagEntity e) in E.xlate f (ZD.bag_of_crg st.kst) e
| _, entity -> entity
let pp_progress e =
let f _ na u =
let s = U.string_of_uri u in
- L.warn 2 (P.sprintf "[%u] <%s>" na.E.n_apix s);
+ L.warn 2 (KP.sprintf "[%u] <%s>" na.E.n_apix s);
in
Y.utime_stamp "intermediate";
match e with
| NoEntity
let type_of_input name =
- if F.check_suffix name ".hln" then Text
- else if F.check_suffix name ".aut" then
+ if KF.check_suffix name ".hln" then Text
+ else if KF.check_suffix name ".aut" then
let _ = H.set_sorts 0 ["Set"; "Prop"] in
assert (H.set_graph "Z2");
Automath
else begin
- L.warn level (P.sprintf "Unknown file type: %s" name); exit 2
+ L.warn level (KP.sprintf "Unknown file type: %s" name); exit 2
end
let txt_xl = initial_lexer TxtLexer.token
let print_version () = L.warn level (G.version_string ^ "\n"); exit 0 in
let set_hierarchy s =
if H.set_graph s then () else
- L.warn level (P.sprintf "Unknown type hierarchy: %s" s)
+ L.warn level (KP.sprintf "Unknown type hierarchy: %s" s)
in
let set_kernel = function
- | "brg" -> G.kernel := G.Brg
- | "bag" -> G.kernel := G.Bag
- | s -> L.warn level (P.sprintf "Unknown kernel version: %s" s)
+ | "V3" -> G.kernel := G.V3
+ | "V0" -> G.kernel := G.V0
+ | s -> L.warn level (KP.sprintf "Unknown kernel version: %s" s)
in
let set_trace i =
if !G.trace = 0 && i > 0 then Y.gmtime G.version_string;
version := true
in
let process_file name =
- if !G.trace >= 2 then L.warn 1 (P.sprintf "Processing file: %s" name);
+ if !G.trace >= 2 then L.warn 1 (KP.sprintf "Processing file: %s" name);
if !G.trace >= 2 then Y.utime_stamp "started";
let base_name = Filename.chop_extension (Filename.basename name) in
- let cover = F.concat !root base_name in
- if !G.stage <= 1 then G.kernel := G.Crg;
+ let cover = KF.concat !root base_name in
+ if !G.stage <= 1 then G.kernel := G.V4;
G.cover := cover;
if !G.ma_preamble <> "" then st := {!st with och = Some (BG.open_out base_name)};
- J.clear_marks ();
+ P.clear_marks ();
let sst, input = process (refresh_status !st) name in
st := begin match sst.och with
| None -> sst
if !G.summary then begin
AO.print_counters C.start !st.ac;
if !preprocess then AO.print_process_counters C.start !st.pst;
- if !G.stage >= 1 then print_counters !st G.Crg;
+ if !G.stage >= 1 then print_counters !st G.V4;
if !G.stage >= 2 then print_counters !st !G.kernel;
if !G.stage >= 3 then O.print_reductions ()
end
let help_g = " always expand global definitions" in
let help_h = "<string> set type hierarchy (default: \"Z1\")" in
let help_i = " show local references by index" in
- let help_k = "<string> set kernel version (default: \"brg\")" in
+ let help_k = "<string> set kernel version (default: \"V3\")" in
let help_l = " disambiguate binders level (Automath)" in
let help_m = "<file> export kernel entities (Grafite) setting location of preamble to <file> (default: empty)" in
let help_o = " activate sort inclusion (default: false)" in