1.1 --- a/src/java/isac/bridge/CalcTree.java Wed Jun 08 17:37:21 2005 +0200
1.2 +++ b/src/java/isac/bridge/CalcTree.java Tue Jun 14 17:22:50 2005 +0200
1.3 @@ -6,9 +6,11 @@
1.4
1.5 import isac.util.CalcChanged;
1.6 import isac.util.CalcChangedEvent;
1.7 +import isac.util.NotInSpecificationPhaseException;
1.8 import isac.util.StartSolvingException;
1.9 import isac.util.formulae.CalcHead;
1.10 import isac.util.formulae.CalcFormula;
1.11 +import isac.util.formulae.CalcHeadCompoundID;
1.12 import isac.util.formulae.Position;
1.13 import isac.util.interfaces.ICalcIterator;
1.14 import isac.util.interfaces.IToCalc;
1.15 @@ -510,4 +512,48 @@
1.16 return null;
1.17 }
1.18
1.19 + /**
1.20 + * @see isac.util.interfaces.IToCalc#tryMatch(CalcHead, CalcHeadCompoundID)
1.21 + * FIXXXME.WN050610 change to: tryMatch( CalcHeadCompoundID)
1.22 + */
1.23 + public void tryMatch(CalcHead calcHead, CalcHeadCompoundID problemID)
1.24 + throws NotInSpecificationPhaseException {
1.25 + CalcHead newCalcHead = null;
1.26 + try {
1.27 + //WN040924 newCalcHead =
1.28 + // bridgeRMI.tryMatch(calcHead.getCalcTreeID(), problemID);
1.29 + bridgeRMI_.tryMatch(calcHead.getCalcTreeID(), problemID);
1.30 + if (newCalcHead == null) {
1.31 + throw new NotInSpecificationPhaseException();
1.32 + }
1.33 + calcHead.fillValuesfrom(newCalcHead);
1.34 + } catch (RemoteException e) {
1.35 + // TODO Auto-generated catch block
1.36 + e.printStackTrace();
1.37 + }
1.38 + }
1.39 +
1.40 + /**
1.41 + * Refine a given problem for this CalcTree
1.42 + *
1.43 + * @param problemID
1.44 + * @return CalcHead, if the operation was successful, else null
1.45 + */
1.46 + public void tryRefine(CalcHead calcHead, CalcHeadCompoundID problemID)
1.47 + throws NotInSpecificationPhaseException {
1.48 + CalcHead newCalcHead = null;
1.49 + try {
1.50 + //WN040924 newCalcHead =
1.51 + // bridgeRMI.tryRefine(calcHead.getCalcTreeID(), problemID);
1.52 + bridgeRMI_.tryRefine(calcHead.getCalcTreeID(), problemID);
1.53 + if (newCalcHead == null) {
1.54 + throw new NotInSpecificationPhaseException();
1.55 + }
1.56 + calcHead.fillValuesfrom(newCalcHead);
1.57 + } catch (RemoteException e) {
1.58 + // TODO Auto-generated catch block
1.59 + e.printStackTrace();
1.60 + }
1.61 + }
1.62 +
1.63 }
1.64 \ No newline at end of file
2.1 --- a/src/java/isac/bridge/MathEngine.java Wed Jun 08 17:37:21 2005 +0200
2.2 +++ b/src/java/isac/bridge/MathEngine.java Tue Jun 14 17:22:50 2005 +0200
2.3 @@ -175,51 +175,52 @@
2.4 * catch (RemoteException e) { e.printStackTrace(); } }
2.5 */
2.6
2.7 - /**
2.8 - * Refine a given problem for this CalcTree
2.9 - *
2.10 - * @param problemID
2.11 - * @return CalcHead, if the operation was successful, else null
2.12 - */
2.13 - public void tryRefine(CalcHead calcHead, CalcHeadCompoundID problemID)
2.14 - throws NotInSpecificationPhaseException {
2.15 - CalcHead newCalcHead = null;
2.16 - try {
2.17 - //WN040924 newCalcHead =
2.18 - // bridgeRMI.tryRefine(calcHead.getCalcTreeID(), problemID);
2.19 - bridgeRMI.tryRefine(calcHead.getCalcTreeID(), problemID);
2.20 - if (newCalcHead == null) {
2.21 - throw new NotInSpecificationPhaseException();
2.22 - }
2.23 - calcHead.fillValuesfrom(newCalcHead);
2.24 - } catch (RemoteException e) {
2.25 - // TODO Auto-generated catch block
2.26 - e.printStackTrace();
2.27 - }
2.28 - }
2.29 +// /**
2.30 +// * Refine a given problem for this CalcTree
2.31 +// *
2.32 +// * @param problemID
2.33 +// * @return CalcHead, if the operation was successful, else null
2.34 +// */
2.35 +// public void tryRefine(CalcHead calcHead, CalcHeadCompoundID problemID)
2.36 +// throws NotInSpecificationPhaseException {
2.37 +// CalcHead newCalcHead = null;
2.38 +// try {
2.39 +// //WN040924 newCalcHead =
2.40 +// // bridgeRMI.tryRefine(calcHead.getCalcTreeID(), problemID);
2.41 +// bridgeRMI.tryRefine(calcHead.getCalcTreeID(), problemID);
2.42 +// if (newCalcHead == null) {
2.43 +// throw new NotInSpecificationPhaseException();
2.44 +// }
2.45 +// calcHead.fillValuesfrom(newCalcHead);
2.46 +// } catch (RemoteException e) {
2.47 +// // TODO Auto-generated catch block
2.48 +// e.printStackTrace();
2.49 +// }
2.50 +// }
2.51
2.52 - /**
2.53 - * Match a given problem for this CalcTree
2.54 - *
2.55 - * @param problemID
2.56 - * @return CalcHead, if the operation was successful, else null
2.57 - */
2.58 - public void tryMatch(CalcHead calcHead, CalcHeadCompoundID problemID)
2.59 - throws NotInSpecificationPhaseException {
2.60 - CalcHead newCalcHead = null;
2.61 - try {
2.62 - //WN040924 newCalcHead =
2.63 - // bridgeRMI.tryMatch(calcHead.getCalcTreeID(), problemID);
2.64 - bridgeRMI.tryMatch(calcHead.getCalcTreeID(), problemID);
2.65 - if (newCalcHead == null) {
2.66 - throw new NotInSpecificationPhaseException();
2.67 - }
2.68 - calcHead.fillValuesfrom(newCalcHead);
2.69 - } catch (RemoteException e) {
2.70 - // TODO Auto-generated catch block
2.71 - e.printStackTrace();
2.72 - }
2.73 - }
2.74 +//WN050610 transferred toCalcTree
2.75 +// /**
2.76 +// * Match a given problem for this CalcTree
2.77 +// *
2.78 +// * @param problemID
2.79 +// * @return CalcHead, if the operation was successful, else null
2.80 +// */
2.81 +// public void tryMatch(CalcHead calcHead, CalcHeadCompoundID problemID)
2.82 +// throws NotInSpecificationPhaseException {
2.83 +// CalcHead newCalcHead = null;
2.84 +// try {
2.85 +// //WN040924 newCalcHead =
2.86 +// // bridgeRMI.tryMatch(calcHead.getCalcTreeID(), problemID);
2.87 +// bridgeRMI.tryMatch(calcHead.getCalcTreeID(), problemID);
2.88 +// if (newCalcHead == null) {
2.89 +// throw new NotInSpecificationPhaseException();
2.90 +// }
2.91 +// calcHead.fillValuesfrom(newCalcHead);
2.92 +// } catch (RemoteException e) {
2.93 +// // TODO Auto-generated catch block
2.94 +// e.printStackTrace();
2.95 +// }
2.96 +// }
2.97
2.98 // Delegated methods from CalcTree/Iterator
2.99 int setNextTactic(int id, Tactic tactic) throws RemoteException {
3.1 --- a/src/java/isac/util/formulae/CalcHead.java Wed Jun 08 17:37:21 2005 +0200
3.2 +++ b/src/java/isac/util/formulae/CalcHead.java Tue Jun 14 17:22:50 2005 +0200
3.3 @@ -96,8 +96,7 @@
3.4
3.5 /**
3.6 * Format the object in a way that the bridge can handle it FIXME.WN041008
3.7 - * this is Formalization.toSMLString, _NOT_ CalcHead.toSMLString
3.8 - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3.9 + * this is Formalization.toSMLString, _NOT_ CalcHead.toSMLString !!!
3.10 *
3.11 * @return SML representation
3.12 */
4.1 --- a/src/java/isac/util/interfaces/IToCalc.java Wed Jun 08 17:37:21 2005 +0200
4.2 +++ b/src/java/isac/util/interfaces/IToCalc.java Tue Jun 14 17:22:50 2005 +0200
4.3 @@ -9,6 +9,7 @@
4.4
4.5 import isac.bridge.CalcTree;
4.6 import isac.util.Formalization;
4.7 +import isac.util.NotInSpecificationPhaseException;
4.8 import isac.util.formulae.*;
4.9 import isac.util.tactics.*;
4.10
4.11 @@ -294,4 +295,16 @@
4.12 ICalcIterator iterator_to, Integer level,
4.13 boolean result_includes_tactics) throws RemoteException;
4.14
4.15 + /**
4.16 + * Match a given problem for this CalcTree
4.17 + *
4.18 + * @param problemID
4.19 + * @param CalcHead FIXXXME.WN050610 drop !!!
4.20 + *
4.21 + * @return CalcHead, if the operation was successful, else null
4.22 + * ... replaced by ref-arg to be used instead
4.23 + */
4.24 + public void tryMatch(CalcHead calcHead, CalcHeadCompoundID problemID)
4.25 + throws NotInSpecificationPhaseException;
4.26 +
4.27 }
4.28 \ No newline at end of file