# HG changeset patch # User nipkow # Date 1347841538 -7200 # Node ID a9d9f3483b7135233fad276775083fd166467a27 # Parent 0fa4389c04f9e45133e95bc88a0d0d548807dbb9 tuned diff -r 0fa4389c04f9 -r a9d9f3483b71 src/HOL/IMP/Abs_Int1_const.thy --- a/src/HOL/IMP/Abs_Int1_const.thy Sun Sep 16 20:16:28 2012 +0200 +++ b/src/HOL/IMP/Abs_Int1_const.thy Mon Sep 17 02:25:38 2012 +0200 @@ -74,10 +74,6 @@ subsubsection "Tests" -(* FIXME dirty trick to get around some problem with the code generator *) -lemma [code]: "L X = (L X :: 'av::semilattice st set)" -by(rule refl) - definition "steps c i = (step_const(top c) ^^ i) (bot c)" value "show_acom (steps test1_const 0)" diff -r 0fa4389c04f9 -r a9d9f3483b71 src/HOL/IMP/Abs_Int1_parity.thy --- a/src/HOL/IMP/Abs_Int1_parity.thy Sun Sep 16 20:16:28 2012 +0200 +++ b/src/HOL/IMP/Abs_Int1_parity.thy Mon Sep 17 02:25:38 2012 +0200 @@ -118,10 +118,6 @@ subsubsection "Tests" -(* FIXME dirty trick to get around some problem with the code generator *) -lemma [code]: "L X = (L X :: 'av::semilattice st set)" -by(rule refl) - definition "test1_parity = ''x'' ::= N 1; WHILE Less (V ''x'') (N 100) DO ''x'' ::= Plus (V ''x'') (N 2)" diff -r 0fa4389c04f9 -r a9d9f3483b71 src/HOL/IMP/Abs_Int2_ivl.thy --- a/src/HOL/IMP/Abs_Int2_ivl.thy Sun Sep 16 20:16:28 2012 +0200 +++ b/src/HOL/IMP/Abs_Int2_ivl.thy Mon Sep 17 02:25:38 2012 +0200 @@ -248,10 +248,6 @@ subsubsection "Tests" -(* FIXME dirty trick to get around some problem with the code generator *) -lemma [code]: "L X = (L X :: 'av::semilattice st set)" -by(rule refl) - value "show_acom_opt (AI_ivl test1_ivl)" text{* Better than @{text AI_const}: *} diff -r 0fa4389c04f9 -r a9d9f3483b71 src/HOL/IMP/Abs_Int3.thy --- a/src/HOL/IMP/Abs_Int3.thy Sun Sep 16 20:16:28 2012 +0200 +++ b/src/HOL/IMP/Abs_Int3.thy Mon Sep 17 02:25:38 2012 +0200 @@ -383,7 +383,7 @@ subsubsection "Tests" -(* FIXME dirty trick to get around some problem with the code generator *) +(* Trick to make the code generator happy. *) lemma [code]: "equal_class.equal (x::'a st) y = equal_class.equal x y" by(rule refl) diff -r 0fa4389c04f9 -r a9d9f3483b71 src/HOL/IMP/Abs_State.thy --- a/src/HOL/IMP/Abs_State.thy Sun Sep 16 20:16:28 2012 +0200 +++ b/src/HOL/IMP/Abs_State.thy Mon Sep 17 02:25:38 2012 +0200 @@ -165,6 +165,14 @@ end +text{* Trick to make code generator happy. *} +lemma [code]: "L = (L :: _ \ _ st set)" +by(rule refl) +(* L is not used in the code but is part of a type class that is used. + Hence the code generator wants to build a dictionary with L in it. + But L is not executable. This looping defn makes it look as if it were. *) + + lemma mono_fun: "F \ G \ x : dom F \ fun F x \ fun G x" by(auto simp: le_st_def)