neuper@37906: (* neuper@37906: use"systest/tacis.sml"; neuper@37906: use"tacis.sml"; neuper@37906: *) neuper@37906: "================================================================="; wneuper@59248: "------ fetchProposedTactic -> autoCalculate (Step1 ) ------------"; wneuper@59248: "------ setNextTactic -> autoCalculate (Step1 ) ------------------"; neuper@37906: "================================================================="; neuper@37906: neuper@37906: neuper@37906: wneuper@59248: "------ fetchProposedTactic -> autoCalculate (Step1 ) ------------"; wneuper@59248: "------ fetchProposedTactic -> autoCalculate (Step1 ) ------------"; wneuper@59248: "------ fetchProposedTactic -> autoCalculate (Step1 ) ------------"; s1210629013@55445: reset_states (); neuper@41970: CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], neuper@41970: ("Test", ["sqroot-test","univariate","equation","test"], neuper@37906: ["Test","squ-equ-test-subpbl1"]))]; neuper@37906: Iterator 1; moveActiveRoot 1; wneuper@59248: autoCalculate 1 CompleteCalcHead; wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x + 1 = 2*); neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Rewrite_Set norm_equation' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x + 1 + -1 * 2 = 0*); neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Rewrite_Set Test_simplify' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*-1 + x = 0*); neuper@37906: val ((pt,_),_) = get_calc 1; wneuper@59279: val str = pr_ctree pr_short pt; neuper@37906: writeln str; neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Subproblem ...' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*solve (-1 + x = 0,x)*); neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Model_Problem' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*equality ///*); neuper@37926: (*----- WN060222 since complete_mod_ case cas of SOME headline ----- neuper@37906: fetchProposedTactic 1 (*'Add_Given equality (-1 + x = 0)' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*equality (-1 + x =0)*); neuper@37906: ---------------------------------------------------------------------*) neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Add_Given solveFor x' in tacis*); neuper@37926: (*----- WN060222 since complete_mod_ case cas of SOME headline: neuper@37906: (*Specify_Theory Test.thy*) neuper@37906: ---------------------------------------------------------------------*) wneuper@59248: autoCalculate 1 CompleteCalcHead; refFormula 1 (get_pos 1 1) (*OK*); wneuper@59248: (*###########################################autoCalculate 1 (Step 1);*) neuper@37906: fetchProposedTactic 1 (*'Apply_Method Test solve_linear' in tacis*); neuper@37906: (* there was the only error ^^^^^^^^^ in step/nxt_solv ..Apply_Method.. neuper@37906: val (str', (tacis', (pt',p'))) = step ip (ptp, tacis); neuper@37906: writeln (tacis2str tacis'); neuper@37906: ######################################################################*) wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*-1 + x = 0*); neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Rewrite_Set_Inst isolate_bdv' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x = 0 + -1 * -1*); neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Rewrite_Set Test_simplify' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x = 1*); neuper@37906: val ((pt,_),_) = get_calc 1; wneuper@59279: val str = pr_ctree pr_short pt; neuper@37906: writeln str; neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Check_Postcond linear...' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*[x = 1]*); neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Check_elementwise Assumptions' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*[x = 1]*); neuper@37906: neuper@37906: fetchProposedTactic 1 (*'Check_Postcond sqroot-test...' in tacis*); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*[x = 1]*); neuper@37906: neuper@37906: fetchProposedTactic 1 (*'' in tacis*); neuper@37906: val ((pt,p),tacis) = get_calc 1; neuper@37906: val ip = get_pos 1 1; neuper@37906: val (Form f, tac, asms) = pt_extract (pt, p); neuper@37906: if term2str f = "[x = 1]"andalso p = ([],Res) andalso ip = ([],Res)then()else neuper@38031: error "tacis.sml: diff.behav. in fetchProposedTactic autoCalculate"; neuper@37906: neuper@37906: neuper@37906: wneuper@59248: "------ setNextTactic -> autoCalculate (Step1 ) ------------------"; wneuper@59248: "------ setNextTactic -> autoCalculate (Step1 ) ------------------"; wneuper@59248: "------ setNextTactic -> autoCalculate (Step1 ) ------------------"; s1210629013@55445: reset_states (); neuper@41970: CalcTree [(["equality (x+1=(2::real))", "solveFor x","solutions L"], neuper@41970: ("Test", ["sqroot-test","univariate","equation","test"], neuper@37906: ["Test","squ-equ-test-subpbl1"]))]; neuper@37906: Iterator 1; moveActiveRoot 1; wneuper@59248: autoCalculate 1 CompleteCalcHead; wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x + 1 = 2*); neuper@37906: neuper@37906: setNextTactic 1 (Rewrite_Set "norm_equation"); neuper@37906: val (_, tacis) = get_calc 1; neuper@37906: case tacis of [(Rewrite_Set "norm_equation",_,(([1], Res), _))] => () | _ => wneuper@59248: error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (1)"; wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x + 1 + -1 * 2 = 0*); neuper@37906: neuper@37906: setNextTactic 1 (Rewrite_Set "Test_simplify"); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*-1 + x = 0*); neuper@37906: val ((pt,_),_) = get_calc 1; wneuper@59279: val str = pr_ctree pr_short pt; neuper@37906: writeln str; neuper@37906: neuper@55279: setNextTactic 1 (Subproblem ("Test",["LINEAR","univariate", neuper@37906: "equation","test"])); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*solve (-1 + x = 0, x)*); neuper@37906: val ((pt,_),_) = get_calc 1; wneuper@59279: val str = pr_ctree pr_short pt; neuper@37906: writeln str; neuper@37906: neuper@55279: setNextTactic 1 (Model_Problem (*["LINEAR","univariate","equation","test"]*)); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*equality ///*); neuper@37906: neuper@37906: setNextTactic 1 (Add_Given "equality (-1 + x = 0)"); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*equality (-1 + x = 0)*); neuper@37906: neuper@37906: setNextTactic 1 (Add_Given "solveFor x"); wneuper@59248: autoCalculate 1 CompleteCalcHead; refFormula 1 (get_pos 1 1) (*OK*); neuper@37906: neuper@37906: setNextTactic 1 (Apply_Method ["Test", "solve_linear"]); neuper@37906: val (_, tacis) = get_calc 1; neuper@37906: case tacis of neuper@37906: [((Apply_Method ["Test","solve_linear"],_,(([3,1], Frm), _)))] =>() | _ => wneuper@59248: error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (2)"; neuper@37906: (*#######################################################################*) wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*-1 + x = 0*); neuper@37906: neuper@37906: setNextTactic 1 (Rewrite_Set_Inst (["(bdv,x)"], "isolate_bdv")); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x = 0 + -1 * -1*); neuper@37906: neuper@37906: setNextTactic 1 (Rewrite_Set "Test_simplify"); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*x = 1*); neuper@37906: neuper@55279: setNextTactic 1 (Check_Postcond ["LINEAR","univariate","equation","test"]); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*[x = 1]*); neuper@37906: neuper@37906: setNextTactic 1 (Check_elementwise "Assumptions"); wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*[x = 1]*); neuper@37906: val ((pt,_),_) = get_calc 1; wneuper@59279: val str = pr_ctree pr_short pt; neuper@37906: writeln str; neuper@37906: neuper@37906: setNextTactic 1 (Check_Postcond neuper@37906: ["sqroot-test","univariate","equation","test"]); neuper@37906: val (_, tacis) = get_calc 1; neuper@37906: neuper@37906: (*case tacis of 040609 suddenly ???! neuper@37906: [((Check_Postcond _, _,(([], Res), _)))] =>() | _ => wneuper@59248: error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (3)"; neuper@37906: #######################################################################*) wneuper@59248: autoCalculate 1 (Step 1); refFormula 1 (get_pos 1 1) (*[x = 1]*); neuper@37906: neuper@37906: val ((pt,p),tacis) = get_calc 1; neuper@37906: val ip = get_pos 1 1; neuper@37906: val (Form f, tac, asms) = pt_extract (pt, p); neuper@37906: if term2str f = "[x = 1]"andalso p = ([],Res) andalso ip = ([],Res)then()else wneuper@59248: error "tacis.sml: diff.behav. in setNextTactic -> autoCalculate (4)"; neuper@37906: neuper@37906: neuper@37906: