src/Pure/Isar/isar_syn.ML
changeset 5881 2bded7137593
parent 5832 112a67aa9c2c
child 5896 4a75d89e2818
equal deleted inserted replaced
5880:feec44106a8e 5881:2bded7137593
     9   - axclass axioms: attribs;
     9   - axclass axioms: attribs;
    10   - instance: theory_to_proof (with special attribute to add result arity);
    10   - instance: theory_to_proof (with special attribute to add result arity);
    11   - witness: eliminate (!?);
    11   - witness: eliminate (!?);
    12   - result (interactive): print current result (?);
    12   - result (interactive): print current result (?);
    13   - check evaluation of transformers (exns!);
    13   - check evaluation of transformers (exns!);
    14   - print_thm: attributes;
       
    15   - 'result' command;
    14   - 'result' command;
    16   - '--' (comment) option everywhere;
    15   - '--' (comment) option everywhere;
    17   - 'chapter', 'section' etc.;
    16   - 'chapter', 'section' etc.;
    18 *)
    17 *)
    19 
    18 
   313   OuterSyntax.parser int name cmt
   312   OuterSyntax.parser int name cmt
   314     (meth >> (fn txt => Toplevel.print o Toplevel.proof (f txt)));
   313     (meth >> (fn txt => Toplevel.print o Toplevel.proof (f txt)));
   315 
   314 
   316 val stepP = gen_stepP method;
   315 val stepP = gen_stepP method;
   317 
   316 
   318 val tacP = stepP true "tac" "unstructured backward proof step, ignoring facts" IsarThy.tac;
   317 val refineP = stepP true "refine" "unstructured backward proof step, ignoring facts" IsarThy.tac;
   319 val etacP = stepP true "etac" "unstructured backward proof step, using facts" IsarThy.etac;
   318 val then_refineP =
       
   319   stepP true "then_refine" "unstructured backward proof step, using facts" IsarThy.then_tac;
   320 
   320 
   321 
   321 
   322 val proofP = gen_stepP (Scan.option method) false "proof" "backward proof" IsarThy.proof;
   322 val proofP = gen_stepP (Scan.option method) false "proof" "backward proof" IsarThy.proof;
   323 val terminal_proofP = stepP false "by" "terminal backward proof" IsarThy.terminal_proof;
   323 val terminal_proofP = stepP false "by" "terminal backward proof" IsarThy.terminal_proof;
   324 
   324 
   375 
   375 
   376 val print_syntaxP =
   376 val print_syntaxP =
   377   OuterSyntax.parser true "print_syntax" "print inner syntax of theory (verbose!)"
   377   OuterSyntax.parser true "print_syntax" "print inner syntax of theory (verbose!)"
   378     (Scan.succeed IsarCmd.print_syntax);
   378     (Scan.succeed IsarCmd.print_syntax);
   379 
   379 
       
   380 val print_theoremsP =
       
   381   OuterSyntax.parser true "print_theorems" "print theorems known in this theory"
       
   382     (Scan.succeed IsarCmd.print_theorems);
       
   383 
   380 val print_attributesP =
   384 val print_attributesP =
   381   OuterSyntax.parser true "print_attributes" "print attributes known in theory"
   385   OuterSyntax.parser true "print_attributes" "print attributes known in this theory"
   382     (Scan.succeed IsarCmd.print_attributes);
   386     (Scan.succeed IsarCmd.print_attributes);
   383 
   387 
   384 val print_methodsP =
   388 val print_methodsP =
   385   OuterSyntax.parser true "print_methods" "print methods known in theory"
   389   OuterSyntax.parser true "print_methods" "print methods known in this theory"
   386     (Scan.succeed IsarCmd.print_methods);
   390     (Scan.succeed IsarCmd.print_methods);
   387 
   391 
   388 val print_bindsP =
   392 val print_bindsP =
   389   OuterSyntax.parser true "print_binds" "print term bindings of proof context"
   393   OuterSyntax.parser true "print_binds" "print term bindings of proof context"
   390     (Scan.succeed IsarCmd.print_binds);
   394     (Scan.succeed IsarCmd.print_binds);
   393   OuterSyntax.parser true "print_facts" "print local theorems of proof context"
   397   OuterSyntax.parser true "print_facts" "print local theorems of proof context"
   394     (Scan.succeed IsarCmd.print_lthms);
   398     (Scan.succeed IsarCmd.print_lthms);
   395 
   399 
   396 val print_thmP =
   400 val print_thmP =
   397   OuterSyntax.parser true "print_thm" "print stored theorem(s)"
   401   OuterSyntax.parser true "print_thm" "print stored theorem(s)"
   398     (xname >> IsarCmd.print_thms);
   402     (xname -- opt_attribs >> IsarCmd.print_thms);
   399 
   403 
   400 val print_propP =
   404 val print_propP =
   401   OuterSyntax.parser true "print_prop" "read and print proposition"
   405   OuterSyntax.parser true "print_prop" "read and print proposition"
   402     (term >> IsarCmd.print_prop);
   406     (term >> IsarCmd.print_prop);
   403 
   407 
   425   OuterSyntax.parser true "use_thy" "use_thy theory file"
   429   OuterSyntax.parser true "use_thy" "use_thy theory file"
   426     (string >> IsarCmd.use_thy);
   430     (string >> IsarCmd.use_thy);
   427 
   431 
   428 val loadP =
   432 val loadP =
   429   OuterSyntax.parser true "load" "load theory file"
   433   OuterSyntax.parser true "load" "load theory file"
   430     (string >> IsarCmd.load);
   434     (name >> IsarCmd.load);
   431 
   435 
   432 val prP =
   436 val prP =
   433   OuterSyntax.parser true "pr" "print current toplevel state"
   437   OuterSyntax.parser true "pr" "print current toplevel state"
   434     (Scan.succeed (Toplevel.print o Toplevel.imperative (K ())));
   438     (Scan.succeed (Toplevel.print o Toplevel.imperative (K ())));
   435 
   439 
   474   parse_ast_translationP, parse_translationP, print_translationP,
   478   parse_ast_translationP, parse_translationP, print_translationP,
   475   typed_print_translationP, print_ast_translationP,
   479   typed_print_translationP, print_ast_translationP,
   476   token_translationP, oracleP,
   480   token_translationP, oracleP,
   477   (*proof commands*)
   481   (*proof commands*)
   478   theoremP, lemmaP, showP, haveP, assumeP, fixP, letP, thenP, fromP,
   482   theoremP, lemmaP, showP, haveP, assumeP, fixP, letP, thenP, fromP,
   479   beginP, nextP, qedP, qed_withP, kill_proofP, tacP, etacP, proofP,
   483   beginP, nextP, qedP, qed_withP, kill_proofP, refineP, then_refineP,
   480   terminal_proofP, trivial_proofP, default_proofP, clear_undoP, undoP,
   484   proofP, terminal_proofP, trivial_proofP, default_proofP,
   481   redoP, backP, prevP, upP, topP,
   485   clear_undoP, undoP, redoP, backP, prevP, upP, topP,
   482   (*diagnostic commands*)
   486   (*diagnostic commands*)
   483   print_commandsP, print_theoryP, print_syntaxP, print_attributesP,
   487   print_commandsP, print_theoryP, print_syntaxP, print_attributesP,
   484   print_methodsP, print_bindsP, print_lthmsP, print_thmP, print_propP,
   488   print_methodsP, print_theoremsP, print_bindsP, print_lthmsP,
   485   print_termP, print_typeP,
   489   print_thmP, print_propP, print_termP, print_typeP,
   486   (*system commands*)
   490   (*system commands*)
   487   cdP, pwdP, use_thyP, loadP, prP, commitP, quitP, exitP, breakP];
   491   cdP, pwdP, use_thyP, loadP, prP, commitP, quitP, exitP, breakP];
   488 
   492 
   489 
   493 
   490 end;
   494 end;