test/Tools/isac/Frontend/use-cases.sml
changeset 59123 5127be395ea1
parent 59111 c730b643bc0e
child 59127 34f296390b60
equal deleted inserted replaced
59122:389688da5477 59123:5127be395ea1
  1126  Iterator 1;
  1126  Iterator 1;
  1127  moveActiveRoot 1;
  1127  moveActiveRoot 1;
  1128  autoCalculate' 1 CompleteCalcHead;
  1128  autoCalculate' 1 CompleteCalcHead;
  1129  autoCalculate' 1 (Step 1);
  1129  autoCalculate' 1 (Step 1);
  1130  autoCalculate' 1 (Step 1);
  1130  autoCalculate' 1 (Step 1);
  1131  appendFormula 1 "-1 + x = 0" |> Future.join;  
  1131  appendFormula 1 "-1 + x = 0" (*|> Future.join*);
  1132  (*... returns calcChangedEvent with*)
  1132  (*... returns calcChangedEvent with*)
  1133  val (unc, del, gen) = (([1],Res), ([1],Res), ([2],Res));
  1133  val (unc, del, gen) = (([1],Res), ([1],Res), ([2],Res));
  1134  getFormulaeFromTo 1 unc gen 99999 (*all levels*) false;
  1134  getFormulaeFromTo 1 unc gen 99999 (*all levels*) false;
  1135 
  1135 
  1136  val ((pt,_),_) = get_calc 1;
  1136  val ((pt,_),_) = get_calc 1;
  1149  Iterator 1;
  1149  Iterator 1;
  1150  moveActiveRoot 1;
  1150  moveActiveRoot 1;
  1151  autoCalculate' 1 CompleteCalcHead;
  1151  autoCalculate' 1 CompleteCalcHead;
  1152  autoCalculate' 1 (Step 1);
  1152  autoCalculate' 1 (Step 1);
  1153  autoCalculate' 1 (Step 1);
  1153  autoCalculate' 1 (Step 1);
  1154  appendFormula 1 "x - 1 = 0" |> Future.join; 
  1154  appendFormula 1 "x - 1 = 0" (*|> Future.join*);
  1155  val (unc, del, gen) = (([1],Res), ([1],Res), ([2],Res));
  1155  val (unc, del, gen) = (([1],Res), ([1],Res), ([2],Res));
  1156  getFormulaeFromTo 1 unc gen 99999 (*all levels*) false;
  1156  getFormulaeFromTo 1 unc gen 99999 (*all levels*) false;
  1157  (*11 elements !!!*)
  1157  (*11 elements !!!*)
  1158 
  1158 
  1159  val ((pt,_),_) = get_calc 1;
  1159  val ((pt,_),_) = get_calc 1;
  1172  Iterator 1;
  1172  Iterator 1;
  1173  moveActiveRoot 1;
  1173  moveActiveRoot 1;
  1174  autoCalculate' 1 CompleteCalcHead;
  1174  autoCalculate' 1 CompleteCalcHead;
  1175  autoCalculate' 1 (Step 1);
  1175  autoCalculate' 1 (Step 1);
  1176  autoCalculate' 1 (Step 1);
  1176  autoCalculate' 1 (Step 1);
  1177  appendFormula 1 "x = 1" |> Future.join; 
  1177  appendFormula 1 "x = 1" (*|> Future.join*);
  1178  (*... returns calcChangedEvent with*)
  1178  (*... returns calcChangedEvent with*)
  1179  val (unc, del, gen) = (([1],Res), ([1],Res), ([3,2],Res));
  1179  val (unc, del, gen) = (([1],Res), ([1],Res), ([3,2],Res));
  1180  getFormulaeFromTo 1 unc gen 99999 (*all levels*) false;
  1180  getFormulaeFromTo 1 unc gen 99999 (*all levels*) false;
  1181  (*6 elements !!!*)
  1181  (*6 elements !!!*)
  1182 
  1182 
  1196  Iterator 1;
  1196  Iterator 1;
  1197  moveActiveRoot 1;
  1197  moveActiveRoot 1;
  1198  autoCalculate' 1 CompleteCalcHead;
  1198  autoCalculate' 1 CompleteCalcHead;
  1199  autoCalculate' 1 (Step 1);
  1199  autoCalculate' 1 (Step 1);
  1200  autoCalculate' 1 (Step 1);
  1200  autoCalculate' 1 (Step 1);
  1201  appendFormula 1 "x - 4711 = 0" |> Future.join; 
  1201  appendFormula 1 "x - 4711 = 0" (*|> Future.join*);
  1202  (*... returns <ERROR> no derivation found </ERROR>*)
  1202  (*... returns <ERROR> no derivation found </ERROR>*)
  1203 
  1203 
  1204  val ((pt,_),_) = get_calc 1;
  1204  val ((pt,_),_) = get_calc 1;
  1205  val p = get_pos 1 1;
  1205  val p = get_pos 1 1;
  1206  val (Form f, tac, asms) = pt_extract (pt, p);
  1206  val (Form f, tac, asms) = pt_extract (pt, p);
  1352 Iterator 1;
  1352 Iterator 1;
  1353 moveActiveRoot 1;
  1353 moveActiveRoot 1;
  1354 autoCalculate' 1 CompleteCalcHead;
  1354 autoCalculate' 1 CompleteCalcHead;
  1355 autoCalculate' 1 (Step 1);
  1355 autoCalculate' 1 (Step 1);
  1356 autoCalculate' 1 (Step 1);(*([1], Res), d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))*)
  1356 autoCalculate' 1 (Step 1);(*([1], Res), d_d x (x ^^^ 2) + d_d x (sin (x ^^^ 4))*)
  1357 appendFormula 1 "d_d x (x ^ 2) + cos (4 * x ^ 3)" |> Future.join; (*<<<<<<<=========================*)
  1357 appendFormula 1 "d_d x (x ^ 2) + cos (4 * x ^ 3)" (*|> Future.join*); (*<<<<<<<=========================*)
  1358 (* the check for errpat is maximally liberal (whole term modulo "nrls" from "type met"),
  1358 (* the check for errpat is maximally liberal (whole term modulo "nrls" from "type met"),
  1359   would recognize "cos (4 * x ^ (4 - 1)) + 2 * x" as well.
  1359   would recognize "cos (4 * x ^ (4 - 1)) + 2 * x" as well.
  1360   results in <CALCMESSAGE> error pattern #chain-rule-diff-both# </CALCMESSAGE>
  1360   results in <CALCMESSAGE> error pattern #chain-rule-diff-both# </CALCMESSAGE>
  1361   instead of <CALCMESSAGE> no derivation found </CALCMESSAGE> *)
  1361   instead of <CALCMESSAGE> no derivation found </CALCMESSAGE> *)
  1362   val ((pt,pos), _) = get_calc 1;
  1362   val ((pt,pos), _) = get_calc 1;
  1433 moveActiveRoot 1;
  1433 moveActiveRoot 1;
  1434 moveActiveFormula 1 ([],Pbl);
  1434 moveActiveFormula 1 ([],Pbl);
  1435 replaceFormula 1 "Simplify (5 * x / (4 * y) + 3 * x / (4 * y))";
  1435 replaceFormula 1 "Simplify (5 * x / (4 * y) + 3 * x / (4 * y))";
  1436 autoCalculate' 1 CompleteCalcHead;
  1436 autoCalculate' 1 CompleteCalcHead;
  1437 autoCalculate' 1 (Step 1);
  1437 autoCalculate' 1 (Step 1);
  1438 appendFormula 1 "8 * x / (8 * y)" |> Future.join;
  1438 appendFormula 1 "8 * x / (8 * y)" (*|> Future.join*);
  1439 (*<CALCMESSAGE> no derivation found </CALCMESSAGE> 
  1439 (*<CALCMESSAGE> no derivation found </CALCMESSAGE> 
  1440 --- but in BridgeLog Java <=> SML:
  1440 --- but in BridgeLog Java <=> SML:
  1441 <CALCMESSAGE> error pattern #addition-of-fractions# </CALCMESSAGE>*)
  1441 <CALCMESSAGE> error pattern #addition-of-fractions# </CALCMESSAGE>*)
  1442 
  1442 
  1443 "--------- UC errpat, fillpat step to Rewrite --------------------";
  1443 "--------- UC errpat, fillpat step to Rewrite --------------------";