test/Tools/isac/Interpret/ctree.sml
changeset 55279 130688f277ba
parent 48761 4162c4f6f897
child 55445 33b0f6db720c
equal deleted inserted replaced
55278:180cb68e796f 55279:130688f277ba
   589 "-------------- move_dn: Frm -> Res ------------------------------";
   589 "-------------- move_dn: Frm -> Res ------------------------------";
   590  states := [];
   590  states := [];
   591  CalcTree      (*start of calculation, return No.1*)
   591  CalcTree      (*start of calculation, return No.1*)
   592      [(["equality (1+-1*2+x=(0::real))", "solveFor x","solutions L"],
   592      [(["equality (1+-1*2+x=(0::real))", "solveFor x","solutions L"],
   593        ("Test", 
   593        ("Test", 
   594 	["linear","univariate","equation","test"],
   594 	["LINEAR","univariate","equation","test"],
   595 	["Test","solve_linear"]))];
   595 	["Test","solve_linear"]))];
   596  Iterator 1; moveActiveRoot 1;
   596  Iterator 1; moveActiveRoot 1;
   597  autoCalculate 1 CompleteCalcHead;
   597  autoCalculate 1 CompleteCalcHead;
   598  autoCalculate 1 (Step 1);
   598  autoCalculate 1 (Step 1);
   599  refFormula 1 (get_pos 1 1);
   599  refFormula 1 (get_pos 1 1);
   972   | _ => error "diff.behav.in ctree.sml: pt_extract ([1], Res)";
   972   | _ => error "diff.behav.in ctree.sml: pt_extract ([1], Res)";
   973 
   973 
   974 val (Form form, SOME tac, asm) = pt_extract (pt, ([2], Res));
   974 val (Form form, SOME tac, asm) = pt_extract (pt, ([2], Res));
   975 case (term2str form, tac, terms2strs asm) of
   975 case (term2str form, tac, terms2strs asm) of
   976     ("-1 + x = 0",
   976     ("-1 + x = 0",
   977      Subproblem ("Test", ["linear", "univariate", "equation", "test"]),
   977      Subproblem ("Test", ["LINEAR", "univariate", "equation", "test"]),
   978      []) => ()
   978      []) => ()
   979   | _ => error "diff.behav.in ctree.sml: pt_extract ([2], Res)";
   979   | _ => error "diff.behav.in ctree.sml: pt_extract ([2], Res)";
   980 
   980 
   981 val (ModSpec (_,_,form,_,_,_), SOME tac, asm) = pt_extract (pt, ([3], Pbl));
   981 val (ModSpec (_,_,form,_,_,_), SOME tac, asm) = pt_extract (pt, ([3], Pbl));
   982 case (term2str form, tac, terms2strs asm) of
   982 case (term2str form, tac, terms2strs asm) of
   993     ("x = 0 + -1 * -1", Rewrite_Set "Test_simplify", []) => ()
   993     ("x = 0 + -1 * -1", Rewrite_Set "Test_simplify", []) => ()
   994   | _ => error "diff.behav.in ctree.sml: pt_extract ([3,1], Res)";
   994   | _ => error "diff.behav.in ctree.sml: pt_extract ([3,1], Res)";
   995 
   995 
   996 val (Form form, SOME tac, asm) = pt_extract (pt, ([3,2], Res));
   996 val (Form form, SOME tac, asm) = pt_extract (pt, ([3,2], Res));
   997 case (term2str form, tac, terms2strs asm) of
   997 case (term2str form, tac, terms2strs asm) of
   998     ("x = 1", Check_Postcond ["linear", "univariate", "equation", "test"], 
   998     ("x = 1", Check_Postcond ["LINEAR", "univariate", "equation", "test"], 
   999      []) => ()
   999      []) => ()
  1000   | _ => error "diff.behav.in ctree.sml: pt_extract ([3,2], Res)";
  1000   | _ => error "diff.behav.in ctree.sml: pt_extract ([3,2], Res)";
  1001 
  1001 
  1002 (*========== inhibit exn AK110719 ==============================================
  1002 (*========== inhibit exn AK110719 ==============================================
  1003 val (Form form, SOME tac, asm) = pt_extract (pt, ([3], Res));
  1003 val (Form form, SOME tac, asm) = pt_extract (pt, ([3], Res));