equal
deleted
inserted
replaced
40 (* Queue interface to table *) |
40 (* Queue interface to table *) |
41 fun pop tab key = |
41 fun pop tab key = |
42 (let val v = hd (Inttab.lookup_list tab key) in |
42 (let val v = hd (Inttab.lookup_list tab key) in |
43 (v, Inttab.remove_list (op =) (key, v) tab) |
43 (v, Inttab.remove_list (op =) (key, v) tab) |
44 end) handle List.Empty => raise Fail "sledgehammer_compress: pop" |
44 end) handle List.Empty => raise Fail "sledgehammer_compress: pop" |
45 fun pop_max tab = pop tab (the (Inttab.max_key tab)) |
45 fun pop_max tab = pop tab (fst (the (Inttab.max tab))) |
46 handle Option.Option => raise Fail "sledgehammer_compress: pop_max" |
46 handle Option.Option => raise Fail "sledgehammer_compress: pop_max" |
47 fun add_list tab xs = fold (Inttab.insert_list (op =)) xs tab |
47 fun add_list tab xs = fold (Inttab.insert_list (op =)) xs tab |
48 |
48 |
49 (* Main function for compresing proofs *) |
49 (* Main function for compresing proofs *) |
50 fun compress_and_preplay_proof debug ctxt type_enc lam_trans preplay |
50 fun compress_and_preplay_proof debug ctxt type_enc lam_trans preplay |