neuper@37906
|
1 |
(* tests for ME/ptyps.sml
|
neuper@37906
|
2 |
CAUTION: intermediately stores !ptyps THUS EVALUATE IN 1 GO
|
neuper@37906
|
3 |
author: Walther Neuper
|
neuper@37906
|
4 |
010916,
|
neuper@37906
|
5 |
(c) due to copyright terms
|
neuper@37906
|
6 |
|
neuper@37906
|
7 |
use"../smltest/ME/ptyps.sml";
|
neuper@37906
|
8 |
use"ptyps.sml";
|
neuper@37906
|
9 |
*)
|
neuper@37906
|
10 |
|
neuper@38036
|
11 |
"--------------------------------------------------------";
|
neuper@38036
|
12 |
"table of contents --------------------------------------";
|
neuper@38036
|
13 |
"--------------------------------------------------------";
|
neuper@38036
|
14 |
"###### val intermediate_ptyps = !ptyps; ################";
|
neuper@38036
|
15 |
"----------- store test-pbtyps --------------------------";
|
neuper@38036
|
16 |
"----------- refin test-pbtyps --------------------------";
|
neuper@38036
|
17 |
"----------- refine_ori test-pbtyps ---------------------";
|
neuper@38036
|
18 |
"----------- refine test-pbtyps -------------------------";
|
neuper@38036
|
19 |
"###### ptyps:= intermediate_ptyps;######################";
|
neuper@38036
|
20 |
"----------- Refine_Problem (aus subp-rooteq.sml) -------";
|
neuper@38036
|
21 |
"----------- fun coll_guhs ------------------------------";
|
neuper@38036
|
22 |
"----------- fun guh2kestoreID --------------------------";
|
neuper@38036
|
23 |
"--------------------------------------------------------";
|
neuper@38036
|
24 |
"--------------------------------------------------------";
|
neuper@38036
|
25 |
"--------------------------------------------------------";
|
neuper@37906
|
26 |
|
neuper@38036
|
27 |
(*========== inhibit exn ?======================================================
|
neuper@37906
|
28 |
"###### val intermediate_ptyps = !ptyps; #########################";
|
neuper@37906
|
29 |
"###### val intermediate_ptyps = !ptyps; #########################";
|
neuper@37906
|
30 |
"###### val intermediate_ptyps = !ptyps; #########################";
|
neuper@37906
|
31 |
val intermediate_ptyps = !ptyps;
|
neuper@37906
|
32 |
|
neuper@37906
|
33 |
"----------- store test-pbtyps -----------------------------------";
|
neuper@37906
|
34 |
"----------- store test-pbtyps -----------------------------------";
|
neuper@37906
|
35 |
"----------- store test-pbtyps -----------------------------------";
|
neuper@37906
|
36 |
ptyps:= ([]:ptyps);
|
neuper@37906
|
37 |
|
neuper@37906
|
38 |
store_pbt
|
neuper@37906
|
39 |
(prep_pbt DiffApp.thy "pbl_pbla" [] e_pblID
|
neuper@37906
|
40 |
(["pbla"],
|
neuper@37926
|
41 |
[("#Given", ["fixedValues a_"])], e_rls, NONE, []));
|
neuper@37906
|
42 |
store_pbt
|
neuper@37906
|
43 |
(prep_pbt DiffApp.thy "pbl_pbla1" [] e_pblID
|
neuper@37906
|
44 |
(["pbla1","pbla"],
|
neuper@37926
|
45 |
[("#Given", ["fixedValues a_","maximum a1_"])], e_rls, NONE, []));
|
neuper@37906
|
46 |
store_pbt
|
neuper@37906
|
47 |
(prep_pbt DiffApp.thy "pbl_pbla2" [] e_pblID
|
neuper@37906
|
48 |
(["pbla2","pbla"],
|
neuper@37926
|
49 |
[("#Given", ["fixedValues a_","valuesFor a2_"])], e_rls, NONE, []));
|
neuper@37906
|
50 |
store_pbt
|
neuper@37906
|
51 |
(prep_pbt DiffApp.thy "pbl_pbla2x" [] e_pblID
|
neuper@37906
|
52 |
(["pbla2x","pbla2","pbla"],
|
neuper@37906
|
53 |
[("#Given", ["fixedValues a_","valuesFor a2_","functionOf a2x_"])],
|
neuper@37926
|
54 |
e_rls, NONE, []));
|
neuper@37906
|
55 |
store_pbt
|
neuper@37906
|
56 |
(prep_pbt DiffApp.thy "pbl_pbla2y" [] e_pblID
|
neuper@37906
|
57 |
(["pbla2y","pbla2","pbla"],
|
neuper@37906
|
58 |
[("#Given" ,["fixedValues a_","valuesFor a2_","boundVariable a2y_"])],
|
neuper@37926
|
59 |
e_rls, NONE, []));
|
neuper@37906
|
60 |
store_pbt
|
neuper@37906
|
61 |
(prep_pbt DiffApp.thy "pbl_pbla2z" [] e_pblID
|
neuper@37906
|
62 |
(["pbla2z","pbla2","pbla"],
|
neuper@37906
|
63 |
[("#Given" ,["fixedValues a_","valuesFor a2_","interval a2z_"])],
|
neuper@37926
|
64 |
e_rls, NONE, []));
|
neuper@37906
|
65 |
store_pbt
|
neuper@37906
|
66 |
(prep_pbt DiffApp.thy "pbl_pbla3" [] e_pblID
|
neuper@37906
|
67 |
(["pbla3","pbla"],
|
neuper@37906
|
68 |
[("#Given" ,["fixedValues a_","relations a3_"])],
|
neuper@37926
|
69 |
e_rls, NONE, []));
|
neuper@37906
|
70 |
|
neuper@37906
|
71 |
show_ptyps();
|
neuper@37906
|
72 |
|
neuper@37906
|
73 |
(*case 1: no refinement *)
|
neuper@37906
|
74 |
val thy = Isac.thy;
|
neuper@37906
|
75 |
val (d1,ts1) = split_dts thy ((term_of o the o (parse thy))
|
neuper@37906
|
76 |
"fixedValues [aaa=0]");
|
neuper@37906
|
77 |
val (d2,ts2) = split_dts thy ((term_of o the o (parse thy))
|
neuper@37906
|
78 |
"errorBound (ddd=0)");
|
neuper@37906
|
79 |
val ori1 = [(1,[1],"#Given",d1,ts1),
|
neuper@37906
|
80 |
(2,[1],"#Given",d2,ts2)]:ori list;
|
neuper@37906
|
81 |
|
neuper@37906
|
82 |
|
neuper@37906
|
83 |
(*case 2: refined to pbt without children *)
|
neuper@37906
|
84 |
val (d2,ts2) = split_dts thy ((term_of o the o (parse thy))
|
neuper@37906
|
85 |
"relations [aaa333]");
|
neuper@37906
|
86 |
val ori2 = [(1,[1],"#Given",d1,ts1),
|
neuper@37906
|
87 |
(2,[1],"#Given",d2,ts2)]:ori list;
|
neuper@37906
|
88 |
|
neuper@37906
|
89 |
|
neuper@37906
|
90 |
(*case 3: refined to pbt with children *)
|
neuper@37906
|
91 |
val (d2,ts2) = split_dts thy ((term_of o the o (parse thy))
|
neuper@37906
|
92 |
"valuesFor [aaa222]");
|
neuper@37906
|
93 |
val ori3 = [(1,[1],"#Given",d1,ts1),
|
neuper@37906
|
94 |
(2,[1],"#Given",d2,ts2)]:ori list;
|
neuper@37906
|
95 |
|
neuper@37906
|
96 |
|
neuper@37906
|
97 |
(*case 4: refined to children (without child)*)
|
neuper@37906
|
98 |
val (d3,ts3) = split_dts thy ((term_of o the o (parse thy))
|
neuper@37906
|
99 |
"boundVariable aaa222yyy");
|
neuper@37906
|
100 |
val ori4 = [(1,[1],"#Given",d1,ts1),
|
neuper@37906
|
101 |
(2,[1],"#Given",d2,ts2),
|
neuper@37906
|
102 |
(3,[1],"#Given",d3,ts3)]:ori list;
|
neuper@37906
|
103 |
|
neuper@37906
|
104 |
"----------- refin test-pbtyps -----------------------------------";
|
neuper@37906
|
105 |
"----------- refin test-pbtyps -----------------------------------";
|
neuper@37906
|
106 |
"----------- refin test-pbtyps -----------------------------------";
|
neuper@37906
|
107 |
(*case 1: no refinement *)
|
neuper@37906
|
108 |
refin [] ori1 (hd (!ptyps));
|
neuper@37926
|
109 |
(*val it = SOME ["pbla"] : pblID option*)
|
neuper@37906
|
110 |
|
neuper@37906
|
111 |
(*case 2: refined to pbt without children *)
|
neuper@37906
|
112 |
refin [] ori2 (hd (!ptyps));
|
neuper@37926
|
113 |
(*val it = SOME ["pbla","pbla3"] : pblID option*)
|
neuper@37906
|
114 |
|
neuper@37906
|
115 |
(*case 3: refined to pbt with children *)
|
neuper@37906
|
116 |
refin [] ori3 (hd (!ptyps));
|
neuper@37926
|
117 |
(*val it = SOME ["pbla","pbla2"] : pblID option*)
|
neuper@37906
|
118 |
|
neuper@37906
|
119 |
(*case 4: refined to children (without child)*)
|
neuper@37906
|
120 |
refin [] ori4 (hd (!ptyps));
|
neuper@37926
|
121 |
(*val it = SOME ["pbla","pbla2","pbla2y"] : pblID option*)
|
neuper@37906
|
122 |
|
neuper@37906
|
123 |
(*case 5: start refinement somewhere in ptyps*)
|
neuper@37906
|
124 |
val [Ptyp ("pbla",_,[_, ppp as Ptyp ("pbla2",_,_), _])] = !ptyps;
|
neuper@37906
|
125 |
refin ["pbla"] ori4 ppp;
|
neuper@37926
|
126 |
(*val it = SOME ["pbla2","pbla2y"] : pblRD option*)
|
neuper@37906
|
127 |
|
neuper@37906
|
128 |
|
neuper@37906
|
129 |
"----------- refine_ori test-pbtyps ------------------------------";
|
neuper@37906
|
130 |
"----------- refine_ori test-pbtyps ------------------------------";
|
neuper@37906
|
131 |
"----------- refine_ori test-pbtyps ------------------------------";
|
neuper@37906
|
132 |
(*case 1: no refinement *)
|
neuper@37906
|
133 |
refine_ori ori1 ["pbla"];
|
neuper@37926
|
134 |
(*val it = NONE : pblID option !!!!*)
|
neuper@37906
|
135 |
|
neuper@37906
|
136 |
(*case 2: refined to pbt without children *)
|
neuper@37906
|
137 |
refine_ori ori2 ["pbla"];
|
neuper@37926
|
138 |
(*val it = SOME ["pbla3","pbla"] : pblID option*)
|
neuper@37906
|
139 |
|
neuper@37906
|
140 |
(*case 3: refined to pbt with children *)
|
neuper@37906
|
141 |
refine_ori ori3 ["pbla"];
|
neuper@37926
|
142 |
(*val it = SOME ["pbla2","pbla"] : pblID option*)
|
neuper@37906
|
143 |
|
neuper@37906
|
144 |
(*case 4: refined to children (without child)*)
|
neuper@37906
|
145 |
val opt = refine_ori ori4 ["pbla"];
|
neuper@37926
|
146 |
if opt = SOME ["pbla2y","pbla2","pbla"] then ()
|
neuper@38031
|
147 |
else error "new behaviour in refine.sml case 4";
|
neuper@37906
|
148 |
|
neuper@37906
|
149 |
(*case 5: start refinement somewhere in ptyps*)
|
neuper@37906
|
150 |
refine_ori ori4 ["pbla2","pbla"];
|
neuper@37926
|
151 |
(*val it = SOME ["pbla2y","pbla2","pbla"] : pblID option*)
|
neuper@37906
|
152 |
|
neuper@37906
|
153 |
|
neuper@37906
|
154 |
"----------- refine test-pbtyps ----------------------------------";
|
neuper@37906
|
155 |
"----------- refine test-pbtyps ----------------------------------";
|
neuper@37906
|
156 |
"----------- refine test-pbtyps ----------------------------------";
|
neuper@37906
|
157 |
val fmz1 = ["fixedValues [aaa=0]","errorBound (ddd=0)"];
|
neuper@37906
|
158 |
val fmz2 = ["fixedValues [aaa=0]","relations aaa333"];
|
neuper@37906
|
159 |
val fmz3 = ["fixedValues [aaa=0]","valuesFor [aaa222]"];
|
neuper@37906
|
160 |
val fmz4 = ["fixedValues [aaa=0]","valuesFor [aaa222]",
|
neuper@37906
|
161 |
"boundVariable aaa222yyy"];
|
neuper@37906
|
162 |
|
neuper@37906
|
163 |
(*case 1: no refinement *)
|
neuper@37906
|
164 |
refine fmz1 ["pbla"];
|
neuper@37906
|
165 |
(*
|
neuper@37906
|
166 |
*** pass ["pbla"]
|
neuper@37906
|
167 |
*** pass ["pbla","pbla1"]
|
neuper@37906
|
168 |
*** pass ["pbla","pbla2"]
|
neuper@37906
|
169 |
*** pass ["pbla","pbla3"]
|
neuper@37906
|
170 |
val it =
|
neuper@37906
|
171 |
[Matches
|
neuper@37906
|
172 |
(["pbla"],
|
neuper@37906
|
173 |
{Find=[],
|
neuper@37906
|
174 |
Given=[Correct "fixedValues [aaa = #0]",
|
neuper@37906
|
175 |
Superfl "errorBound (ddd = #0)"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
176 |
NoMatch
|
neuper@37906
|
177 |
(["pbla1","pbla"],
|
neuper@37906
|
178 |
{Find=[],
|
neuper@37906
|
179 |
Given=[Correct "fixedValues [aaa = #0]",Missing "maximum a1_",
|
neuper@37906
|
180 |
Superfl "errorBound (ddd = #0)"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
181 |
NoMatch
|
neuper@37906
|
182 |
(["pbla2","pbla"],
|
neuper@37906
|
183 |
{Find=[],
|
neuper@37906
|
184 |
Given=[Correct "fixedValues [aaa = #0]",Missing "valuesFor a2_",
|
neuper@37906
|
185 |
Superfl "errorBound (ddd = #0)"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
186 |
NoMatch
|
neuper@37906
|
187 |
(["pbla3","pbla"],
|
neuper@37906
|
188 |
{Find=[],
|
neuper@37906
|
189 |
Given=[Correct "fixedValues [aaa = #0]",Missing "relations a3_",
|
neuper@37906
|
190 |
Superfl "errorBound (ddd = #0)"],Relate=[],Where=[],With=[]})]
|
neuper@37906
|
191 |
: match list*)
|
neuper@37906
|
192 |
|
neuper@37906
|
193 |
(*case 2: refined to pbt without children *)
|
neuper@37906
|
194 |
refine fmz2 ["pbla"];
|
neuper@37906
|
195 |
(*
|
neuper@37906
|
196 |
*** pass ["pbla"]
|
neuper@37906
|
197 |
*** pass ["pbla","pbla1"]
|
neuper@37906
|
198 |
*** pass ["pbla","pbla2"]
|
neuper@37906
|
199 |
*** pass ["pbla","pbla3"]
|
neuper@37906
|
200 |
val it =
|
neuper@37906
|
201 |
[Matches
|
neuper@37906
|
202 |
(["pbla"],
|
neuper@37906
|
203 |
{Find=[],
|
neuper@37906
|
204 |
Given=[Correct "fixedValues [aaa = #0]",Superfl "relations aaa333"],
|
neuper@37906
|
205 |
Relate=[],Where=[],With=[]}),
|
neuper@37906
|
206 |
NoMatch
|
neuper@37906
|
207 |
(["pbla1","pbla"],
|
neuper@37906
|
208 |
{Find=[],
|
neuper@37906
|
209 |
Given=[Correct "fixedValues [aaa = #0]",Missing "maximum a1_",
|
neuper@37906
|
210 |
Superfl "relations aaa333"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
211 |
NoMatch
|
neuper@37906
|
212 |
(["pbla2","pbla"],
|
neuper@37906
|
213 |
{Find=[],
|
neuper@37906
|
214 |
Given=[Correct "fixedValues [aaa = #0]",Missing "valuesFor a2_",
|
neuper@37906
|
215 |
Superfl "relations aaa333"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
216 |
Matches
|
neuper@37906
|
217 |
(["pbla3","pbla"],
|
neuper@37906
|
218 |
{Find=[],
|
neuper@37906
|
219 |
Given=[Correct "fixedValues [aaa = #0]",Correct "relations aaa333"],
|
neuper@37906
|
220 |
Relate=[],Where=[],With=[]})] : match list*)
|
neuper@37906
|
221 |
|
neuper@37906
|
222 |
(*case 3: refined to pbt with children *)
|
neuper@37906
|
223 |
refine fmz3 ["pbla"];
|
neuper@37906
|
224 |
(*
|
neuper@37906
|
225 |
*** pass ["pbla"]
|
neuper@37906
|
226 |
*** pass ["pbla","pbla1"]
|
neuper@37906
|
227 |
*** pass ["pbla","pbla2"]
|
neuper@37906
|
228 |
*** pass ["pbla","pbla2","pbla2x"]
|
neuper@37906
|
229 |
*** pass ["pbla","pbla2","pbla2y"]
|
neuper@37906
|
230 |
*** pass ["pbla","pbla2","pbla2z"]
|
neuper@37906
|
231 |
*** pass ["pbla","pbla3"]
|
neuper@37906
|
232 |
val it =
|
neuper@37906
|
233 |
[Matches
|
neuper@37906
|
234 |
(["pbla"],
|
neuper@37906
|
235 |
{Find=[],
|
neuper@37906
|
236 |
Given=[Correct "fixedValues [aaa = #0]",Superfl "valuesFor aaa222"],
|
neuper@37906
|
237 |
Relate=[],Where=[],With=[]}),
|
neuper@37906
|
238 |
NoMatch
|
neuper@37906
|
239 |
(["pbla1","pbla"],
|
neuper@37906
|
240 |
{Find=[],
|
neuper@37906
|
241 |
Given=[Correct "fixedValues [aaa = #0]",Missing "maximum a1_",
|
neuper@37906
|
242 |
Superfl "valuesFor aaa222"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
243 |
Matches
|
neuper@37906
|
244 |
(["pbla2","pbla"],
|
neuper@37906
|
245 |
{Find=[],
|
neuper@37906
|
246 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222"],
|
neuper@37906
|
247 |
Relate=[],Where=[],With=[]}),
|
neuper@37906
|
248 |
NoMatch
|
neuper@37906
|
249 |
(["pbla2x","pbla2","pbla"],
|
neuper@37906
|
250 |
{Find=[],
|
neuper@37906
|
251 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
252 |
Missing "functionOf a2x_"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
253 |
NoMatch
|
neuper@37906
|
254 |
(["pbla2y","pbla2","pbla"],
|
neuper@37906
|
255 |
{Find=[],
|
neuper@37906
|
256 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
257 |
Missing "boundVariable a2y_"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
258 |
NoMatch
|
neuper@37906
|
259 |
(["pbla2z","pbla2","pbla"],
|
neuper@37906
|
260 |
{Find=[],
|
neuper@37906
|
261 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
262 |
Missing "interval a2z_"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
263 |
NoMatch
|
neuper@37906
|
264 |
(["pbla3","pbla"],
|
neuper@37906
|
265 |
{Find=[],
|
neuper@37906
|
266 |
Given=[Correct "fixedValues [aaa = #0]",Missing "relations a3_",
|
neuper@37906
|
267 |
Superfl "valuesFor aaa222"],Relate=[],Where=[],With=[]})]
|
neuper@37906
|
268 |
: match list*)
|
neuper@37906
|
269 |
|
neuper@37906
|
270 |
(*case 4: refined to children (without child)*)
|
neuper@37906
|
271 |
refine fmz4 ["pbla"];
|
neuper@37906
|
272 |
(*
|
neuper@37906
|
273 |
*** pass ["pbla"]
|
neuper@37906
|
274 |
*** pass ["pbla","pbla1"]
|
neuper@37906
|
275 |
*** pass ["pbla","pbla2"]
|
neuper@37906
|
276 |
*** pass ["pbla","pbla2","pbla2x"]
|
neuper@37906
|
277 |
*** pass ["pbla","pbla2","pbla2y"]
|
neuper@37906
|
278 |
val it =
|
neuper@37906
|
279 |
[Matches
|
neuper@37906
|
280 |
(["pbla"],
|
neuper@37906
|
281 |
{Find=[],
|
neuper@37906
|
282 |
Given=[Correct "fixedValues [aaa = #0]",Superfl "valuesFor aaa222",
|
neuper@37906
|
283 |
Superfl "boundVariable aaa222yyy"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
284 |
NoMatch
|
neuper@37906
|
285 |
(["pbla1","pbla"],
|
neuper@37906
|
286 |
{Find=[],
|
neuper@37906
|
287 |
Given=[Correct "fixedValues [aaa = #0]",Missing "maximum a1_",
|
neuper@37906
|
288 |
Superfl "valuesFor aaa222",Superfl "boundVariable aaa222yyy"],
|
neuper@37906
|
289 |
Relate=[],Where=[],With=[]}),
|
neuper@37906
|
290 |
Matches
|
neuper@37906
|
291 |
(["pbla2","pbla"],
|
neuper@37906
|
292 |
{Find=[],
|
neuper@37906
|
293 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
294 |
Superfl "boundVariable aaa222yyy"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
295 |
NoMatch
|
neuper@37906
|
296 |
(["pbla2x","pbla2","pbla"],
|
neuper@37906
|
297 |
{Find=[],
|
neuper@37906
|
298 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
299 |
Missing "functionOf a2x_",Superfl "boundVariable aaa222yyy"],
|
neuper@37906
|
300 |
Relate=[],Where=[],With=[]}),
|
neuper@37906
|
301 |
Matches
|
neuper@37906
|
302 |
(["pbla2y","pbla2","pbla"],
|
neuper@37906
|
303 |
{Find=[],
|
neuper@37906
|
304 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
305 |
Correct "boundVariable aaa222yyy"],Relate=[],Where=[],With=[]})]
|
neuper@37906
|
306 |
: match list*)
|
neuper@37906
|
307 |
|
neuper@37906
|
308 |
(*case 5: start refinement somewhere in ptyps*)
|
neuper@37906
|
309 |
refine fmz4 ["pbla2","pbla"];
|
neuper@37906
|
310 |
(*
|
neuper@37906
|
311 |
*** pass ["pbla","pbla2"]
|
neuper@37906
|
312 |
*** pass ["pbla","pbla2","pbla2x"]
|
neuper@37906
|
313 |
*** pass ["pbla","pbla2","pbla2y"]
|
neuper@37906
|
314 |
val it =
|
neuper@37906
|
315 |
[Matches
|
neuper@37906
|
316 |
(["pbla2","pbla"],
|
neuper@37906
|
317 |
{Find=[],
|
neuper@37906
|
318 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
319 |
Superfl "boundVariable aaa222yyy"],Relate=[],Where=[],With=[]}),
|
neuper@37906
|
320 |
NoMatch
|
neuper@37906
|
321 |
(["pbla2x","pbla2","pbla"],
|
neuper@37906
|
322 |
{Find=[],
|
neuper@37906
|
323 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
324 |
Missing "functionOf a2x_",Superfl "boundVariable aaa222yyy"],
|
neuper@37906
|
325 |
Relate=[],Where=[],With=[]}),
|
neuper@37906
|
326 |
Matches
|
neuper@37906
|
327 |
(["pbla2y","pbla2","pbla"],
|
neuper@37906
|
328 |
{Find=[],
|
neuper@37906
|
329 |
Given=[Correct "fixedValues [aaa = #0]",Correct "valuesFor aaa222",
|
neuper@37906
|
330 |
Correct "boundVariable aaa222yyy"],Relate=[],Where=[],With=[]})]
|
neuper@37906
|
331 |
: match list*)
|
neuper@37906
|
332 |
|
neuper@37906
|
333 |
"###### ptyps:= intermediate_ptyps;###############################";
|
neuper@37906
|
334 |
"###### ptyps:= intermediate_ptyps;###############################";
|
neuper@37906
|
335 |
"###### ptyps:= intermediate_ptyps;###############################";
|
neuper@37906
|
336 |
ptyps:= intermediate_ptyps;
|
neuper@37906
|
337 |
show_ptyps();
|
neuper@37906
|
338 |
|
neuper@37906
|
339 |
"----------- Refine_Problem (aus subp-rooteq.sml) ----------------";
|
neuper@37906
|
340 |
"----------- Refine_Problem (aus subp-rooteq.sml) ----------------";
|
neuper@37906
|
341 |
"----------- Refine_Problem (aus subp-rooteq.sml) ----------------";
|
neuper@37906
|
342 |
val fmz = ["equality ((x+1)*(x+2)=x^^^2+8)","solveFor x",
|
neuper@37906
|
343 |
"errorBound (eps=0)","solutions L"];
|
neuper@37906
|
344 |
val (dI',pI',mI') = ("Test.thy",["sqroot-test","univariate","equation","test"],
|
neuper@37906
|
345 |
["Test","squ-equ-test-subpbl1"]);
|
neuper@37906
|
346 |
val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (dI',pI',mI'))];
|
neuper@37906
|
347 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
348 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
349 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
350 |
(*nxt = ("Add_Find", Add_Find "solutions L")*)
|
neuper@37906
|
351 |
|
neuper@37906
|
352 |
val nxt = ("Specify_Problem",(*vvvv---specify a not-matching problem*)
|
neuper@37906
|
353 |
Specify_Problem ["linear","univariate","equation","test"]);
|
neuper@37906
|
354 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
355 |
(*ML> f;
|
neuper@37906
|
356 |
val it = Form' (PpcKF (0,EdUndef,0,Nundef,
|
neuper@37906
|
357 |
(Problem ["linear","univariate","equation","test"],
|
neuper@37906
|
358 |
{Find=[Incompl "solutions []"],
|
neuper@37906
|
359 |
Given=[Correct "equality ((x + #1) * (x + #2) = x ^^^ #2 + #8)",
|
neuper@37906
|
360 |
Correct "solveFor x"],Relate=[],
|
neuper@37906
|
361 |
Where=[False "matches (x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)
|
neuper@37906
|
362 |
|\nmatches (?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)
|
neuper@37906
|
363 |
|\nmatches (?a + x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)
|
neuper@37906
|
364 |
|\nmatches (?a + ?b * x = #0) ((x + #1) * (x + #2) = x ^^^ #2 + #8)"],
|
neuper@37906
|
365 |
With=[]}))) : mout
|
neuper@37906
|
366 |
val nxt = ("Add_Find",Add_Find "solutions L") ????!!!!????*)
|
neuper@37906
|
367 |
|
neuper@37906
|
368 |
val (p,_,f,nxt,_,pt) = (me nxt p c pt) handle e => print_exn e;
|
neuper@37906
|
369 |
val (p,_,f,nxt,_,pt) = me nxt p c pt(*NEW2*);
|
neuper@37906
|
370 |
(*val nxt = ("Empty_Tac",Empty_Tac)
|
neuper@37906
|
371 |
... Refine_Problem ["linear"..] fails internally 040312: works!?!*)
|
neuper@37906
|
372 |
|
neuper@37906
|
373 |
val nxt = ("Refine_Problem",Refine_Problem ["univariate","equation","test"]);
|
neuper@37906
|
374 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
375 |
(*("Specify_Problem", Specify_Problem ["normalize", "univariate", ...])*)
|
neuper@37906
|
376 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
377 |
(*nxt = ("Specify_Theory", Specify_Theory "Test.thy")*)
|
neuper@37906
|
378 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
379 |
(*nxt = ("Specify_Method", Specify_Method ["Test", "squ-equ-test-subpbl1"]*)
|
neuper@37906
|
380 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
381 |
(*nxt = ("Apply_Method", *)
|
neuper@37906
|
382 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
383 |
(*nxt = ("Rewrite_Set", Rewrite_Set "norm_equation")*)
|
neuper@37906
|
384 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
385 |
(*nxt = ("Rewrite_Set", Rewrite_Set "Test_simplify")*)
|
neuper@37906
|
386 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
387 |
(*Subproblem ("Test.thy", ["linear", "univariate", "equation", "test"]*)
|
neuper@37906
|
388 |
|
neuper@37906
|
389 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
390 |
(*nxt = Model_Problem ["linear","univariate","equation","test"]*)
|
neuper@37906
|
391 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
392 |
(*nxt = ("Add_Given", Add_Given "equality (-6 + 3 * x = 0)"*)
|
neuper@37906
|
393 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
394 |
(**)
|
neuper@38036
|
395 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;2
|
neuper@37906
|
396 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
397 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
398 |
(*nxt = Specify_Problem ["linear","univariate","equation","test"])*)
|
neuper@37906
|
399 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
400 |
(*xt = ("Specify_Method", Specify_Method ["Test", "solve_linear"])*)
|
neuper@37906
|
401 |
val nxt = ("Refine_Problem",Refine_Problem ["univariate","equation","test"]);
|
neuper@37906
|
402 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
403 |
(*("Specify_Problem", Specify_Problem ["linear", "univariate", ...])*)
|
neuper@37906
|
404 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
405 |
(*val nxt = ("Specify_Method",Specify_Method ("Test","solve_linear"))*)
|
neuper@37906
|
406 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
407 |
(*val nxt = ("Apply_Method",Apply_Method ("Test","solve_linear"))*)
|
neuper@37906
|
408 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
409 |
(*val nxt = ("Rewrite_Set_Inst",Rewrite_Set_Inst ([#],"isolate_bdv"))*)
|
neuper@37906
|
410 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
411 |
(*val nxt = ("Rewrite_Set",Rewrite_Set "Test_simplify")*)
|
neuper@37906
|
412 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
413 |
(*val nxt = ("Check_Postcond",Check_Postcond ["linear","univariate","eq*)
|
neuper@37906
|
414 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
415 |
(*val nxt = ("Check_elementwise",Check_elementwise "Assumptions")*)
|
neuper@37906
|
416 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
417 |
(*Check_Postcond ["normalize","univariate","equation","test"])*)
|
neuper@37906
|
418 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@37906
|
419 |
val Form' (FormKF (~1,EdUndef,_,Nundef,res)) = f;
|
neuper@37906
|
420 |
if (snd nxt)=End_Proof' andalso res="[x = 2]" then ()
|
neuper@38031
|
421 |
else error "new behaviour in test:refine.sml:miniscript with mini-subpb";
|
neuper@37906
|
422 |
|
neuper@37906
|
423 |
|
neuper@37906
|
424 |
"----------- fun coll_guhs ---------------------------------------";
|
neuper@37906
|
425 |
"----------- fun coll_guhs ---------------------------------------";
|
neuper@37906
|
426 |
"----------- fun coll_guhs ---------------------------------------";
|
neuper@37906
|
427 |
val n = e_pbt;
|
neuper@37906
|
428 |
(#guh : pbt -> guh) e_pbt;
|
neuper@37906
|
429 |
|
neuper@37906
|
430 |
fun XXXnode coll (Ptyp (_,[n],ns)) =
|
neuper@37906
|
431 |
[(#guh : pbt -> guh) n]
|
neuper@37906
|
432 |
and XXXnodes coll [] = coll
|
neuper@37906
|
433 |
| XXXnodes coll (n::ns : pbt ptyp list) = (XXXnode coll n) @
|
neuper@37906
|
434 |
(XXXnodes coll ns);
|
neuper@37906
|
435 |
(*^^^ this works, but not this ...
|
neuper@37906
|
436 |
fun node coll (Ptyp (_,[n],ns)) =
|
neuper@37906
|
437 |
[(#guh : 'a -> guh) n]
|
neuper@37906
|
438 |
and nodes coll [] = coll
|
neuper@37906
|
439 |
| nodes coll (n::ns : 'a ptyp list) = (node coll n) @ (nodes coll ns);
|
neuper@37906
|
440 |
|
neuper@37906
|
441 |
Error:
|
neuper@37906
|
442 |
Can't unify {guh: 'a, ...} with 'b (Cannot unify with explicit type variable)
|
neuper@37906
|
443 |
Found near #guh : 'a -> guh
|
neuper@37906
|
444 |
|
neuper@37906
|
445 |
i.e. there is no common fun for pbls and mets ?!?*)
|
neuper@37906
|
446 |
|
neuper@37906
|
447 |
coll_pblguhs (!ptyps);
|
neuper@37906
|
448 |
sort string_ord (coll_pblguhs (!ptyps));
|
neuper@37906
|
449 |
show_pblguhs ();
|
neuper@37906
|
450 |
sort_pblguhs ();
|
neuper@37906
|
451 |
|
neuper@37906
|
452 |
"----------- fun guh2kestoreID -----------------------------------";
|
neuper@37906
|
453 |
"----------- fun guh2kestoreID -----------------------------------";
|
neuper@37906
|
454 |
"----------- fun guh2kestoreID -----------------------------------";
|
neuper@37906
|
455 |
"----- we assumed the problem-hierarchy containing 3 elements on toplevel";
|
neuper@37906
|
456 |
val (Ptyp (id1,[n1 as {guh=guh1,...} : pbt], ns1)::
|
neuper@37906
|
457 |
Ptyp (id2,[n2 as {guh=guh2,...} : pbt], ns2):: _) = (!ptyps);
|
neuper@37906
|
458 |
(*
|
neuper@37906
|
459 |
nodes [] guh1 (!ptyps);
|
neuper@37906
|
460 |
nodes [] guh2 (!ptyps);
|
neuper@37906
|
461 |
*)
|
neuper@37906
|
462 |
val (Ptyp (id1,[n1 as {guh=guh1,...} : pbt], ns1)
|
neuper@37906
|
463 |
::
|
neuper@37906
|
464 |
Ptyp (id2,[n2 as {guh=guh2,...} : pbt],
|
neuper@37906
|
465 |
(Ptyp (id21,[n21 as {guh=guh21,...} : pbt], ns21)) :: _ )
|
neuper@37906
|
466 |
::
|
neuper@37906
|
467 |
Ptyp (id3,[n3 as {guh=guh3,...} : pbt], ns3)
|
neuper@37906
|
468 |
::
|
neuper@37906
|
469 |
_ ) = (!ptyps);
|
neuper@37906
|
470 |
(*
|
neuper@37906
|
471 |
nodes [] guh3 (!ptyps);
|
neuper@37906
|
472 |
nodes [] guh21 (!ptyps);
|
neuper@38036
|
473 |
*)
|
neuper@38036
|
474 |
============ inhibit exn ?====================================================*)
|
neuper@38036
|
475 |
|
neuper@38036
|
476 |
(*-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
|
neuper@38036
|
477 |
-.-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*)
|
neuper@38036
|
478 |
|