intermed. usecase Diophant: change usecase inttype
found only one working '= me' in test/../calculate.sml
and adjusted usecase to this test.
Test_Isac.thy worked !before! build
1 (* Title: tests on DiophantEq.thy
2 Author: Mathias Lehnfeld 2011
3 (c) due to copyright terms
4 12345678901234567890123456789012345678901234567890123456789012345678901234567890
5 10 20 30 40 50 60 70 80
7 (*-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
8 "--------------------------------------------------------";
9 "table of contents --------------------------------------";
10 "--------------------------------------------------------";
11 "----------- rewriting for usecase1 ---------------------";
12 "----------- mathengine with usecase1 -------------------";
13 "--------------------------------------------------------";
14 "--------------------------------------------------------";
15 "--------------------------------------------------------";
17 (*apparently no way to do these tests within DiophantEq.thy:
18 val thy = @{theory};(**** ME_Isa: thy 'DiophantEq' not in system
20 (*val thy = @{theory "Isac"};toplevel error from store_met?!?*)
22 val thy = @{theory "DiophantEq"};
23 val ctxt = ProofContext.init_global thy;
25 "----------- rewriting for usecase1 ---------------------";
26 "----------- rewriting for usecase1 ---------------------";
27 "----------- rewriting for usecase1 ---------------------";
28 val subst = [(parseNEW ctxt "bdv::int", parseNEW ctxt "xxx::int")];
29 val t = parseNEW ctxt "xxx + 111 = abc + (123::int)";
31 val SOME (t,_) = rewrite_inst_ thy e_rew_ord e_rls true subst
32 (num_str @{thm "int_isolate_add"}) t; term2str t;
34 val SOME (thmID,thm) = get_calculation_ thy (the(assoc(calclist,"TIMES"))) t;
35 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
37 val SOME (thmID,thm) = get_calculation_ thy (the(assoc(calclist,"PLUS"))) t;
38 val SOME (t,_) = rewrite_ thy tless_true tval_rls true thm t; term2str t;
40 "----------- mathengine with usecase1 -------------------";
41 "----------- mathengine with usecase1 -------------------";
42 "----------- mathengine with usecase1 -------------------";
43 -.-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*)
44 (*-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
45 val p = e_pos'; val c = [];
46 val (fmz, (thy, pbl, met)) =
47 (["intTestGiven (xxx + abc + -1 * 111 + (123::int))", "intTestFind sss"],
48 (Context.theory_name thy, ["diophantine", "equation"],
49 ["Test", "solve_diophant"]));
50 val (p,_,f,nxt,_,pt) = CalcTreeTEST [(fmz, (thy, pbl, met))];
51 val (p,_,f,nxt,_,pt) = me nxt p c pt;
52 val (p,_,f,nxt,_,pt) = me nxt p c pt;
53 val (p,_,f,nxt,_,pt) = me nxt p c pt;
54 val (p,_,f,nxt,_,pt) = me nxt p c pt;
55 val (p,_,f,nxt,_,pt) = me nxt p c pt;
56 val (p,_,f,nxt,_,pt) = me nxt p c pt;
57 val (p,_,f,nxt,_,pt) = me nxt p c pt;
58 -.-.-.-.-.-.-isolate response.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*)