7 "-----------------------------------------------------------------"; |
7 "-----------------------------------------------------------------"; |
8 "-------- test auto-generated script '(Repeat (Calculate times))'-"; |
8 "-------- test auto-generated script '(Repeat (Calculate times))'-"; |
9 "-------- test the same called by interSteps norm_Poly -----------"; |
9 "-------- test the same called by interSteps norm_Poly -----------"; |
10 "-------- test the same called by interSteps norm_Rational -------"; |
10 "-------- test the same called by interSteps norm_Rational -------"; |
11 "-------- check auto-gen.script for Rewrite_Set_Inst -------------"; |
11 "-------- check auto-gen.script for Rewrite_Set_Inst -------------"; |
|
12 "-------- how to stepwise construct Scripts ----------------------"; |
12 "-----------------------------------------------------------------"; |
13 "-----------------------------------------------------------------"; |
13 "-----------------------------------------------------------------"; |
14 "-----------------------------------------------------------------"; |
14 "-----------------------------------------------------------------"; |
15 "-----------------------------------------------------------------"; |
15 |
16 |
16 |
17 |
185 |
186 |
186 two_scr_arg auto_script; |
187 two_scr_arg auto_script; |
187 init_istate (Rewrite_Set_Inst (["(bdv, x)"], "integration_rules")) |
188 init_istate (Rewrite_Set_Inst (["(bdv, x)"], "integration_rules")) |
188 (str2term "someTermWithBdv"); |
189 (str2term "someTermWithBdv"); |
189 |
190 |
190 |
191 "-------- how to stepwise construct Scripts ----------------------"; |
|
192 "-------- how to stepwise construct Scripts ----------------------"; |
|
193 "-------- how to stepwise construct Scripts ----------------------"; |
|
194 val thy = @{theory "Rational"}; |
|
195 (*no trailing _*) |
|
196 val p1 = parse thy ( |
|
197 "Script SimplifyScript (t_t::real) = " ^ |
|
198 " (Rewrite_Set discard_minus False " ^ |
|
199 " t_t)"); |
|
200 |
|
201 (*required (): (Rewrite_Set discard_minus False)*) |
|
202 val p2 = parse thy ( |
|
203 "Script SimplifyScript (t_t::real) = " ^ |
|
204 " (Rewrite_Set discard_minus False " ^ |
|
205 " t_t)"); |
|
206 |
|
207 val p3 = parse thy ( |
|
208 "Script SimplifyScript (t_t::real) = " ^ |
|
209 " ((Rewrite_Set discard_minus False) " ^ |
|
210 " t_t)"); |
|
211 |
|
212 val p4 = parse thy ( |
|
213 "Script SimplifyScript (t_t::real) = " ^ |
|
214 " ((Rewrite_Set discard_minus False) " ^ |
|
215 " t_t)"); |
|
216 |
|
217 val p5 = parse thy ( |
|
218 "Script SimplifyScript (t_t::real) = " ^ |
|
219 " ((Try (Rewrite_Set discard_minus False) " ^ |
|
220 " Try (Rewrite_Set discard_parentheses False)) " ^ |
|
221 " t_t)"); |
|
222 |
|
223 val p6 = parse thy ( |
|
224 "Script SimplifyScript (t_t::real) = " ^ |
|
225 " ((Try (Rewrite_Set discard_minus False) @@ " ^ |
|
226 " Try (Rewrite_Set rat_mult_poly False) @@ " ^ |
|
227 " Try (Rewrite_Set make_rat_poly_with_parentheses False) @@ " ^ |
|
228 " Try (Rewrite_Set cancel_p_rls False) @@ " ^ |
|
229 " (Repeat " ^ |
|
230 " ((Try (Rewrite_Set add_fractions_p_rls False) @@ " ^ |
|
231 " Try (Rewrite_Set rat_mult_div_pow False) @@ " ^ |
|
232 " Try (Rewrite_Set make_rat_poly_with_parentheses False) @@" ^ |
|
233 " Try (Rewrite_Set cancel_p_rls False) @@ " ^ |
|
234 " Try (Rewrite_Set rat_reduce_1 False)))) @@ " ^ |
|
235 " Try (Rewrite_Set discard_parentheses False)) " ^ |
|
236 " t_t)" |
|
237 ); |