neuper@41931
|
1 |
(* Title: tests on DiophantEq.thy
|
neuper@41931
|
2 |
Author: Mathias Lehnfeld 2011
|
neuper@41931
|
3 |
(c) due to copyright terms
|
neuper@41931
|
4 |
12345678901234567890123456789012345678901234567890123456789012345678901234567890
|
neuper@41931
|
5 |
10 20 30 40 50 60 70 80
|
neuper@41931
|
6 |
*)
|
neuper@41931
|
7 |
"--------------------------------------------------------";
|
neuper@41931
|
8 |
"table of contents --------------------------------------";
|
neuper@41931
|
9 |
"--------------------------------------------------------";
|
neuper@41931
|
10 |
"----------- rewriting for usecase1 ---------------------";
|
neuper@41931
|
11 |
"----------- mathengine with usecase1 -------------------";
|
neuper@41931
|
12 |
"--------------------------------------------------------";
|
neuper@41931
|
13 |
"--------------------------------------------------------";
|
neuper@41931
|
14 |
"--------------------------------------------------------";
|
neuper@41931
|
15 |
|
neuper@41931
|
16 |
(*apparently no way to do these tests within DiophantEq.thy:
|
neuper@41931
|
17 |
val thy = @{theory};(**** ME_Isa: thy 'DiophantEq' not in system
|
neuper@41931
|
18 |
from CalcTreeTest*)
|
neuper@41931
|
19 |
(*(*val thy = @{theory "Isac"};toplevel error from store_met?!?*)*)
|
neuper@41931
|
20 |
*)
|
neuper@41931
|
21 |
val thy = @{theory "DiophantEq"};
|
neuper@41931
|
22 |
val ctxt = ProofContext.init_global thy;
|
neuper@41931
|
23 |
|
neuper@41931
|
24 |
"----------- rewriting for usecase1 ---------------------";
|
neuper@41931
|
25 |
"----------- rewriting for usecase1 ---------------------";
|
neuper@41931
|
26 |
"----------- rewriting for usecase1 ---------------------";
|
neuper@41931
|
27 |
val subst = [(parseNEW ctxt "bdv::int", parseNEW ctxt "xxx::int")];
|
neuper@41931
|
28 |
val t = parseNEW ctxt "xxx + 111 = abc + (123::int)";
|
neuper@41931
|
29 |
|
neuper@41931
|
30 |
val SOME (t,_) = rewrite_inst_ thy e_rew_ord e_rls true subst
|
neuper@41931
|
31 |
(num_str @{thm "int_isolate_add"}) t; term2str t;
|
neuper@41931
|
32 |
|
neuper@41931
|
33 |
val SOME (thmID,thm) = get_calculation_ thy (the(assoc(calclist,"TIMES"))) t;
|
neuper@41931
|
34 |
val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
|
neuper@41931
|
35 |
|
neuper@41931
|
36 |
val SOME (thmID,thm) = get_calculation_ thy (the(assoc(calclist,"PLUS"))) t;
|
neuper@41931
|
37 |
val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
|
neuper@41931
|
38 |
|
neuper@41931
|
39 |
(*-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
|
neuper@41931
|
40 |
"----------- mathengine with usecase1 -------------------";
|
neuper@41931
|
41 |
"----------- mathengine with usecase1 -------------------";
|
neuper@41931
|
42 |
"----------- mathengine with usecase1 -------------------";
|
neuper@41931
|
43 |
val p = e_pos'; val c = [];
|
neuper@41931
|
44 |
val (p,_,f,nxt,_,pt) =
|
neuper@41931
|
45 |
CalcTreeTEST
|
neuper@41931
|
46 |
[(["boolTestGiven (xxx + 111 = abc + (123::int))", "intTestGiven (xxx::int)", "boolTestFind sss"],
|
neuper@41931
|
47 |
(Context.theory_name thy,
|
neuper@41931
|
48 |
["diophantine","equation"], ["Test","solve_diophant"]))];
|
neuper@41931
|
49 |
"----- step 1: returns nxt = Add_Given \"functionTerm (x ^^^ 2 + 1)\" ---";
|
neuper@41931
|
50 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@41931
|
51 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@41931
|
52 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@41931
|
53 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@41931
|
54 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@41931
|
55 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@41931
|
56 |
val (p,_,f,nxt,_,pt) = me nxt p c pt;
|
neuper@41931
|
57 |
-.-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*)
|