# HG changeset patch # User bulwahn # Date 1283234452 -7200 # Node ID 1afa9e89c8850cd477cec9dfba3c65836a08deea # Parent c4e6afaa8dcde818ef0e93aa53b17137cfebd2a2 adapting example files to latest changes diff -r c4e6afaa8dcd -r 1afa9e89c885 src/HOL/Predicate_Compile_Examples/Code_Prolog_Examples.thy --- a/src/HOL/Predicate_Compile_Examples/Code_Prolog_Examples.thy Tue Aug 31 08:00:51 2010 +0200 +++ b/src/HOL/Predicate_Compile_Examples/Code_Prolog_Examples.thy Tue Aug 31 08:00:52 2010 +0200 @@ -10,17 +10,26 @@ "append [] ys ys" | "append xs ys zs ==> append (x # xs) ys (x # zs)" -ML {* Code_Prolog.options := { ensure_groundness = false, limited_types = [], prolog_system = Code_Prolog.SWI_PROLOG} *} +ML {* Code_Prolog.options := + {ensure_groundness = false, + limited_types = [], limited_predicates = [], replacing = [], + prolog_system = Code_Prolog.SWI_PROLOG} *} values "{(x, y, z). append x y z}" values 3 "{(x, y, z). append x y z}" -ML {* Code_Prolog.options := { ensure_groundness = false, limited_types = [], prolog_system = Code_Prolog.YAP} *} +ML {* Code_Prolog.options := + {ensure_groundness = false, + limited_types = [], limited_predicates = [], replacing = [], + prolog_system = Code_Prolog.YAP} *} values "{(x, y, z). append x y z}" -ML {* Code_Prolog.options := { ensure_groundness = false, limited_types = [], prolog_system = Code_Prolog.SWI_PROLOG} *} +ML {* Code_Prolog.options := + {ensure_groundness = false, + limited_types = [], limited_predicates = [], replacing = [], + prolog_system = Code_Prolog.SWI_PROLOG} *} section {* Example queens *} @@ -183,7 +192,11 @@ where "y \ B \ notB y" -ML {* Code_Prolog.options := {ensure_groundness = true, limited_types = [], prolog_system = Code_Prolog.SWI_PROLOG} *} +ML {* Code_Prolog.options := {ensure_groundness = true, + limited_types = [], + limited_predicates = [], + replacing = [], + prolog_system = Code_Prolog.SWI_PROLOG} *} values 2 "{y. notB y}" diff -r c4e6afaa8dcd -r 1afa9e89c885 src/HOL/Predicate_Compile_Examples/Hotel_Example.thy --- a/src/HOL/Predicate_Compile_Examples/Hotel_Example.thy Tue Aug 31 08:00:51 2010 +0200 +++ b/src/HOL/Predicate_Compile_Examples/Hotel_Example.thy Tue Aug 31 08:00:52 2010 +0200 @@ -84,17 +84,21 @@ lemma [code_pred_inline]: "(op -) == (%A B x. A x \ \ B x)" by (auto simp add: Diff_iff[unfolded mem_def] expand_fun_eq intro!: eq_reflection) -ML {* Code_Prolog.options := {ensure_groundness = true} *} +ML {* Code_Prolog.options := + {ensure_groundness = true, + limited_types = [], + limited_predicates = [], + replacing = [], + prolog_system = Code_Prolog.SWI_PROLOG} *} values 40 "{s. hotel s}" setup {* Quickcheck.add_generator ("prolog", Code_Prolog.quickcheck) *} -ML {* set Code_Prolog.trace *} lemma "\ hotel s; g \ isin s r \ \ owns s r = Some g" quickcheck[generator = code, iterations = 100000, report] -quickcheck[generator = prolog, iterations = 1] +quickcheck[generator = prolog, iterations = 1, expect = counterexample] oops