1 (* test for sml/ME/mathengine.sml
2 authors: Walther Neuper 2000, 2006
3 (c) due to copyright terms
5 use"../smltest/ME/mathengine.sml";
9 "-----------------------------------------------------------------";
10 "table of contents -----------------------------------------------";
11 "-----------------------------------------------------------------";
12 "----------- debugging setContext..pbl_ --------------------------";
13 "----------- tryrefine -------------------------------------------";
14 "-----------------------------------------------------------------";
15 "-----------------------------------------------------------------";
16 "-----------------------------------------------------------------";
20 "----------- debugging setContext..pbl_ --------------------------";
21 "----------- debugging setContext..pbl_ --------------------------";
22 "----------- debugging setContext..pbl_ --------------------------";
25 [(["equality (x+1=2)", "solveFor x","solutions L"],
27 ["sqroot-test","univariate","equation","test"],
28 ["Test","squ-equ-test-subpbl1"]))];
30 moveActiveRoot 1; modelProblem 1;
32 val pos as (p,_) = ([],Pbl);
33 val guh = "pbl_equ_univ";
34 checkContext 1 pos guh;
35 val ((pt,_),_) = get_calc 1;
36 val pp = par_pblobj pt p;
37 val keID = guh2kestoreID guh;
38 case context_pbl keID pt pp of (true,["univariate", "equation"],_,_,_)=>()
39 | _ => error "mathengine.sml: context_pbl .. pbl_equ_univ checked";
41 case get_obj g_spec pt p of (_, ["e_pblID"], _) => ()
42 | _ => error "mathengine.sml: context_pbl .. pbl still empty";
44 val ((pt,_),_) = get_calc 1;
45 case get_obj g_spec pt p of (_, ["univariate", "equation"], _) => ()
46 | _ => error "mathengine.sml: context_pbl .. pbl set";
49 setContext 1 pos "met_eq_lin";
50 val ((pt,_),_) = get_calc 1;
51 case get_obj g_spec pt p of (_, _, ["LinEq", "solve_lineq_equation"]) => ()
52 | _ => error "mathengine.sml: context_pbl .. pbl set";
55 "----------- tryrefine -------------------------------------------";
56 "----------- tryrefine -------------------------------------------";
57 "----------- tryrefine -------------------------------------------";
59 CalcTree [(["equality (x/(x^2 - 6*x+9) - 1/(x^2 - 3*x) =1/x)",
60 "solveFor x", "solutions L"],
61 ("RatEq.thy",["univariate","equation"],["no_met"]))];
63 moveActiveRoot 1; autoCalculate 1 CompleteCalc;
65 refineProblem 1 ([1],Res) "pbl_equ_univ"
66 (*gives "pbl_equ_univ_rat" correct*);
68 refineProblem 1 ([1],Res) (pblID2guh ["linear","univariate","equation"])
69 (*ives "pbl_equ_univ_lin" incorrect*);