PIDE: adapted 1st interaction in frontend (no changes in test required)
authorWalther Neuper <wneuper@ist.tugraz.at>
Tue, 19 May 2015 10:57:38 +0200
changeset 591255700cc46e28a
parent 59124 92d59e33c7d6
child 59126 55c3e6c7b9c4
PIDE: adapted 1st interaction in frontend (no changes in test required)
src/Tools/isac/Frontend/interface.sml
src/Tools/isac/xmlsrc/interface-xml.sml
     1.1 --- a/src/Tools/isac/Frontend/interface.sml	Tue May 19 09:38:24 2015 +0200
     1.2 +++ b/src/Tools/isac/Frontend/interface.sml	Tue May 19 10:57:38 2015 +0200
     1.3 @@ -13,7 +13,7 @@
     1.4    sig
     1.5      val CalcTree : fmz list -> unit
     1.6      val DEconstrCalcTree : calcID -> unit
     1.7 -    val Iterator : calcID -> unit
     1.8 +    val Iterator : calcID -> XML.tree
     1.9      val IteratorTEST : calcID -> iterID
    1.10      val appendFormula : calcID -> cterm' -> unit (*future*)
    1.11      val autoCalculate : calcID -> auto -> unit (*future*)
    1.12 @@ -99,7 +99,7 @@
    1.13     TODO: adapt Iterator, add_user(= add_iterator!),etc. accordingly .*)
    1.14  fun Iterator (cI:calcID) = (*returned ID unnecessary after WN.0411*)
    1.15      (adduserOK2xml cI (add_user (cI:calcID)))
    1.16 -    handle _ => sysERROR2xml cI "error in kernel";
    1.17 +    handle _ => sysERROR2xmlTODO cI "error in kernel";
    1.18  fun IteratorTEST (cI:calcID) = add_user (cI:calcID);
    1.19  (*fun DEconstructIterator (cI:calcID) (uI:iterID) =
    1.20      deluserOK2xml (del_user cI uI);*)
     2.1 --- a/src/Tools/isac/xmlsrc/interface-xml.sml	Tue May 19 09:38:24 2015 +0200
     2.2 +++ b/src/Tools/isac/xmlsrc/interface-xml.sml	Tue May 19 10:57:38 2015 +0200
     2.3 @@ -21,13 +21,10 @@
     2.4  
     2.5  (** add and delete users -----------------------------------------------
     2.6   FIXXME.8.03 addUser: clear code, because only CalcTrees distinguished**)
     2.7 -fun adduserOK2xml (cI:calcID) (uI:iterID) = 
     2.8 -    writeln ("@@@@@begin@@@@@\n "^string_of_int uI^" \n" ^
     2.9 -	     "<ADDUSER>\n" ^
    2.10 -	     "  <CALCID> "^string_of_int cI^" </CALCID>\n" ^
    2.11 -	     "  <USERID> "^string_of_int uI^" </USERID>\n" ^
    2.12 -	     "</ADDUSER>\n" ^
    2.13 -	     "@@@@@end@@@@@");
    2.14 +fun adduserOK2xml (calcid : calcID) (userid : iterID) =
    2.15 +  XML.Elem (("ADDUSER", []),
    2.16 +    [XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    2.17 +    XML.Elem (("USERID", []), [XML.Text (string_of_int userid)])])
    2.18  fun deluserOK2xml (cI:calcID) (uI:iterID) = 
    2.19      writeln ("@@@@@begin@@@@@\n "^string_of_int uI^" \n" ^
    2.20  	     "<DELUSER>\n" ^
    2.21 @@ -79,6 +76,10 @@
    2.22  	     "  <ERROR> "^str^" </ERROR>\n" ^
    2.23  	     "</SYSERROR>\n" ^
    2.24  	     "@@@@@end@@@@@");
    2.25 +fun sysERROR2xmlTODO (calcid : calcID) str =
    2.26 +  XML.Elem (("SYSERROR", []),
    2.27 +    [XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    2.28 +    XML.Elem (("ERROR", []), [XML.Text (if str = "" then " ERROR in kernel " else str)])])
    2.29  
    2.30  fun refformulaOK2xml (cI:calcID) p (Form t) = 
    2.31      writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^