isac-java/src/java/isac/bridge/BridgeRMI.java
changeset 4801 22e8fa268e76
parent 4800 fdfdcc606b14
child 4802 f42db75ae228
     1.1 --- a/isac-java/src/java/isac/bridge/BridgeRMI.java	Sat Aug 22 16:31:53 2015 +0200
     1.2 +++ b/isac-java/src/java/isac/bridge/BridgeRMI.java	Mon Aug 24 09:45:50 2015 +0200
     1.3 @@ -1553,14 +1553,14 @@
     1.4      	/*PIDE*/XML.Tree TODO = JavaToIsa.set_next_tac(new scala.math.BigInt(BigInteger.valueOf(sml_id)), tac);    	
     1.5      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
     1.6      	/*PIDE*/XML.Tree xml_out = connection_to_kernel_.invoke(Operations.SET_NEXT_TAC, TODO);
     1.7 -    	/*PIDE*/bridge_.log(1, "<--ISA: message dropped ... " + xml_out);
     1.8 +    	/*PIDE*/bridge_.log(1, "<--ISA: message not sent to Dialog ... " + xml_out);
     1.9  
    1.10      	/*PIDE*/bridge_.log(1, "-->ISA: " + "(*setTheory*)autoCalculate " + sml_id + " (Step 1);");   	
    1.11      	/*PIDE*/TODO = JavaToIsa.auto_calculate(new scala.math.BigInt(BigInteger.valueOf(sml_id)), 
    1.12      	/*PIDE*/  "Step", new scala.math.BigInt(BigInteger.valueOf(1)));
    1.13      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
    1.14      	/*PIDE*/xml_out = connection_to_kernel_.invoke(Operations.AUTO_CALC, TODO);
    1.15 -    	/*PIDE*/bridge_.log(1, "<--ISA: CalcChanged dropped ... " + xml_out);
    1.16 +    	/*PIDE*/bridge_.log(1, "<--ISA: CalcChanged not sent to Dialog ... " + xml_out);
    1.17  
    1.18      	/*PIDE*/bridge_.log(1, "-->ISA: " + "(*setTheory*)getActiveFormula " + sml_id + ";");   	
    1.19      	/*PIDE*/TODO = JavaToIsa.get_active_form(new scala.math.BigInt(BigInteger.valueOf(sml_id)));    	
    1.20 @@ -1622,23 +1622,42 @@
    1.21      	/*PIDE*/  "CompleteCalcHead", new scala.math.BigInt(BigInteger.valueOf(0)));
    1.22      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
    1.23      	/*PIDE*/XML.Tree xml_out = connection_to_kernel_.invoke(Operations.AUTO_CALC, TODO);
    1.24 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
    1.25 +
    1.26 +    	/*PIDE*/IntCEvent java_out = null;
    1.27 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
    1.28 +    	/*PIDE*/  java_out = IsaToJava.auto_calc_out(xml_out);
    1.29 +    	/*PIDE*///  return_val = java_out.getCEvent();
    1.30 +    	/*PIDE*/bridge_.log(1, "<--ISA: not sent to Dialog ... " + xml_out);    	
    1.31 +    	/*PIDE*/} else
    1.32 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	
    1.33      	
    1.34 +
    1.35      	/*PIDE*/bridge_.log(1, "-->ISA: " + "(*completeCalcHead*)getActiveFormula " + sml_id + ";");
    1.36      	/*PIDE*/TODO = JavaToIsa.get_active_form(new scala.math.BigInt(BigInteger.valueOf(sml_id)));    	
    1.37 -    	/*PIDE*/pos = new Position(); //TODO get from auto_calculate_out !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1.38 -    	/*PIDE*/pos.setKind("DUMMY"); //TODO get from auto_calculate_out !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1.39      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
    1.40      	/*PIDE*/xml_out = connection_to_kernel_.invoke(Operations.GET_ACTIVE_FORM, TODO);
    1.41 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
    1.42 +
    1.43 +    	/*PIDE*/IntPosition java_out2 = null;
    1.44 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
    1.45 +    	/*PIDE*/  java_out2 = IsaToJava.get_active_form_out(xml_out);
    1.46 +    	/*PIDE*/ pos = java_out2.getPosition();
    1.47 +    	/*PIDE*/bridge_.log(1, "<--ISA: used locally ... " + xml_out);    	
    1.48 +    	/*PIDE*/} else
    1.49 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	
    1.50 +    	
    1.51      	
    1.52      	/*PIDE*/bridge_.log(1, "-->ISA: " + "(*completeCalcHead*)refFormula " + sml_id + pos.toSMLString() + ";");
    1.53      	/*PIDE*/TODO = JavaToIsa.ref_formula(new scala.math.BigInt(BigInteger.valueOf(sml_id)), pos);    	
    1.54      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
    1.55      	/*PIDE*/xml_out = connection_to_kernel_.invoke(Operations.REF_FORMULA, TODO);
    1.56 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
    1.57 -    	
    1.58 -    	//*PIDE*/return_val = TODOTODOTODOTODO;
    1.59 +
    1.60 +    	/*PIDE*/IntFormHead java_out3 = null;
    1.61 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
    1.62 +    	/*PIDE*/  java_out3 = IsaToJava.ref_formula_out(xml_out);
    1.63 +    	/*PIDE*/ return_val = (CalcHead)java_out3.getFormHead();
    1.64 +    	/*PIDE*/bridge_.log(1, "<--ISA: used locally ... " + xml_out);    	
    1.65 +    	/*PIDE*/} else
    1.66 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	   	
    1.67         	/*PIDE*///\---End hack
    1.68         	/*TTY*///---FIXXXME.WN050809 hack until setTheory pushed into SML-kernel
    1.69      	/*TTY*/ResponseWrapper wrapper = interpretSML(calc_tree_id,
    1.70 @@ -1669,7 +1688,14 @@
    1.71      	/*PIDE*/  "CompleteModel", new scala.math.BigInt(BigInteger.valueOf(0)));
    1.72      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
    1.73      	/*PIDE*/XML.Tree xml_out = connection_to_kernel_.invoke(Operations.AUTO_CALC, TODO);
    1.74 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
    1.75 +
    1.76 +    	/*PIDE*/IntCalcHead java_out = null;
    1.77 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
    1.78 +    	/*PIDE*/  java_out = IsaToJava.set_met_out(xml_out);
    1.79 +    	/*PIDE*/bridge_.log(1, "<--ISA: not sent to Dialog = " + xml_out);    	
    1.80 +    	/*PIDE*/} else
    1.81 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	
    1.82 +
    1.83      	
    1.84      	/*PIDE*/bridge_.log(1, "-->ISA: " + "(*completeModel*)getActiveFormula " + sml_id + ";");
    1.85      	/*PIDE*/TODO = JavaToIsa.get_active_form(new scala.math.BigInt(BigInteger.valueOf(sml_id)));    	
    1.86 @@ -1677,17 +1703,30 @@
    1.87      	/*PIDE*/pos.setKind("DUMMY"); //TODO get from auto_calculate_out !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1.88      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
    1.89      	/*PIDE*/xml_out = connection_to_kernel_.invoke(Operations.GET_ACTIVE_FORM, TODO);
    1.90 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
    1.91 +
    1.92 +    	/*PIDE*/IntPosition java_out2 = null;
    1.93 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
    1.94 +    	/*PIDE*/  java_out2 = IsaToJava.get_active_form_out(xml_out);
    1.95 +    	/*PIDE*/ pos = java_out2.getPosition();
    1.96 +    	/*PIDE*/bridge_.log(1, "<--ISA: used locally ... " + xml_out);    	
    1.97 +    	/*PIDE*/} else
    1.98 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	
    1.99 +    	
   1.100      	
   1.101      	/*PIDE*/bridge_.log(1, "-->ISA: " + "(*completeModel*)refFormula " + sml_id + " " + pos.toSMLString() + ";");
   1.102      	/*PIDE*/TODO = JavaToIsa.ref_formula(new scala.math.BigInt(BigInteger.valueOf(sml_id)), pos);    	
   1.103      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
   1.104      	/*PIDE*/xml_out = connection_to_kernel_.invoke(Operations.REF_FORMULA, TODO);
   1.105 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
   1.106 -    	
   1.107 -    	//*PIDE*/return_val = TODOTODOTODOTODO;
   1.108 +
   1.109 +    	/*PIDE*/IntFormHead java_out3 = null;
   1.110 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
   1.111 +    	/*PIDE*/  java_out3 = IsaToJava.ref_formula_out(xml_out);
   1.112 +    	/*PIDE*/ return_val = (CalcHead)java_out3.getFormHead();
   1.113 +    	/*PIDE*/bridge_.log(1, "<--ISA: used locally ... " + xml_out);    	
   1.114 +    	/*PIDE*/} else
   1.115 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	   	
   1.116         	/*PIDE*///\---End hack
   1.117 -       	/*TTY*///---FIXXXME.WN050809 hack until setTheory pushed into SML-kernel
   1.118 +        /*TTY*///---FIXXXME.WN050809 hack until setTheory pushed into SML-kernel
   1.119         	/*TTY*/ResponseWrapper wrapper = interpretSML(calc_tree_id,
   1.120         	/*TTY*/  "(*completeModel*)autoCalculate @calcid@ CompleteModel;", false);
   1.121         	/*TTY*///drop the CalcChanged returned by autoCalculate
   1.122 @@ -1716,22 +1755,42 @@
   1.123      	/*PIDE*/  "Step", new scala.math.BigInt(BigInteger.valueOf(1)));
   1.124      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
   1.125      	/*PIDE*/XML.Tree xml_out = connection_to_kernel_.invoke(Operations.AUTO_CALC, TODO);
   1.126 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
   1.127 +
   1.128 +    	/*PIDE*/IntCalcHead java_out = null;
   1.129 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
   1.130 +    	/*PIDE*/  java_out = IsaToJava.set_met_out(xml_out);
   1.131 +    	/*PIDE*/bridge_.log(1, "<--ISA: not sent to Dialog = " + xml_out);    	
   1.132 +    	/*PIDE*/} else
   1.133 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	
   1.134 +
   1.135      	
   1.136      	/*PIDE*/bridge_.log(1, "-->ISA: " + "(*nextSpecify*)getActiveFormula " + sml_id + ";");
   1.137      	/*PIDE*/TODO = JavaToIsa.get_active_form(new scala.math.BigInt(BigInteger.valueOf(sml_id)));    	
   1.138      	/*PIDE*/pos = new Position(); //TODO get from get_active_form_out !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1.139      	/*PIDE*/pos.setKind("DUMMY"); //TODO get from get_active_form_out !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   1.140      	/*PIDE*/xml_out = connection_to_kernel_.invoke(Operations.GET_ACTIVE_FORM, TODO);
   1.141 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
   1.142 +
   1.143 +    	/*PIDE*/IntPosition java_out2 = null;
   1.144 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
   1.145 +    	/*PIDE*/  java_out2 = IsaToJava.get_active_form_out(xml_out);
   1.146 +    	/*PIDE*/ pos = java_out2.getPosition();
   1.147 +    	/*PIDE*/bridge_.log(1, "<--ISA: used locally ... " + xml_out);    	
   1.148 +    	/*PIDE*/} else
   1.149 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	
   1.150 +    	
   1.151      	
   1.152      	/*PIDE*/bridge_.log(1, "-->ISA: " + "(*nextSpecify*)refFormula " + sml_id + pos.toSMLString() + ";");
   1.153      	/*PIDE*/TODO = JavaToIsa.ref_formula(new scala.math.BigInt(BigInteger.valueOf(sml_id)), pos);//^^pos.setKind("DUMMY")
   1.154      	/*PIDE*/bridge_.log(1, "-->ISA: " + TODO);
   1.155      	/*PIDE*/xml_out = connection_to_kernel_.invoke(Operations.REF_FORMULA, TODO);
   1.156 -    	/*PIDE*/bridge_.log(1, "<--ISA: " + xml_out);
   1.157 -    	
   1.158 -    	//*PIDE*/return_val = TODOTODOTODOTODO;
   1.159 +
   1.160 +    	/*PIDE*/IntFormHead java_out3 = null;
   1.161 +    	/*PIDE*/if (!IsaToJava.is_message(xml_out)) {
   1.162 +    	/*PIDE*/  java_out3 = IsaToJava.ref_formula_out(xml_out);
   1.163 +    	/*PIDE*/ return_val = (CalcHead)java_out3.getFormHead();
   1.164 +    	/*PIDE*/bridge_.log(1, "<--ISA: used locally ... " + xml_out);    	
   1.165 +    	/*PIDE*/} else
   1.166 +        /*PIDE*/  bridge_.log(1, "<--ISA: IsaToJava.is_message: REVIEW!");    	   	
   1.167         	/*PIDE*///\---End hack
   1.168         	/*TTY*///---FIXXXME.WN050809 hack until setTheory pushed into SML-kernel
   1.169         	/*TTY*/ResponseWrapper wrapper = interpretSML(calc_tree_id,