src/HOL/ex/Reflection.thy
changeset 20319 a8761e8568de
child 20374 01b711328990
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/HOL/ex/Reflection.thy	Thu Aug 03 15:03:05 2006 +0200
     1.3 @@ -0,0 +1,27 @@
     1.4 +(*
     1.5 +    ID:         $Id$
     1.6 +    Author:     Amine Chaieb, TU Muenchen
     1.7 +*)
     1.8 +
     1.9 +header {* Generic reflection and reification *}
    1.10 +
    1.11 +theory Reflection
    1.12 +imports Main
    1.13 +uses "reflection.ML"
    1.14 +begin
    1.15 +
    1.16 +method_setup reify = {*
    1.17 +  fn src =>
    1.18 +    Method.syntax (Attrib.thms --
    1.19 +      Scan.option (Scan.lift (Args.$$$ "(") |-- Args.term --| Scan.lift (Args.$$$ ")"))) src #>
    1.20 +  (fn (ctxt, (eqs,to)) => Method.SIMPLE_METHOD' HEADGOAL (Reflection.genreify_tac ctxt eqs to))
    1.21 +*} "partial automatic reification"
    1.22 +
    1.23 +method_setup reflection = {*
    1.24 +  fn src =>
    1.25 +    Method.syntax (Attrib.thms --
    1.26 +      Scan.option (Scan.lift (Args.$$$ "(") |-- Args.term --| Scan.lift (Args.$$$ ")"))) src #>
    1.27 +  (fn (ctxt, (ths,to)) => Method.SIMPLE_METHOD' HEADGOAL (Reflection.reflection_tac ctxt ths to))
    1.28 +*} "reflection method"
    1.29 +
    1.30 +end