src/HOL/Predicate_Compile_Examples/List_Examples.thy
author bulwahn
Tue Sep 07 11:51:53 2010 +0200 (2010-09-07)
changeset 39189 d183bf90dabd
parent 39184 71f3f194b962
child 39463 7ce0ed8dc4d6
permissions -rw-r--r--
adapting example files
     1 theory List_Examples
     2 imports Main "Predicate_Compile_Quickcheck" "Code_Prolog"
     3 begin
     4 
     5 setup {* Quickcheck.add_generator ("prolog", Code_Prolog.quickcheck) *}
     6 
     7 setup {* Code_Prolog.map_code_options (K 
     8   {ensure_groundness = true,
     9    limited_types = [(@{typ nat}, 2), (@{typ "nat list"}, 4)],
    10    limited_predicates = [(["appendP"], 4), (["revP"], 4)],
    11    replacing =
    12      [(("appendP", "limited_appendP"), "quickcheck"),
    13       (("revP", "limited_revP"), "quickcheck"),
    14       (("appendP", "limited_appendP"), "lim_revP")],
    15    manual_reorder = [],
    16    timeout = Time.fromSeconds 10,
    17    prolog_system = Code_Prolog.SWI_PROLOG}) *}
    18 
    19 lemma "(xs :: nat list) = ys @ ys --> rev xs = xs"
    20 quickcheck[generator = code, iterations = 200000, expect = counterexample]
    21 quickcheck[generator = predicate_compile_wo_ff, iterations = 1, expect = counterexample]
    22 quickcheck[generator = prolog, expect = counterexample]
    23 oops
    24 
    25 end