module MO = MetaOutput
module MBrg = MetaBrg
module BrgO = BrgOutput
+module BrgU = BrgUntrusted
type status = {
summary: int;
let main =
let version_string = "Helena Checker 0.8.0 M - December 2008" in
let summary = ref 0 in
- let stage = ref 2 in
+ let stage = ref 3 in
let meta_file = ref None in
+ let hierarchy = ref (fun h -> h + 2) in
let set_summary i = summary := i in
let print_version () = L.warn version_string; exit 0 in
let set_stage i = stage := i in
let rec aux st = function
| [] -> st
| item :: tl ->
- let st = {st with ac = count st AO.count_item st.ac item} in
+(* stage 3 *)
+ let f st = function
+ | None -> st
+ | Some (_, (i, _, _, _)) ->
+ Log.warn (string_of_int i); st
+ in
+(* stage 2 *)
let f st item =
- {st with brgc = count st BrgO.count_item st.brgc item}
+ let st = {st with brgc = count st BrgO.count_item st.brgc item} in
+ if !stage > 2 then BrgU.type_check (f st) !hierarchy item else st
in
+(* stage 1 *)
let f mst item =
let st = {st with
mst = mst; mc = count st MO.count_item st.mc item
end;
if !stage > 1 then MBrg.brg_of_meta (f st) item else st
in
+(* stage 0 *)
+ let st = {st with ac = count st AO.count_item st.ac item} in
let st =
if !stage > 0 then MA.meta_of_aut f st.mst item else st
in