src/Pure/Pure.thy
changeset 70560 7714971a58b5
parent 70205 3293471cf176
child 70570 d94456876f2d
equal deleted inserted replaced
70559:c92443e8d724 70560:7714971a58b5
    82     "print_definitions" "print_syntax" "print_abbrevs" "print_defn_rules"
    82     "print_definitions" "print_syntax" "print_abbrevs" "print_defn_rules"
    83     "print_theorems" "print_locales" "print_classes" "print_locale"
    83     "print_theorems" "print_locales" "print_classes" "print_locale"
    84     "print_interps" "print_dependencies" "print_attributes"
    84     "print_interps" "print_dependencies" "print_attributes"
    85     "print_simpset" "print_rules" "print_trans_rules" "print_methods"
    85     "print_simpset" "print_rules" "print_trans_rules" "print_methods"
    86     "print_antiquotations" "print_ML_antiquotations" "thy_deps"
    86     "print_antiquotations" "print_ML_antiquotations" "thy_deps"
    87     "locale_deps" "class_deps" "thm_deps" "print_term_bindings"
    87     "locale_deps" "class_deps" "thm_deps" "thm_oracles" "print_term_bindings"
    88     "print_facts" "print_cases" "print_statement" "thm" "prf" "full_prf"
    88     "print_facts" "print_cases" "print_statement" "thm" "prf" "full_prf"
    89     "prop" "term" "typ" "print_codesetup" "unused_thms" :: diag
    89     "prop" "term" "typ" "print_codesetup" "unused_thms" :: diag
    90   and "print_state" :: diag
    90   and "print_state" :: diag
    91   and "welcome" :: diag
    91   and "welcome" :: diag
    92   and "end" :: thy_end
    92   and "end" :: thy_end
  1305     (Parse.thms1 >> (fn args =>
  1305     (Parse.thms1 >> (fn args =>
  1306       Toplevel.keep (fn st =>
  1306       Toplevel.keep (fn st =>
  1307         Thm_Deps.thm_deps (Toplevel.theory_of st)
  1307         Thm_Deps.thm_deps (Toplevel.theory_of st)
  1308           (Attrib.eval_thms (Toplevel.context_of st) args))));
  1308           (Attrib.eval_thms (Toplevel.context_of st) args))));
  1309 
  1309 
       
  1310 val _ =
       
  1311   Outer_Syntax.command \<^command_keyword>\<open>thm_oracles\<close>
       
  1312     "print all oracles used in theorems (full graph of transitive dependencies)"
       
  1313     (Parse.thms1 >> (fn args =>
       
  1314       Toplevel.keep (fn st =>
       
  1315         let
       
  1316           val ctxt = Toplevel.context_of st;
       
  1317           val thms = Attrib.eval_thms ctxt args;
       
  1318         in Pretty.writeln (Thm_Deps.pretty_thm_oracles ctxt thms) end)));
  1310 
  1319 
  1311 val thy_names = Scan.repeat1 (Scan.unless Parse.minus Parse.theory_name);
  1320 val thy_names = Scan.repeat1 (Scan.unless Parse.minus Parse.theory_name);
  1312 
  1321 
  1313 val _ =
  1322 val _ =
  1314   Outer_Syntax.command \<^command_keyword>\<open>unused_thms\<close> "find unused theorems"
  1323   Outer_Syntax.command \<^command_keyword>\<open>unused_thms\<close> "find unused theorems"