equal
deleted
inserted
replaced
|
1 theory Hotel_Example_Small_Generator |
|
2 imports Hotel_Example Predicate_Compile_Alternative_Defs |
|
3 uses "~~/src/HOL/Tools/Predicate_Compile/predicate_compile_quickcheck.ML" |
|
4 begin |
|
5 |
|
6 declare Let_def[code_pred_inline] |
|
7 |
|
8 instantiation room :: small_lazy |
|
9 begin |
|
10 |
|
11 definition |
|
12 "small_lazy i = Lazy_Sequence.single Room0" |
|
13 |
|
14 instance .. |
|
15 |
|
16 end |
|
17 |
|
18 instantiation key :: small_lazy |
|
19 begin |
|
20 |
|
21 definition |
|
22 "small_lazy i = Lazy_Sequence.append (Lazy_Sequence.single Key0) (Lazy_Sequence.append (Lazy_Sequence.single Key1) (Lazy_Sequence.append (Lazy_Sequence.single Key2) (Lazy_Sequence.single Key3)))" |
|
23 |
|
24 instance .. |
|
25 |
|
26 end |
|
27 |
|
28 instantiation guest :: small_lazy |
|
29 begin |
|
30 |
|
31 definition |
|
32 "small_lazy i = Lazy_Sequence.append (Lazy_Sequence.single Guest0) (Lazy_Sequence.single Guest1)" |
|
33 |
|
34 instance .. |
|
35 |
|
36 end |
|
37 |
|
38 setup {* Context.theory_map (Quickcheck.add_generator ("small_generators_depth_14", Predicate_Compile_Quickcheck.quickcheck_compile_term |
|
39 Predicate_Compile_Aux.Pos_Generator_DSeq true true 14)) *} |
|
40 |
|
41 |
|
42 setup {* Context.theory_map (Quickcheck.add_generator ("small_generators_depth_15", Predicate_Compile_Quickcheck.quickcheck_compile_term |
|
43 Predicate_Compile_Aux.Pos_Generator_DSeq true true 15)) *} |
|
44 |
|
45 lemma |
|
46 "hotel s ==> feels_safe s r ==> g \<in> isin s r ==> owns s r = Some g" |
|
47 quickcheck[generator = small_generators_depth_14, iterations = 1, expect = no_counterexample] |
|
48 quickcheck[generator = small_generators_depth_15, iterations = 1, expect = counterexample] |
|
49 oops |
|
50 |
|
51 |
|
52 end |