5 *) |
5 *) |
6 |
6 |
7 structure Predicate_Comp_Funs = |
7 structure Predicate_Comp_Funs = |
8 struct |
8 struct |
9 |
9 |
10 fun mk_predT T = Type (@{type_name Predicate.pred}, [T]) |
10 fun mk_monadT T = Type (@{type_name Predicate.pred}, [T]) |
11 |
11 |
12 fun dest_predT (Type (@{type_name Predicate.pred}, [T])) = T |
12 fun dest_monadT (Type (@{type_name Predicate.pred}, [T])) = T |
13 | dest_predT T = raise TYPE ("dest_predT", [T], []); |
13 | dest_monadT T = raise TYPE ("dest_monadT", [T], []); |
14 |
14 |
15 fun mk_bot T = Const (@{const_name Orderings.bot}, mk_predT T); |
15 fun mk_empty T = Const (@{const_name Orderings.bot}, mk_monadT T); |
16 |
16 |
17 fun mk_single t = |
17 fun mk_single t = |
18 let val T = fastype_of t |
18 let val T = fastype_of t |
19 in Const(@{const_name Predicate.single}, T --> mk_predT T) $ t end; |
19 in Const(@{const_name Predicate.single}, T --> mk_monadT T) $ t end; |
20 |
20 |
21 fun mk_bind (x, f) = |
21 fun mk_bind (x, f) = |
22 let val T as Type ("fun", [_, U]) = fastype_of f |
22 let val T as Type ("fun", [_, U]) = fastype_of f |
23 in |
23 in |
24 Const (@{const_name Predicate.bind}, fastype_of x --> T --> U) $ x $ f |
24 Const (@{const_name Predicate.bind}, fastype_of x --> T --> U) $ x $ f |
25 end; |
25 end; |
26 |
26 |
27 val mk_sup = HOLogic.mk_binop @{const_name sup}; |
27 val mk_plus = HOLogic.mk_binop @{const_name sup}; |
28 |
28 |
29 fun mk_if cond = Const (@{const_name Predicate.if_pred}, |
29 fun mk_if cond = Const (@{const_name Predicate.if_pred}, |
30 HOLogic.boolT --> mk_predT HOLogic.unitT) $ cond; |
30 HOLogic.boolT --> mk_monadT HOLogic.unitT) $ cond; |
31 |
31 |
32 fun mk_iterate_upto T (f, from, to) = |
32 fun mk_iterate_upto T (f, from, to) = |
33 list_comb (Const (@{const_name Code_Numeral.iterate_upto}, |
33 list_comb (Const (@{const_name Code_Numeral.iterate_upto}, |
34 [@{typ code_numeral} --> T, @{typ code_numeral}, @{typ code_numeral}] ---> mk_predT T), |
34 [@{typ code_numeral} --> T, @{typ code_numeral}, @{typ code_numeral}] ---> mk_monadT T), |
35 [f, from, to]) |
35 [f, from, to]) |
36 |
36 |
37 fun mk_not t = |
37 fun mk_not t = |
38 let |
38 let |
39 val T = mk_predT HOLogic.unitT |
39 val T = mk_monadT HOLogic.unitT |
40 in Const (@{const_name Predicate.not_pred}, T --> T) $ t end |
40 in Const (@{const_name Predicate.not_pred}, T --> T) $ t end |
41 |
41 |
42 fun mk_Enum f = |
42 fun mk_Enum f = |
43 let val T as Type ("fun", [T', _]) = fastype_of f |
43 let val T as Type ("fun", [T', _]) = fastype_of f |
44 in |
44 in |
45 Const (@{const_name Predicate.Pred}, T --> mk_predT T') $ f |
45 Const (@{const_name Predicate.Pred}, T --> mk_monadT T') $ f |
46 end; |
46 end; |
47 |
47 |
48 fun mk_Eval (f, x) = |
48 fun mk_Eval (f, x) = |
49 let |
49 let |
50 val T = dest_predT (fastype_of f) |
50 val T = dest_monadT (fastype_of f) |
51 in |
51 in |
52 Const (@{const_name Predicate.eval}, mk_predT T --> T --> HOLogic.boolT) $ f $ x |
52 Const (@{const_name Predicate.eval}, mk_monadT T --> T --> HOLogic.boolT) $ f $ x |
53 end; |
53 end; |
54 |
54 |
55 fun dest_Eval (Const (@{const_name Predicate.eval}, _) $ f $ x) = (f, x) |
55 fun dest_Eval (Const (@{const_name Predicate.eval}, _) $ f $ x) = (f, x) |
56 |
56 |
57 fun mk_map T1 T2 tf tp = Const (@{const_name Predicate.map}, |
57 fun mk_map T1 T2 tf tp = Const (@{const_name Predicate.map}, |
58 (T1 --> T2) --> mk_predT T1 --> mk_predT T2) $ tf $ tp; |
58 (T1 --> T2) --> mk_monadT T1 --> mk_monadT T2) $ tf $ tp; |
59 |
59 |
60 val compfuns = Predicate_Compile_Aux.CompilationFuns |
60 val compfuns = Predicate_Compile_Aux.CompilationFuns |
61 {mk_predT = mk_predT, dest_predT = dest_predT, mk_bot = mk_bot, |
61 {mk_monadT = mk_monadT, dest_monadT = dest_monadT, mk_empty = mk_empty, |
62 mk_single = mk_single, mk_bind = mk_bind, mk_sup = mk_sup, mk_if = mk_if, |
62 mk_single = mk_single, mk_bind = mk_bind, mk_plus = mk_plus, mk_if = mk_if, |
63 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map}; |
63 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map}; |
64 |
64 |
65 end; |
65 end; |
66 |
66 |
67 structure CPS_Comp_Funs = |
67 structure CPS_Comp_Funs = |
68 struct |
68 struct |
69 |
69 |
70 fun mk_predT T = (T --> @{typ "Code_Evaluation.term list option"}) --> @{typ "Code_Evaluation.term list option"} |
70 fun mk_monadT T = (T --> @{typ "Code_Evaluation.term list option"}) --> @{typ "Code_Evaluation.term list option"} |
71 |
71 |
72 fun dest_predT (Type ("fun", [Type ("fun", [T, @{typ "term list option"}]), @{typ "term list option"}])) = T |
72 fun dest_monadT (Type ("fun", [Type ("fun", [T, @{typ "term list option"}]), @{typ "term list option"}])) = T |
73 | dest_predT T = raise TYPE ("dest_predT", [T], []); |
73 | dest_monadT T = raise TYPE ("dest_monadT", [T], []); |
74 |
74 |
75 fun mk_bot T = Const (@{const_name Quickcheck_Exhaustive.cps_empty}, mk_predT T); |
75 fun mk_empty T = Const (@{const_name Quickcheck_Exhaustive.cps_empty}, mk_monadT T); |
76 |
76 |
77 fun mk_single t = |
77 fun mk_single t = |
78 let val T = fastype_of t |
78 let val T = fastype_of t |
79 in Const(@{const_name Quickcheck_Exhaustive.cps_single}, T --> mk_predT T) $ t end; |
79 in Const(@{const_name Quickcheck_Exhaustive.cps_single}, T --> mk_monadT T) $ t end; |
80 |
80 |
81 fun mk_bind (x, f) = |
81 fun mk_bind (x, f) = |
82 let val T as Type ("fun", [_, U]) = fastype_of f |
82 let val T as Type ("fun", [_, U]) = fastype_of f |
83 in |
83 in |
84 Const (@{const_name Quickcheck_Exhaustive.cps_bind}, fastype_of x --> T --> U) $ x $ f |
84 Const (@{const_name Quickcheck_Exhaustive.cps_bind}, fastype_of x --> T --> U) $ x $ f |
85 end; |
85 end; |
86 |
86 |
87 val mk_sup = HOLogic.mk_binop @{const_name Quickcheck_Exhaustive.cps_plus}; |
87 val mk_plus = HOLogic.mk_binop @{const_name Quickcheck_Exhaustive.cps_plus}; |
88 |
88 |
89 fun mk_if cond = Const (@{const_name Quickcheck_Exhaustive.cps_if}, |
89 fun mk_if cond = Const (@{const_name Quickcheck_Exhaustive.cps_if}, |
90 HOLogic.boolT --> mk_predT HOLogic.unitT) $ cond; |
90 HOLogic.boolT --> mk_monadT HOLogic.unitT) $ cond; |
91 |
91 |
92 fun mk_iterate_upto T (f, from, to) = error "not implemented yet" |
92 fun mk_iterate_upto T (f, from, to) = error "not implemented yet" |
93 |
93 |
94 fun mk_not t = |
94 fun mk_not t = |
95 let |
95 let |
96 val T = mk_predT HOLogic.unitT |
96 val T = mk_monadT HOLogic.unitT |
97 in Const (@{const_name Quickcheck_Exhaustive.cps_not}, T --> T) $ t end |
97 in Const (@{const_name Quickcheck_Exhaustive.cps_not}, T --> T) $ t end |
98 |
98 |
99 fun mk_Enum f = error "not implemented" |
99 fun mk_Enum f = error "not implemented" |
100 |
100 |
101 fun mk_Eval (f, x) = error "not implemented" |
101 fun mk_Eval (f, x) = error "not implemented" |
103 fun dest_Eval t = error "not implemented" |
103 fun dest_Eval t = error "not implemented" |
104 |
104 |
105 fun mk_map T1 T2 tf tp = error "not implemented" |
105 fun mk_map T1 T2 tf tp = error "not implemented" |
106 |
106 |
107 val compfuns = Predicate_Compile_Aux.CompilationFuns |
107 val compfuns = Predicate_Compile_Aux.CompilationFuns |
108 {mk_predT = mk_predT, dest_predT = dest_predT, mk_bot = mk_bot, |
108 {mk_monadT = mk_monadT, dest_monadT = dest_monadT, mk_empty = mk_empty, |
109 mk_single = mk_single, mk_bind = mk_bind, mk_sup = mk_sup, mk_if = mk_if, |
109 mk_single = mk_single, mk_bind = mk_bind, mk_plus = mk_plus, mk_if = mk_if, |
110 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map}; |
110 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map}; |
111 |
111 |
112 end; |
112 end; |
113 |
113 |
114 structure Pos_Bounded_CPS_Comp_Funs = |
114 structure Pos_Bounded_CPS_Comp_Funs = |
115 struct |
115 struct |
116 |
116 |
117 fun mk_predT T = (T --> @{typ "Code_Evaluation.term list option"}) --> @{typ "code_numeral => Code_Evaluation.term list option"} |
117 fun mk_monadT T = (T --> @{typ "Code_Evaluation.term list option"}) --> @{typ "code_numeral => Code_Evaluation.term list option"} |
118 |
118 |
119 fun dest_predT (Type ("fun", [Type ("fun", [T, @{typ "term list option"}]), @{typ "code_numeral => term list option"}])) = T |
119 fun dest_monadT (Type ("fun", [Type ("fun", [T, @{typ "term list option"}]), @{typ "code_numeral => term list option"}])) = T |
120 | dest_predT T = raise TYPE ("dest_predT", [T], []); |
120 | dest_monadT T = raise TYPE ("dest_monadT", [T], []); |
121 |
121 |
122 fun mk_bot T = Const (@{const_name Quickcheck_Exhaustive.pos_bound_cps_empty}, mk_predT T); |
122 fun mk_empty T = Const (@{const_name Quickcheck_Exhaustive.pos_bound_cps_empty}, mk_monadT T); |
123 |
123 |
124 fun mk_single t = |
124 fun mk_single t = |
125 let val T = fastype_of t |
125 let val T = fastype_of t |
126 in Const(@{const_name Quickcheck_Exhaustive.pos_bound_cps_single}, T --> mk_predT T) $ t end; |
126 in Const(@{const_name Quickcheck_Exhaustive.pos_bound_cps_single}, T --> mk_monadT T) $ t end; |
127 |
127 |
128 fun mk_bind (x, f) = |
128 fun mk_bind (x, f) = |
129 let val T as Type ("fun", [_, U]) = fastype_of f |
129 let val T as Type ("fun", [_, U]) = fastype_of f |
130 in |
130 in |
131 Const (@{const_name Quickcheck_Exhaustive.pos_bound_cps_bind}, fastype_of x --> T --> U) $ x $ f |
131 Const (@{const_name Quickcheck_Exhaustive.pos_bound_cps_bind}, fastype_of x --> T --> U) $ x $ f |
132 end; |
132 end; |
133 |
133 |
134 val mk_sup = HOLogic.mk_binop @{const_name Quickcheck_Exhaustive.pos_bound_cps_plus}; |
134 val mk_plus = HOLogic.mk_binop @{const_name Quickcheck_Exhaustive.pos_bound_cps_plus}; |
135 |
135 |
136 fun mk_if cond = Const (@{const_name Quickcheck_Exhaustive.pos_bound_cps_if}, |
136 fun mk_if cond = Const (@{const_name Quickcheck_Exhaustive.pos_bound_cps_if}, |
137 HOLogic.boolT --> mk_predT HOLogic.unitT) $ cond; |
137 HOLogic.boolT --> mk_monadT HOLogic.unitT) $ cond; |
138 |
138 |
139 fun mk_iterate_upto T (f, from, to) = error "not implemented yet" |
139 fun mk_iterate_upto T (f, from, to) = error "not implemented yet" |
140 |
140 |
141 fun mk_not t = |
141 fun mk_not t = |
142 let |
142 let |
143 val nT = @{typ "(unit Quickcheck_Exhaustive.unknown => |
143 val nT = @{typ "(unit Quickcheck_Exhaustive.unknown => |
144 Code_Evaluation.term list Quickcheck_Exhaustive.three_valued) => code_numeral => |
144 Code_Evaluation.term list Quickcheck_Exhaustive.three_valued) => code_numeral => |
145 Code_Evaluation.term list Quickcheck_Exhaustive.three_valued"} |
145 Code_Evaluation.term list Quickcheck_Exhaustive.three_valued"} |
146 val T = mk_predT HOLogic.unitT |
146 val T = mk_monadT HOLogic.unitT |
147 in Const (@{const_name Quickcheck_Exhaustive.pos_bound_cps_not}, nT --> T) $ t end |
147 in Const (@{const_name Quickcheck_Exhaustive.pos_bound_cps_not}, nT --> T) $ t end |
148 |
148 |
149 fun mk_Enum f = error "not implemented" |
149 fun mk_Enum f = error "not implemented" |
150 |
150 |
151 fun mk_Eval (f, x) = error "not implemented" |
151 fun mk_Eval (f, x) = error "not implemented" |
153 fun dest_Eval t = error "not implemented" |
153 fun dest_Eval t = error "not implemented" |
154 |
154 |
155 fun mk_map T1 T2 tf tp = error "not implemented" |
155 fun mk_map T1 T2 tf tp = error "not implemented" |
156 |
156 |
157 val compfuns = Predicate_Compile_Aux.CompilationFuns |
157 val compfuns = Predicate_Compile_Aux.CompilationFuns |
158 {mk_predT = mk_predT, dest_predT = dest_predT, mk_bot = mk_bot, |
158 {mk_monadT = mk_monadT, dest_monadT = dest_monadT, mk_empty = mk_empty, |
159 mk_single = mk_single, mk_bind = mk_bind, mk_sup = mk_sup, mk_if = mk_if, |
159 mk_single = mk_single, mk_bind = mk_bind, mk_plus = mk_plus, mk_if = mk_if, |
160 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map}; |
160 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map}; |
161 |
161 |
162 end; |
162 end; |
163 |
163 |
164 structure Neg_Bounded_CPS_Comp_Funs = |
164 structure Neg_Bounded_CPS_Comp_Funs = |
165 struct |
165 struct |
166 |
166 |
167 fun mk_predT T = |
167 fun mk_monadT T = |
168 (Type (@{type_name "Quickcheck_Exhaustive.unknown"}, [T]) |
168 (Type (@{type_name "Quickcheck_Exhaustive.unknown"}, [T]) |
169 --> @{typ "Code_Evaluation.term list Quickcheck_Exhaustive.three_valued"}) |
169 --> @{typ "Code_Evaluation.term list Quickcheck_Exhaustive.three_valued"}) |
170 --> @{typ "code_numeral => Code_Evaluation.term list Quickcheck_Exhaustive.three_valued"} |
170 --> @{typ "code_numeral => Code_Evaluation.term list Quickcheck_Exhaustive.three_valued"} |
171 |
171 |
172 fun dest_predT (Type ("fun", [Type ("fun", [Type (@{type_name "Quickcheck_Exhaustive.unknown"}, [T]), |
172 fun dest_monadT (Type ("fun", [Type ("fun", [Type (@{type_name "Quickcheck_Exhaustive.unknown"}, [T]), |
173 @{typ "term list Quickcheck_Exhaustive.three_valued"}]), |
173 @{typ "term list Quickcheck_Exhaustive.three_valued"}]), |
174 @{typ "code_numeral => term list Quickcheck_Exhaustive.three_valued"}])) = T |
174 @{typ "code_numeral => term list Quickcheck_Exhaustive.three_valued"}])) = T |
175 | dest_predT T = raise TYPE ("dest_predT", [T], []); |
175 | dest_monadT T = raise TYPE ("dest_monadT", [T], []); |
176 |
176 |
177 fun mk_bot T = Const (@{const_name Quickcheck_Exhaustive.neg_bound_cps_empty}, mk_predT T); |
177 fun mk_empty T = Const (@{const_name Quickcheck_Exhaustive.neg_bound_cps_empty}, mk_monadT T); |
178 |
178 |
179 fun mk_single t = |
179 fun mk_single t = |
180 let val T = fastype_of t |
180 let val T = fastype_of t |
181 in Const(@{const_name Quickcheck_Exhaustive.neg_bound_cps_single}, T --> mk_predT T) $ t end; |
181 in Const(@{const_name Quickcheck_Exhaustive.neg_bound_cps_single}, T --> mk_monadT T) $ t end; |
182 |
182 |
183 fun mk_bind (x, f) = |
183 fun mk_bind (x, f) = |
184 let val T as Type ("fun", [_, U]) = fastype_of f |
184 let val T as Type ("fun", [_, U]) = fastype_of f |
185 in |
185 in |
186 Const (@{const_name Quickcheck_Exhaustive.neg_bound_cps_bind}, fastype_of x --> T --> U) $ x $ f |
186 Const (@{const_name Quickcheck_Exhaustive.neg_bound_cps_bind}, fastype_of x --> T --> U) $ x $ f |
187 end; |
187 end; |
188 |
188 |
189 val mk_sup = HOLogic.mk_binop @{const_name Quickcheck_Exhaustive.neg_bound_cps_plus}; |
189 val mk_plus = HOLogic.mk_binop @{const_name Quickcheck_Exhaustive.neg_bound_cps_plus}; |
190 |
190 |
191 fun mk_if cond = Const (@{const_name Quickcheck_Exhaustive.neg_bound_cps_if}, |
191 fun mk_if cond = Const (@{const_name Quickcheck_Exhaustive.neg_bound_cps_if}, |
192 HOLogic.boolT --> mk_predT HOLogic.unitT) $ cond; |
192 HOLogic.boolT --> mk_monadT HOLogic.unitT) $ cond; |
193 |
193 |
194 fun mk_iterate_upto T (f, from, to) = error "not implemented" |
194 fun mk_iterate_upto T (f, from, to) = error "not implemented" |
195 |
195 |
196 fun mk_not t = |
196 fun mk_not t = |
197 let |
197 let |
198 val T = mk_predT HOLogic.unitT |
198 val T = mk_monadT HOLogic.unitT |
199 val pT = @{typ "(unit => Code_Evaluation.term list option) => code_numeral => Code_Evaluation.term list option"} |
199 val pT = @{typ "(unit => Code_Evaluation.term list option) => code_numeral => Code_Evaluation.term list option"} |
200 in Const (@{const_name Quickcheck_Exhaustive.neg_bound_cps_not}, pT --> T) $ t end |
200 in Const (@{const_name Quickcheck_Exhaustive.neg_bound_cps_not}, pT --> T) $ t end |
201 |
201 |
202 fun mk_Enum f = error "not implemented" |
202 fun mk_Enum f = error "not implemented" |
203 |
203 |
206 fun dest_Eval t = error "not implemented" |
206 fun dest_Eval t = error "not implemented" |
207 |
207 |
208 fun mk_map T1 T2 tf tp = error "not implemented" |
208 fun mk_map T1 T2 tf tp = error "not implemented" |
209 |
209 |
210 val compfuns = Predicate_Compile_Aux.CompilationFuns |
210 val compfuns = Predicate_Compile_Aux.CompilationFuns |
211 {mk_predT = mk_predT, dest_predT = dest_predT, mk_bot = mk_bot, |
211 {mk_monadT = mk_monadT, dest_monadT = dest_monadT, mk_empty = mk_empty, |
212 mk_single = mk_single, mk_bind = mk_bind, mk_sup = mk_sup, mk_if = mk_if, |
212 mk_single = mk_single, mk_bind = mk_bind, mk_plus = mk_plus, mk_if = mk_if, |
213 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map}; |
213 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map}; |
214 |
214 |
215 end; |
215 end; |
216 |
216 |
217 |
217 |
218 structure RandomPredCompFuns = |
218 structure RandomPredCompFuns = |
219 struct |
219 struct |
220 |
220 |
221 fun mk_randompredT T = |
221 fun mk_randompredT T = |
222 @{typ Random.seed} --> HOLogic.mk_prodT (Predicate_Comp_Funs.mk_predT T, @{typ Random.seed}) |
222 @{typ Random.seed} --> HOLogic.mk_prodT (Predicate_Comp_Funs.mk_monadT T, @{typ Random.seed}) |
223 |
223 |
224 fun dest_randompredT (Type ("fun", [@{typ Random.seed}, Type (@{type_name Product_Type.prod}, |
224 fun dest_randompredT (Type ("fun", [@{typ Random.seed}, Type (@{type_name Product_Type.prod}, |
225 [Type (@{type_name "Predicate.pred"}, [T]), @{typ Random.seed}])])) = T |
225 [Type (@{type_name "Predicate.pred"}, [T]), @{typ Random.seed}])])) = T |
226 | dest_randompredT T = raise TYPE ("dest_randompredT", [T], []); |
226 | dest_randompredT T = raise TYPE ("dest_randompredT", [T], []); |
227 |
227 |
228 fun mk_bot T = Const(@{const_name Quickcheck.empty}, mk_randompredT T) |
228 fun mk_empty T = Const(@{const_name Quickcheck.empty}, mk_randompredT T) |
229 |
229 |
230 fun mk_single t = |
230 fun mk_single t = |
231 let |
231 let |
232 val T = fastype_of t |
232 val T = fastype_of t |
233 in |
233 in |
356 |
356 |
357 fun mk_map T1 T2 tf tp = Const (@{const_name New_DSequence.pos_map}, |
357 fun mk_map T1 T2 tf tp = Const (@{const_name New_DSequence.pos_map}, |
358 (T1 --> T2) --> mk_pos_dseqT T1 --> mk_pos_dseqT T2) $ tf $ tp |
358 (T1 --> T2) --> mk_pos_dseqT T1 --> mk_pos_dseqT T2) $ tf $ tp |
359 |
359 |
360 val depth_limited_compfuns = Predicate_Compile_Aux.CompilationFuns |
360 val depth_limited_compfuns = Predicate_Compile_Aux.CompilationFuns |
361 {mk_predT = mk_pos_dseqT, dest_predT = dest_pos_dseqT, |
361 {mk_monadT = mk_pos_dseqT, dest_monadT = dest_pos_dseqT, |
362 mk_bot = mk_bot, mk_single = mk_single, mk_bind = mk_decr_bind, mk_sup = mk_sup, mk_if = mk_if, |
362 mk_empty = mk_empty, mk_single = mk_single, mk_bind = mk_decr_bind, mk_plus = mk_plus, mk_if = mk_if, |
363 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
363 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
364 |
364 |
365 val depth_unlimited_compfuns = Predicate_Compile_Aux.CompilationFuns |
365 val depth_unlimited_compfuns = Predicate_Compile_Aux.CompilationFuns |
366 {mk_predT = mk_pos_dseqT, dest_predT = dest_pos_dseqT, |
366 {mk_monadT = mk_pos_dseqT, dest_monadT = dest_pos_dseqT, |
367 mk_bot = mk_bot, mk_single = mk_single, mk_bind = mk_bind, mk_sup = mk_sup, mk_if = mk_if, |
367 mk_empty = mk_empty, mk_single = mk_single, mk_bind = mk_bind, mk_plus = mk_plus, mk_if = mk_if, |
368 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
368 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
369 |
369 |
370 end; |
370 end; |
371 |
371 |
372 structure New_Neg_DSequence_CompFuns = |
372 structure New_Neg_DSequence_CompFuns = |
417 |
417 |
418 fun mk_map T1 T2 tf tp = Const (@{const_name New_DSequence.neg_map}, |
418 fun mk_map T1 T2 tf tp = Const (@{const_name New_DSequence.neg_map}, |
419 (T1 --> T2) --> mk_neg_dseqT T1 --> mk_neg_dseqT T2) $ tf $ tp |
419 (T1 --> T2) --> mk_neg_dseqT T1 --> mk_neg_dseqT T2) $ tf $ tp |
420 |
420 |
421 val depth_limited_compfuns = Predicate_Compile_Aux.CompilationFuns |
421 val depth_limited_compfuns = Predicate_Compile_Aux.CompilationFuns |
422 {mk_predT = mk_neg_dseqT, dest_predT = dest_neg_dseqT, |
422 {mk_monadT = mk_neg_dseqT, dest_monadT = dest_neg_dseqT, |
423 mk_bot = mk_bot, mk_single = mk_single, mk_bind = mk_decr_bind, mk_sup = mk_sup, mk_if = mk_if, |
423 mk_empty = mk_empty, mk_single = mk_single, mk_bind = mk_decr_bind, mk_plus = mk_plus, mk_if = mk_if, |
424 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
424 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
425 |
425 |
426 val depth_unlimited_compfuns = Predicate_Compile_Aux.CompilationFuns |
426 val depth_unlimited_compfuns = Predicate_Compile_Aux.CompilationFuns |
427 {mk_predT = mk_neg_dseqT, dest_predT = dest_neg_dseqT, |
427 {mk_monadT = mk_neg_dseqT, dest_monadT = dest_neg_dseqT, |
428 mk_bot = mk_bot, mk_single = mk_single, mk_bind = mk_bind, mk_sup = mk_sup, mk_if = mk_if, |
428 mk_empty = mk_empty, mk_single = mk_single, mk_bind = mk_bind, mk_plus = mk_plus, mk_if = mk_if, |
429 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
429 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
430 |
430 |
431 end; |
431 end; |
432 |
432 |
433 structure New_Pos_Random_Sequence_CompFuns = |
433 structure New_Pos_Random_Sequence_CompFuns = |
485 |
485 |
486 fun mk_map T1 T2 tf tp = Const (@{const_name New_Random_Sequence.pos_map}, |
486 fun mk_map T1 T2 tf tp = Const (@{const_name New_Random_Sequence.pos_map}, |
487 (T1 --> T2) --> mk_pos_random_dseqT T1 --> mk_pos_random_dseqT T2) $ tf $ tp |
487 (T1 --> T2) --> mk_pos_random_dseqT T1 --> mk_pos_random_dseqT T2) $ tf $ tp |
488 |
488 |
489 val depth_limited_compfuns = Predicate_Compile_Aux.CompilationFuns |
489 val depth_limited_compfuns = Predicate_Compile_Aux.CompilationFuns |
490 {mk_predT = mk_pos_random_dseqT, dest_predT = dest_pos_random_dseqT, |
490 {mk_monadT = mk_pos_random_dseqT, dest_monadT = dest_pos_random_dseqT, |
491 mk_bot = mk_bot, mk_single = mk_single, mk_bind = mk_decr_bind, mk_sup = mk_sup, mk_if = mk_if, |
491 mk_empty = mk_empty, mk_single = mk_single, mk_bind = mk_decr_bind, mk_plus = mk_plus, mk_if = mk_if, |
492 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
492 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
493 |
493 |
494 val depth_unlimited_compfuns = Predicate_Compile_Aux.CompilationFuns |
494 val depth_unlimited_compfuns = Predicate_Compile_Aux.CompilationFuns |
495 {mk_predT = mk_pos_random_dseqT, dest_predT = dest_pos_random_dseqT, |
495 {mk_monadT = mk_pos_random_dseqT, dest_monadT = dest_pos_random_dseqT, |
496 mk_bot = mk_bot, mk_single = mk_single, mk_bind = mk_bind, mk_sup = mk_sup, mk_if = mk_if, |
496 mk_empty = mk_empty, mk_single = mk_single, mk_bind = mk_bind, mk_plus = mk_plus, mk_if = mk_if, |
497 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
497 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
498 end; |
498 end; |
499 |
499 |
500 structure New_Neg_Random_Sequence_CompFuns = |
500 structure New_Neg_Random_Sequence_CompFuns = |
501 struct |
501 struct |
552 |
552 |
553 fun mk_map T1 T2 tf tp = Const (@{const_name New_Random_Sequence.neg_map}, |
553 fun mk_map T1 T2 tf tp = Const (@{const_name New_Random_Sequence.neg_map}, |
554 (T1 --> T2) --> mk_neg_random_dseqT T1 --> mk_neg_random_dseqT T2) $ tf $ tp |
554 (T1 --> T2) --> mk_neg_random_dseqT T1 --> mk_neg_random_dseqT T2) $ tf $ tp |
555 |
555 |
556 val depth_limited_compfuns = Predicate_Compile_Aux.CompilationFuns |
556 val depth_limited_compfuns = Predicate_Compile_Aux.CompilationFuns |
557 {mk_predT = mk_neg_random_dseqT, dest_predT = dest_neg_random_dseqT, |
557 {mk_monadT = mk_neg_random_dseqT, dest_monadT = dest_neg_random_dseqT, |
558 mk_bot = mk_bot, mk_single = mk_single, mk_bind = mk_decr_bind, mk_sup = mk_sup, mk_if = mk_if, |
558 mk_empty = mk_empty, mk_single = mk_single, mk_bind = mk_decr_bind, mk_plus = mk_plus, mk_if = mk_if, |
559 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
559 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
560 |
560 |
561 val depth_unlimited_compfuns = Predicate_Compile_Aux.CompilationFuns |
561 val depth_unlimited_compfuns = Predicate_Compile_Aux.CompilationFuns |
562 {mk_predT = mk_neg_random_dseqT, dest_predT = dest_neg_random_dseqT, |
562 {mk_monadT = mk_neg_random_dseqT, dest_monadT = dest_neg_random_dseqT, |
563 mk_bot = mk_bot, mk_single = mk_single, mk_bind = mk_bind, mk_sup = mk_sup, mk_if = mk_if, |
563 mk_empty = mk_empty, mk_single = mk_single, mk_bind = mk_bind, mk_plus = mk_plus, mk_if = mk_if, |
564 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
564 mk_iterate_upto = mk_iterate_upto, mk_not = mk_not, mk_map = mk_map} |
565 |
565 |
566 end; |
566 end; |
567 |
567 |
568 structure Random_Sequence_CompFuns = |
568 structure Random_Sequence_CompFuns = |