185 val axioms = (Theory.axiom_space thy, Theory.axiom_table thy); |
185 val axioms = (Theory.axiom_space thy, Theory.axiom_table thy); |
186 val defs = Theory.defs_of thy; |
186 val defs = Theory.defs_of thy; |
187 val {restricts, reducts} = Defs.dest defs; |
187 val {restricts, reducts} = Defs.dest defs; |
188 val {naming = _, syn = _, tsig, consts} = Sign.rep_sg thy; |
188 val {naming = _, syn = _, tsig, consts} = Sign.rep_sg thy; |
189 val {constants, constraints} = Consts.dest consts; |
189 val {constants, constraints} = Consts.dest consts; |
190 val extern_const = Name_Space.extern (#1 constants); |
190 val extern_const = Name_Space.extern ctxt (#1 constants); |
191 val {classes, default, types, ...} = Type.rep_tsig tsig; |
191 val {classes, default, types, ...} = Type.rep_tsig tsig; |
192 val (class_space, class_algebra) = classes; |
192 val (class_space, class_algebra) = classes; |
193 val classes = Sorts.classes_of class_algebra; |
193 val classes = Sorts.classes_of class_algebra; |
194 val arities = Sorts.arities_of class_algebra; |
194 val arities = Sorts.arities_of class_algebra; |
195 |
195 |
196 val clsses = Name_Space.dest_table (class_space, Symtab.make (Graph.dest classes)); |
196 val clsses = Name_Space.dest_table ctxt (class_space, Symtab.make (Graph.dest classes)); |
197 val tdecls = Name_Space.dest_table types; |
197 val tdecls = Name_Space.dest_table ctxt types; |
198 val arties = Name_Space.dest_table (Sign.type_space thy, arities); |
198 val arties = Name_Space.dest_table ctxt (Sign.type_space thy, arities); |
199 |
199 |
200 fun prune_const c = not verbose andalso Consts.is_concealed consts c; |
200 fun prune_const c = not verbose andalso Consts.is_concealed consts c; |
201 val cnsts = Name_Space.extern_table (#1 constants, |
201 val cnsts = Name_Space.extern_table ctxt (#1 constants, |
202 Symtab.make (filter_out (prune_const o fst) (Symtab.dest (#2 constants)))); |
202 Symtab.make (filter_out (prune_const o fst) (Symtab.dest (#2 constants)))); |
203 |
203 |
204 val log_cnsts = map_filter (fn (c, (ty, NONE)) => SOME (c, ty) | _ => NONE) cnsts; |
204 val log_cnsts = map_filter (fn (c, (ty, NONE)) => SOME (c, ty) | _ => NONE) cnsts; |
205 val abbrevs = map_filter (fn (c, (ty, SOME t)) => SOME (c, (ty, t)) | _ => NONE) cnsts; |
205 val abbrevs = map_filter (fn (c, (ty, SOME t)) => SOME (c, (ty, t)) | _ => NONE) cnsts; |
206 val cnstrs = Name_Space.extern_table constraints; |
206 val cnstrs = Name_Space.extern_table ctxt constraints; |
207 |
207 |
208 val axms = Name_Space.extern_table axioms; |
208 val axms = Name_Space.extern_table ctxt axioms; |
209 |
209 |
210 val (reds0, (reds1, reds2)) = filter_out (prune_const o fst o fst) reducts |
210 val (reds0, (reds1, reds2)) = filter_out (prune_const o fst o fst) reducts |
211 |> map (fn (lhs, rhs) => |
211 |> map (fn (lhs, rhs) => |
212 (apfst extern_const lhs, map (apfst extern_const) (filter_out (prune_const o fst) rhs))) |
212 (apfst extern_const lhs, map (apfst extern_const) (filter_out (prune_const o fst) rhs))) |
213 |> sort_wrt (#1 o #1) |
213 |> sort_wrt (#1 o #1) |
223 Pretty.big_list "type arities:" (pretty_arities arties), |
223 Pretty.big_list "type arities:" (pretty_arities arties), |
224 Pretty.big_list "logical consts:" (map (Pretty.block o prt_const) log_cnsts), |
224 Pretty.big_list "logical consts:" (map (Pretty.block o prt_const) log_cnsts), |
225 Pretty.big_list "abbreviations:" (map pretty_abbrev abbrevs), |
225 Pretty.big_list "abbreviations:" (map pretty_abbrev abbrevs), |
226 Pretty.big_list "constraints:" (map (Pretty.block o prt_const) cnstrs), |
226 Pretty.big_list "constraints:" (map (Pretty.block o prt_const) cnstrs), |
227 Pretty.big_list "axioms:" (map pretty_axm axms), |
227 Pretty.big_list "axioms:" (map pretty_axm axms), |
228 Pretty.strs ("oracles:" :: Thm.extern_oracles thy), |
228 Pretty.strs ("oracles:" :: Thm.extern_oracles ctxt), |
229 Pretty.big_list "definitions:" |
229 Pretty.big_list "definitions:" |
230 [pretty_finals reds0, |
230 [pretty_finals reds0, |
231 Pretty.big_list "non-overloaded:" (map pretty_reduct reds1), |
231 Pretty.big_list "non-overloaded:" (map pretty_reduct reds1), |
232 Pretty.big_list "overloaded:" (map pretty_reduct reds2), |
232 Pretty.big_list "overloaded:" (map pretty_reduct reds2), |
233 Pretty.big_list "pattern restrictions:" (map pretty_restrict rests)]] |
233 Pretty.big_list "pattern restrictions:" (map pretty_restrict rests)]] |