equal
deleted
inserted
replaced
12 val dynamic_value: Proof.context -> term -> term |
12 val dynamic_value: Proof.context -> term -> term |
13 val static_conv: { ctxt: Proof.context, simpset: simpset option, consts: string list } |
13 val static_conv: { ctxt: Proof.context, simpset: simpset option, consts: string list } |
14 -> Proof.context -> conv |
14 -> Proof.context -> conv |
15 val static_tac: { ctxt: Proof.context, simpset: simpset option, consts: string list } |
15 val static_tac: { ctxt: Proof.context, simpset: simpset option, consts: string list } |
16 -> Proof.context -> int -> tactic |
16 -> Proof.context -> int -> tactic |
17 val setup: theory -> theory |
|
18 val trace: bool Config.T |
17 val trace: bool Config.T |
19 end; |
18 end; |
20 |
19 |
21 structure Code_Simp : CODE_SIMP = |
20 structure Code_Simp : CODE_SIMP = |
22 struct |
21 struct |
84 THEN' conclude_tac ctxt NONE ctxt; |
83 THEN' conclude_tac ctxt NONE ctxt; |
85 |
84 |
86 fun dynamic_value ctxt = |
85 fun dynamic_value ctxt = |
87 snd o Logic.dest_equals o Thm.prop_of o dynamic_conv ctxt o Thm.cterm_of (Proof_Context.theory_of ctxt); |
86 snd o Logic.dest_equals o Thm.prop_of o dynamic_conv ctxt o Thm.cterm_of (Proof_Context.theory_of ctxt); |
88 |
87 |
89 val setup = |
88 val _ = Theory.setup |
90 Method.setup @{binding code_simp} |
89 (Method.setup @{binding code_simp} |
91 (Scan.succeed (SIMPLE_METHOD' o (CHANGED_PROP oo dynamic_tac))) |
90 (Scan.succeed (SIMPLE_METHOD' o (CHANGED_PROP oo dynamic_tac))) |
92 "simplification with code equations"; |
91 "simplification with code equations"); |
93 |
92 |
94 |
93 |
95 (* evaluation with static code context *) |
94 (* evaluation with static code context *) |
96 |
95 |
97 fun static_conv { ctxt, simpset, consts } = |
96 fun static_conv { ctxt, simpset, consts } = |