added evaluation examples
authorhaftmann
Thu, 16 Aug 2007 11:45:05 +0200
changeset 24292 26ac9fe0e80e
parent 24291 fa72aab966dc
child 24293 7e67b9706211
added evaluation examples
src/HOL/ex/Eval_Examples.thy
src/Tools/nbe.ML
--- a/src/HOL/ex/Eval_Examples.thy	Wed Aug 15 22:21:13 2007 +0200
+++ b/src/HOL/ex/Eval_Examples.thy	Thu Aug 16 11:45:05 2007 +0200
@@ -8,12 +8,21 @@
 imports Eval
 begin
 
+text {* SML evaluation oracle *}
+
+lemma "True \<or> False" by evaluation
+lemma "\<not> (Suc 0 = Suc 1)" by evaluation
+lemma "[] = ([]\<Colon> int list)" by evaluation
+lemma "[()] = [()]" by evaluation
+lemma "fst ([]::nat list, Suc 0) = []" by evaluation
+
 text {* evaluation oracle *}
 
 lemma "True \<or> False" by eval
 lemma "\<not> (Suc 0 = Suc 1)" by eval
 lemma "[] = ([]\<Colon> int list)" by eval
 lemma "[()] = [()]" by eval
+lemma "fst ([]::nat list, Suc 0) = []" by eval
 
 text {* term evaluation *}
 
@@ -24,7 +33,6 @@
 value (overloaded) "(10\<Colon>int) \<le> 12"
 value (overloaded) "[(nat 100, ())]"
 value (overloaded) "[]::nat list"
-value (overloaded) "fst ([]::nat list, Suc 0) = []"
 
 text {* a fancy datatype *}
 
--- a/src/Tools/nbe.ML	Wed Aug 15 22:21:13 2007 +0200
+++ b/src/Tools/nbe.ML	Thu Aug 16 11:45:05 2007 +0200
@@ -346,7 +346,7 @@
   Logic.mk_equals (t, eval thy code t t' deps);
 
 fun normalization_invoke thy code t t' deps =
-  Thm.invoke_oracle_i thy "Code_Setup.normalization" (thy, Normalization (code, t, t', deps));
+  Thm.invoke_oracle_i thy "HOL.normalization" (thy, Normalization (code, t, t', deps));
   (*FIXME get rid of hardwired theory name*)
 
 fun normalization_conv ct =