walther@59633
|
1 |
(* Title: ProgLang/auto_prog.sml
|
walther@59633
|
2 |
Author: Walther Neuper 190922
|
walther@59633
|
3 |
(c) due to copyright terms
|
walther@59633
|
4 |
*)
|
walther@59633
|
5 |
|
walther@59633
|
6 |
"-----------------------------------------------------------------------------------------------";
|
walther@59633
|
7 |
"-----------------------------------------------------------------------------------------------";
|
walther@59633
|
8 |
"table of contents -----------------------------------------------------------------------------";
|
walther@59633
|
9 |
"-----------------------------------------------------------------------------------------------";
|
walther@59633
|
10 |
"-------- check auto-gen.script for Rewrite_Set_Inst -------------------------------------------";
|
walther@59633
|
11 |
"-------- test the same called by interSteps norm_Poly -----------------------------------------";
|
walther@59633
|
12 |
"-------- test the same called by interSteps norm_Rational -------------------------------------";
|
walther@59633
|
13 |
"-------- fun op @@ ----------------------------------------------------------------------------";
|
walther@59633
|
14 |
"-------- fun rules2scr_Rls --------------------------------------------------------------------";
|
walther@59633
|
15 |
"-------- fun rule2stac, fun rule2stac_inst ----------------------------------------------------";
|
walther@59633
|
16 |
"-------- fun stacpbls -------------------------------------------------------------------------";
|
walther@59633
|
17 |
"-------- fun is_calc, fun op_of_calc ----------------------------------------------------------";
|
walther@59633
|
18 |
"-----------------------------------------------------------------------------------------------";
|
walther@59633
|
19 |
"-----------------------------------------------------------------------------------------------";
|
walther@59633
|
20 |
"-----------------------------------------------------------------------------------------------";
|
walther@59633
|
21 |
|
walther@59633
|
22 |
|
walther@59633
|
23 |
"-------- check auto-gen.script for Rewrite_Set_Inst -------------------------------------------";
|
walther@59633
|
24 |
"-------- check auto-gen.script for Rewrite_Set_Inst -------------------------------------------";
|
walther@59633
|
25 |
"-------- check auto-gen.script for Rewrite_Set_Inst -------------------------------------------";
|
walther@59633
|
26 |
val rls = assoc_rls "integration";
|
walther@59633
|
27 |
val Seq {scr = Prog auto_script,...} = rls;
|
walther@59633
|
28 |
writeln(term2str auto_script);
|
walther@59633
|
29 |
|
walther@59633
|
30 |
if contain_bdv (get_rules rls) then ()
|
walther@59633
|
31 |
else error "scrtools.sml: contain_bdv doesnt work for 'integration'";
|
walther@59633
|
32 |
|
walther@59633
|
33 |
if terms2str (formal_args auto_script) = "[\"t_t\",\"v\"]"
|
walther@59633
|
34 |
then () else error "formal_args of auto-gen.script changed";
|
walther@59633
|
35 |
init_istate (Rewrite_Set_Inst (["(''bdv'', x)"], "integration_rules"))
|
walther@59633
|
36 |
(str2term "someTermWithBdv");
|
walther@59633
|
37 |
|
walther@59633
|
38 |
"-------- test the same called by interSteps norm_Poly -----------------------------------------";
|
walther@59633
|
39 |
"-------- test the same called by interSteps norm_Poly -----------------------------------------";
|
walther@59633
|
40 |
"-------- test the same called by interSteps norm_Poly -----------------------------------------";
|
walther@59633
|
41 |
val Seq {scr = Prog auto_script,...} = assoc_rls "norm_Poly";
|
walther@59633
|
42 |
writeln(term2str auto_script);
|
walther@59633
|
43 |
(*Program Stepwise t_t =
|
walther@59635
|
44 |
(Try (Rewrite_Set discard_minus) @@
|
walther@59635
|
45 |
Try (Rewrite_Set expand_poly_) @@
|
walther@59633
|
46 |
Try (Repeat (Calculate TIMES)) @@
|
walther@59635
|
47 |
Try (Rewrite_Set order_mult_rls_) @@
|
walther@59635
|
48 |
Try (Rewrite_Set simplify_power_) @@
|
walther@59635
|
49 |
Try (Rewrite_Set calc_add_mult_pow_) @@
|
walther@59635
|
50 |
Try (Rewrite_Set reduce_012_mult_) @@
|
walther@59635
|
51 |
Try (Rewrite_Set order_add_rls_) @@
|
walther@59635
|
52 |
Try (Rewrite_Set collect_numerals_) @@
|
walther@59635
|
53 |
Try (Rewrite_Set reduce_012_) @@
|
walther@59635
|
54 |
Try (Rewrite_Set discard_parentheses1))
|
walther@59633
|
55 |
??.empty ..WORKS, NEVERTHELESS *)
|
walther@59633
|
56 |
atomty auto_script;
|
walther@59633
|
57 |
|
walther@59633
|
58 |
reset_states (); (*<-- evaluate, if ML-blocks are edited below*)
|
walther@59633
|
59 |
CalcTree
|
walther@59633
|
60 |
[(["Term (b + a - b)", "normalform N"],
|
walther@59633
|
61 |
("Poly",["polynomial","simplification"],
|
walther@59633
|
62 |
["simplification","for_polynomials"]))];
|
walther@59633
|
63 |
Iterator 1;
|
walther@59633
|
64 |
moveActiveRoot 1;
|
walther@59633
|
65 |
|
walther@59633
|
66 |
autoCalculate 1 CompleteCalc;
|
walther@59633
|
67 |
val ((pt,p),_) = get_calc 1;
|
walther@59633
|
68 |
show_pt pt;
|
walther@59633
|
69 |
(* isabisac17 = 15 [
|
walther@59633
|
70 |
(([], Frm), Simplify (b + a - b)),
|
walther@59633
|
71 |
(([1], Frm), b + a - b),
|
walther@59633
|
72 |
(([1], Res), a),
|
walther@59633
|
73 |
(([], Res), a)] *)
|
walther@59633
|
74 |
|
walther@59633
|
75 |
interSteps 1 ([], Res);
|
walther@59633
|
76 |
val ((pt,p),_) = get_calc 1; show_pt pt;
|
walther@59633
|
77 |
show_pt pt;
|
walther@59633
|
78 |
(* isabisac17 = 15 [
|
walther@59633
|
79 |
(([], Frm), Simplify (b + a - b)),
|
walther@59633
|
80 |
(([1], Frm), b + a - b),
|
walther@59633
|
81 |
(([1], Res), a),
|
walther@59633
|
82 |
(([], Res), a)] *)
|
walther@59633
|
83 |
|
walther@59633
|
84 |
interSteps 1 ([1], Res);(*<SYSERROR><CALCID>1</CALCID><ERROR>error in kernel 8</ERROR></SYSERROR>*)
|
walther@59633
|
85 |
"~~~~~ fun interSteps, args:"; val (cI, ip) = (1, ([1], Res));
|
walther@59633
|
86 |
val ((pt, p), tacis) = get_calc cI;
|
walther@59633
|
87 |
(*if*) (not o is_interpos) ip = false;
|
walther@59633
|
88 |
val ip' = lev_pred' pt ip;
|
walther@59633
|
89 |
|
walther@59633
|
90 |
(*Math_Engine.detailstep pt ip ..ERROR interSteps>..>init_istate: "norm_Poly" has EmptyScr*)
|
walther@59633
|
91 |
val ("donesteps", ctree_BEFORE_step_into, pos'_BEFORE_step_into) = Math_Engine.detailstep pt ip;
|
walther@59633
|
92 |
"~~~~~ fun detailstep, args:"; val (pt, (pos as (p, _))) = (pt, ip);
|
walther@59633
|
93 |
val nd = Ctree.get_nd pt p
|
walther@59633
|
94 |
val cn = Ctree.children nd;
|
walther@59633
|
95 |
(*if*) null cn = false;
|
walther@59633
|
96 |
|
walther@59633
|
97 |
"~~~~~ to detailrls return val:";
|
walther@59633
|
98 |
(*else*)
|
walther@59633
|
99 |
val return_val = ("donesteps", pt, (p @ [length (Ctree.children (Ctree.get_nd pt p))], Ctree.Res));
|
walther@59633
|
100 |
if p @ [length (Ctree.children (Ctree.get_nd pt p))] = [1, 4]
|
walther@59633
|
101 |
then () else error "detailrls: auto-generated norm_Poly doesnt work";
|
walther@59633
|
102 |
|
walther@59633
|
103 |
val ((pt,p),_) = get_calc 1; show_pt pt;
|
walther@59633
|
104 |
show_pt pt; (*[
|
walther@59633
|
105 |
(([], Frm), Simplify (b + a - b)),
|
walther@59633
|
106 |
(([1], Frm), b + a - b),
|
walther@59633
|
107 |
(([1,1], Frm), b + a - b),
|
walther@59633
|
108 |
(([1,1], Res), b + a + -1 * b),
|
walther@59633
|
109 |
(([1,2], Res), a + b + -1 * b),
|
walther@59633
|
110 |
(([1,3], Res), a + 0 * b),
|
walther@59633
|
111 |
(([1,4], Res), a),
|
walther@59633
|
112 |
(([1], Res), a),
|
walther@59633
|
113 |
(([], Res), a)] *)
|
walther@59633
|
114 |
if existpt' ([1,4], Res) pt then ()
|
walther@59633
|
115 |
else error "auto-generated norm_Poly doesnt work";
|
walther@59633
|
116 |
|
walther@59633
|
117 |
"-------- test the same called by interSteps norm_Rational -------------------------------------";
|
walther@59633
|
118 |
"-------- test the same called by interSteps norm_Rational -------------------------------------";
|
walther@59633
|
119 |
"-------- test the same called by interSteps norm_Rational -------------------------------------";
|
walther@59633
|
120 |
val Seq {scr = Prog auto_script,...} = assoc_rls "norm_Rational";
|
walther@59633
|
121 |
writeln(term2str auto_script);
|
walther@59633
|
122 |
atomty auto_script;
|
walther@59633
|
123 |
(***
|
walther@59633
|
124 |
*** Const (Program.Stepwise, 'z => 'z => 'z)
|
walther@59633
|
125 |
*** . Free (t_t, 'z)
|
walther@59633
|
126 |
*** . Const (Program.Seq, ('a => 'a) => ('a => 'a) => 'a => 'a)
|
walther@59633
|
127 |
*** . . Const (Program.Try, ('a => 'a) => 'a => 'a)
|
walther@59635
|
128 |
*** . . . Const (Program.Rewrite'_Set, ID => 'a => 'a)
|
walther@59633
|
129 |
*** . . . . Free (discard_minus, ID)
|
walther@59633
|
130 |
*** . . Const (Program.Seq, ('a => 'a) => ('a => 'a) => 'a => 'a)
|
walther@59633
|
131 |
*** . . . Const (Program.Try, ('a => 'a) => 'a => 'a)
|
walther@59635
|
132 |
*** . . . . Const (Program.Rewrite'_Set, ID => 'a => 'a)
|
walther@59633
|
133 |
*** . . . . . Free (rat_mult_poly, ID)
|
walther@59633
|
134 |
*** . . . Const (Program.Seq, ('a => 'a) => ('a => 'a) => 'a => 'a)
|
walther@59633
|
135 |
*** . . . . Const (Program.Try, ('a => 'a) => 'a => 'a)
|
walther@59635
|
136 |
*** . . . . . Const (Program.Rewrite'_Set, ID => 'a => 'a)
|
walther@59633
|
137 |
*** . . . . . . Free (make_rat_poly_with_parentheses, ID)
|
walther@59633
|
138 |
*** . . . . Const (Program.Seq, ('a => 'a) => ('a => 'a) => 'a => 'a)
|
walther@59633
|
139 |
*** . . . . . Const (Program.Try, ('a => 'a) => 'a => 'a)
|
walther@59635
|
140 |
*** . . . . . . Const (Program.Rewrite'_Set, ID => 'a => 'a)
|
walther@59633
|
141 |
*** . . . . . . . Free (cancel_p_rls, ID)
|
walther@59633
|
142 |
*** . . . . . Const (Program.Seq, ('a => 'a) => ('a => 'a) => 'a => 'a)
|
walther@59633
|
143 |
*** . . . . . . Const (Program.Try, ('a => 'a) => 'a => 'a)
|
walther@59635
|
144 |
*** . . . . . . . Const (Program.Rewrite'_Set, ID => 'a => 'a)
|
walther@59633
|
145 |
*** . . . . . . . . Free (norm_Rational_rls, ID)
|
walther@59633
|
146 |
*** . . . . . . Const (Program.Try, ('a => 'a) => 'a => 'a)
|
walther@59635
|
147 |
*** . . . . . . . Const (Program.Rewrite'_Set, ID => 'a => 'a)
|
walther@59633
|
148 |
*** . . . . . . . . Free (discard_parentheses1, ID)
|
walther@59633
|
149 |
*** . . Const (empty, 'a)
|
walther@59633
|
150 |
***)
|
walther@59633
|
151 |
reset_states ();
|
walther@59633
|
152 |
CalcTree
|
walther@59633
|
153 |
[(["Term (b + a - b)", "normalform N"],
|
walther@59633
|
154 |
("Poly",["polynomial","simplification"],
|
walther@59633
|
155 |
["simplification","of_rationals"]))];
|
walther@59633
|
156 |
Iterator 1;
|
walther@59633
|
157 |
moveActiveRoot 1;
|
walther@59633
|
158 |
autoCalculate 1 CompleteCalc;
|
walther@59633
|
159 |
|
walther@59633
|
160 |
interSteps 1 ([], Res);
|
walther@59633
|
161 |
val ((pt,p),_) = get_calc 1; show_pt pt;
|
walther@59633
|
162 |
|
walther@59633
|
163 |
interSteps 1 ([1], Res);
|
walther@59633
|
164 |
val ((pt,p),_) = get_calc 1; show_pt pt;
|
walther@59633
|
165 |
|
walther@59633
|
166 |
(*with "Program SimplifyScript (t_::real) = \
|
walther@59635
|
167 |
\ ((Rewrite_Set norm_Rational) t_)"
|
walther@59633
|
168 |
val (Form form, SOME tac, asm) = pt_extract (pt, ([1], Res));
|
walther@59633
|
169 |
*)
|
walther@59633
|
170 |
val (Form form, SOME tac, asm) = pt_extract (pt, ([2], Res));
|
walther@59633
|
171 |
case (term2str form, tac, terms2strs asm) of
|
walther@59633
|
172 |
("a", Check_Postcond ["polynomial", "simplification"], []) => ()
|
walther@59633
|
173 |
| _ => error "scrtools.sml: auto-generated norm_Rational doesnt work";
|
walther@59633
|
174 |
|
walther@59633
|
175 |
"-------- fun op @@ ----------------------------------------------------------------------------";
|
walther@59633
|
176 |
"-------- fun op @@ ----------------------------------------------------------------------------";
|
walther@59633
|
177 |
"-------- fun op @@ ----------------------------------------------------------------------------";
|
walther@59633
|
178 |
val rules = (#rules o rep_rls) isolate_root;
|
walther@59633
|
179 |
val rs = map (rule2stac @{theory}) rules;
|
walther@59633
|
180 |
val t = @@ rs;
|
walther@59635
|
181 |
if term2str t = "Try (Repeat (Rewrite ''rroot_to_lhs'')) @@\n" ^
|
walther@59635
|
182 |
"Try (Repeat (Rewrite ''rroot_to_lhs_mult'')) @@\n" ^
|
walther@59635
|
183 |
"Try (Repeat (Rewrite ''rroot_to_lhs_add_mult'')) @@\n" ^
|
walther@59635
|
184 |
"Try (Repeat (Rewrite ''risolate_root_add'')) @@\n" ^
|
walther@59635
|
185 |
"Try (Repeat (Rewrite ''risolate_root_mult'')) @@\n" ^
|
walther@59635
|
186 |
"Try (Repeat (Rewrite ''risolate_root_div''))"
|
walther@59633
|
187 |
then () else error "fun @@ changed"
|
walther@59633
|
188 |
|
walther@59633
|
189 |
"-------- fun rules2scr_Rls --------------------------------------------------------------------";
|
walther@59633
|
190 |
"-------- fun rules2scr_Rls --------------------------------------------------------------------";
|
walther@59633
|
191 |
"-------- fun rules2scr_Rls --------------------------------------------------------------------";
|
walther@59633
|
192 |
(*compare Prog_Expr.*)
|
walther@59633
|
193 |
val prog = Auto_Prog.rules2scr_Rls @{theory} [Rule.Thm ("thm111", @{thm thm111}), Rule.Thm ("refl", @{thm refl})]
|
walther@59633
|
194 |
;
|
walther@59633
|
195 |
writeln (t2str @{theory} prog);
|
walther@59633
|
196 |
(*auto_generated t_t =
|
walther@59633
|
197 |
Repeat
|
walther@59635
|
198 |
((Try (Repeat (Rewrite ''thm111'')) @@
|
walther@59635
|
199 |
Try (Repeat (Rewrite ''refl'')))
|
walther@59633
|
200 |
??.empty)*)
|
walther@59633
|
201 |
;
|
walther@59633
|
202 |
if t2str @{theory} prog =
|
walther@59635
|
203 |
"auto_generated t_t =\n" ^
|
walther@59635
|
204 |
"Repeat\n" ^
|
walther@59635
|
205 |
" ((Try (Repeat (Rewrite ''thm111'')) @@ Try (Repeat (Rewrite ''refl'')))\n" ^
|
walther@59635
|
206 |
" ??.empty)"
|
walther@59635
|
207 |
then () else error "rules2scr_Rls auto_generated changed";
|
walther@59633
|
208 |
|
walther@59633
|
209 |
"-------- fun rule2stac, fun rule2stac_inst ----------------------------------------------------";
|
walther@59633
|
210 |
"-------- fun rule2stac, fun rule2stac_inst ----------------------------------------------------";
|
walther@59633
|
211 |
"-------- fun rule2stac, fun rule2stac_inst ----------------------------------------------------";
|
walther@59633
|
212 |
val t = rule2stac @{theory} (Thm ("real_diff_minus", num_str @{thm real_diff_minus}));
|
walther@59635
|
213 |
if term2str t = "Try (Repeat (Rewrite ''real_diff_minus''))" then ()
|
walther@59633
|
214 |
else error "rule2stac Thm.. changed";
|
walther@59633
|
215 |
|
walther@59633
|
216 |
val t = rule2stac @{theory} (Calc ("Groups.plus_class.plus", eval_binop "#add_"));
|
walther@59633
|
217 |
if term2str t = "Try (Repeat (Calculate ''PLUS''))" then ()
|
walther@59633
|
218 |
else error "rule2stac Calc.. changed";
|
walther@59633
|
219 |
|
walther@59633
|
220 |
val t = rule2stac @{theory} (Rls_ rearrange_assoc);
|
walther@59635
|
221 |
if term2str t = "Try (Rewrite_Set ''rearrange_assoc'')" then ()
|
walther@59633
|
222 |
else error "rule2stac Rls_.. changed";
|
walther@59633
|
223 |
|
walther@59633
|
224 |
val t = rule2stac_inst @{theory} (Thm ("risolate_bdv_add", num_str @{thm risolate_bdv_add}));
|
walther@59635
|
225 |
if term2str t = "Try (Repeat (Rewrite_Inst [(''bdv'', v)] ''risolate_bdv_add''))" then ()
|
walther@59633
|
226 |
else error "rule2stac_inst Thm.. changed";
|
walther@59633
|
227 |
case t of
|
walther@59633
|
228 |
(Const ("Tactical.Try", _) $
|
walther@59633
|
229 |
(Const ("Tactical.Repeat", _) $
|
walther@59633
|
230 |
(Const ("Prog_Tac.Rewrite'_Inst", _) $
|
walther@59633
|
231 |
(Const ("List.list.Cons", _) $
|
walther@59633
|
232 |
(Const ("Product_Type.Pair", _) $
|
walther@59633
|
233 |
bdv $
|
walther@59633
|
234 |
Free ("v", _)) $
|
walther@59633
|
235 |
Const ("List.list.Nil", _)) $
|
walther@59635
|
236 |
risolate_bdv_add))) =>
|
walther@59633
|
237 |
(if HOLogic.dest_string bdv = "bdv" andalso
|
walther@59633
|
238 |
HOLogic.dest_string risolate_bdv_add = "risolate_bdv_add" then ()
|
walther@59633
|
239 |
else error "rule2stac_inst changed 1")
|
walther@59633
|
240 |
| _ => error "rule2stac_inst changed 2";
|
walther@59633
|
241 |
|
walther@59633
|
242 |
"-------- fun stacpbls -------------------------------------------------------------------------";
|
walther@59633
|
243 |
"-------- fun stacpbls -------------------------------------------------------------------------";
|
walther@59633
|
244 |
"-------- fun stacpbls -------------------------------------------------------------------------";
|
walther@59633
|
245 |
val {scr, ...} = get_met ["Test","sqrt-equ-test"]; val Prog sc = scr; val ts = stacpbls sc;
|
walther@59633
|
246 |
case stacpbls sc of
|
walther@59635
|
247 |
[Const ("Prog_Tac.Rewrite", _) $ square_equation_left,
|
walther@59635
|
248 |
Const ("Prog_Tac.Rewrite'_Set", _) $ Test_simplify,
|
walther@59635
|
249 |
Const ("Prog_Tac.Rewrite'_Set", _) $ rearrange_assoc,
|
walther@59635
|
250 |
Const ("Prog_Tac.Rewrite'_Set", _) $ isolate_root,
|
walther@59635
|
251 |
Const ("Prog_Tac.Rewrite'_Set", _) $ norm_equation,
|
walther@59633
|
252 |
Const ("Prog_Tac.Rewrite'_Set'_Inst", _) $
|
walther@59633
|
253 |
(Const ("List.list.Cons", _) $ (Const ("Product_Type.Pair", _) $ bdv $ Free ("v_v", _)) $
|
walther@59635
|
254 |
Const ("List.list.Nil", _)) $ isolate_bdv] =>
|
walther@59633
|
255 |
if HOLogic.dest_string square_equation_left = "square_equation_left" andalso
|
walther@59633
|
256 |
HOLogic.dest_string Test_simplify = "Test_simplify" andalso
|
walther@59633
|
257 |
HOLogic.dest_string rearrange_assoc = "rearrange_assoc" andalso
|
walther@59633
|
258 |
HOLogic.dest_string isolate_root = "isolate_root" andalso
|
walther@59633
|
259 |
HOLogic.dest_string norm_equation = "norm_equation" andalso
|
walther@59633
|
260 |
HOLogic.dest_string bdv = "bdv" andalso
|
walther@59633
|
261 |
HOLogic.dest_string isolate_bdv = "isolate_bdv"
|
walther@59633
|
262 |
then () else error "stacpbls (Test.Solve_root_equation) changed 2"
|
walther@59633
|
263 |
| _ => error "stacpbls (Test.Solve_root_equation) changed 1";
|
walther@59633
|
264 |
|
walther@59633
|
265 |
(* inappropriate input is skipped *)
|
walther@59633
|
266 |
val t = @{term "(a::real) = (rhs (NTH 1 sol_a))"};
|
walther@59633
|
267 |
case stacpbls t of [] => () | _ => error "stacpbls rhs (NTH 1 sol_a) changed";
|
walther@59633
|
268 |
|
walther@59633
|
269 |
@{term "(SubProblem (BiegelinieX,[vonBelastungZu,Biegelinien], [Biegelinien,ausBelastung]) [REAL q__q, REAL v_v])"};
|
walther@59633
|
270 |
case stacpbls t of [] => () | _ => error "stacpbls (SubProblem ...) changed";
|
walther@59633
|
271 |
|
walther@59633
|
272 |
"-------- fun is_calc, fun op_of_calc ----------------------------------------------------------";
|
walther@59633
|
273 |
"-------- fun is_calc, fun op_of_calc ----------------------------------------------------------";
|
walther@59633
|
274 |
"-------- fun is_calc, fun op_of_calc ----------------------------------------------------------";
|
walther@59633
|
275 |
val rls = prep_rls @{theory} Test_simplify; (* adds the Program *)
|
walther@59633
|
276 |
val Prog sc = (#scr o rep_rls) rls;
|
walther@59633
|
277 |
val stacs = stacpbls sc;
|
walther@59633
|
278 |
|
walther@59633
|
279 |
val calcs = filter is_calc stacs;
|
walther@59633
|
280 |
val ids = map op_of_calc calcs;
|
walther@59633
|
281 |
case ids of
|
walther@59633
|
282 |
["PLUS", "TIMES", "DIVIDE", "POWER"] => ()
|
walther@59633
|
283 |
| _ => error "op_of_calc";
|
walther@59633
|
284 |
|
walther@59633
|
285 |
val calcs = ((assoc_calc' @{theory} |> map) o (map Auto_Prog.op_of_calc) o
|
walther@59633
|
286 |
(filter Auto_Prog.is_calc) o Auto_Prog.stacpbls) sc;
|
walther@59633
|
287 |
case calcs of
|
walther@59633
|
288 |
[("PLUS", ("Groups.plus_class.plus", _)), ("TIMES", ("Groups.times_class.times", _)),
|
walther@59633
|
289 |
("DIVIDE", ("Rings.divide_class.divide", _)), ("POWER", ("Prog_Expr.pow", _))] => ()
|
walther@59633
|
290 |
| _ => error "get_calcs changed"
|