src/Tools/isac/xmlsrc/interface-xml.sml
changeset 59136 fd7b76f606a4
parent 59135 b8d5708db208
child 59137 bebfa9698459
     1.1 --- a/src/Tools/isac/xmlsrc/interface-xml.sml	Sun May 31 09:36:22 2015 +0200
     1.2 +++ b/src/Tools/isac/xmlsrc/interface-xml.sml	Sun May 31 10:24:16 2015 +0200
     1.3 @@ -148,6 +148,11 @@
     1.4  	     tac2xml i tac^
     1.5  	     "</GETTACTIC>\n" ^
     1.6  	     "@@@@@end@@@@@");
     1.7 +fun gettacticOK2xml (calcid : calcID) tac = 
     1.8 +  XML.Elem (("GETTACTIC", []),[
     1.9 +    XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    1.10 +    XML.Elem (("CALCCHANGED", []), [xml_of_tac tac])])
    1.11 +
    1.12  fun gettacticERROR2xml (cI:calcID) str = 
    1.13      writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^
    1.14  	     "<GETTACTIC>\n" ^
    1.15 @@ -155,6 +160,10 @@
    1.16  	     "  <ERROR> "^str^" </ERROR>\n" ^
    1.17  	     "</GETTACTIC>\n" ^
    1.18  	     "@@@@@end@@@@@");
    1.19 +fun gettacticERROR2xml (calcid : calcID) str = 
    1.20 +  XML.Elem (("GETTACTIC", []),[
    1.21 +    XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    1.22 +    XML.Elem (("ERROR", []), [XML.Text  str])])
    1.23  
    1.24  fun applicabletacticsOK cI tacs =
    1.25      writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^
    1.26 @@ -179,8 +188,10 @@
    1.27  	     "  </ASMLIST>\n" ^
    1.28  	     "</GETASSUMPTIONS>\n" ^
    1.29  	     "@@@@@end@@@@@");
    1.30 -(* getasmsOK2xml 333 [str2term "1+1=2", str2term "1+1+1=3"];
    1.31 -   *)
    1.32 +fun getasmsOK2xml (calcid : calcID) terms = 
    1.33 +  XML.Elem (("APPLICABLETACTICS", []), [
    1.34 +    XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    1.35 +    XML.Elem (("ASMLIST", []), (map xml_of_formula terms))])
    1.36  
    1.37  (*WN0502 @see ME/ctree: type asms: illdesigned, thus not used*)
    1.38  fun getaccuasmsOK2xml cI asms =
    1.39 @@ -326,6 +337,10 @@
    1.40  	     "   <MESSAGE> "^e^" </MESSAGE>\n" ^
    1.41  	     "</SETNEXTTACTIC>\n" ^
    1.42  	     "@@@@@end@@@@@");
    1.43 +fun setnexttactic2xml (calcid : calcID) e = 
    1.44 +  XML.Elem (("SETNEXTTACTIC", []), [
    1.45 +    XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    1.46 +    XML.Elem (("MESSAGE", []), [XML.Text e])])
    1.47  
    1.48  fun fetchproposedtacticOK2xml (cI:calcID) tac _ = 
    1.49      writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^
    1.50 @@ -345,6 +360,12 @@
    1.51  	     "  </TACTICERRORPATTERNS>\n" ^
    1.52       "</NEXTTAC>\n" ^
    1.53  	     "@@@@@end@@@@@");
    1.54 +fun fetchproposedtacticOK2xml (calcid : calcID) tac (errpatIDs : errpatID list) = 
    1.55 +  XML.Elem (("NEXTTAC", []), [
    1.56 +    XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    1.57 +    XML.Elem (("TACTICERRORPATTERNS", []), [
    1.58 +      xml_of_strs errpatIDs,
    1.59 +      xml_of_tac tac])])
    1.60  
    1.61  fun fetchproposedtacticERROR2xml (*uI:userID*) (cI:calcID) e = 
    1.62      writeln ("@@@@@begin@@@@@\n "^string_of_int cI^" \n" ^
    1.63 @@ -353,6 +374,10 @@
    1.64  	     "  <ERROR> "^ e ^" </ERROR>\n" ^
    1.65  	     "</NEXTTAC>\n" ^
    1.66  	     "@@@@@end@@@@@");
    1.67 +fun fetchproposedtacticERROR2xml (calcid : calcID) e = 
    1.68 +  XML.Elem (("NEXTTAC", []), [
    1.69 +    XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    1.70 +    XML.Elem (("ERROR", []), [XML.Text e])])
    1.71  
    1.72  (*. UNCHANGED: the pos' of the active formula autocalculate has been applied at
    1.73      DELETED:   last pos' of the succesional sequence of formulae prob. deleted
    1.74 @@ -445,4 +470,8 @@
    1.75  	     id2xml 3 pattIDs ^
    1.76  	     "</FINDFILLPATTERNS>\n" ^
    1.77  	     "@@@@@end@@@@@");
    1.78 +fun findFillpatterns2xml (calcid : calcID) pattIDs = 
    1.79 +  XML.Elem (("FINDFILLPATTERNS", []), [
    1.80 +    XML.Elem (("CALCID", []), [XML.Text (string_of_int calcid)]),
    1.81 +    xml_of_strs pattIDs])
    1.82