1.1 --- a/src/java/isac/bridge/MathEngine.java Fri Feb 18 17:56:07 2005 +0100
1.2 +++ b/src/java/isac/bridge/MathEngine.java Fri Feb 18 17:56:07 2005 +0100
1.3 @@ -6,6 +6,7 @@
1.4 import isac.util.CalcChanged;
1.5 import isac.util.Formalization;
1.6 import isac.util.NotInSpecificationPhaseException;
1.7 +import isac.util.formulae.Assumptions;
1.8 import isac.util.formulae.CalcHead;
1.9 import isac.util.formulae.CalcHeadCompoundID;
1.10 import isac.util.formulae.CalcFormula;
1.11 @@ -229,10 +230,6 @@
1.12 return bridgeRMI.fetchProposedTactic(id);
1.13 }
1.14
1.15 - Tactic[] fetchAppliableTactics(int id, int scope) throws RemoteException {
1.16 - return bridgeRMI.fetchAppliableTactics(id, scope);
1.17 - }
1.18 -
1.19 CalcChanged autoCalculate(int id, int scope, int nSteps)
1.20 throws RemoteException {
1.21 logger.debug("autoCalculate: id=" + id + ", scope=" + scope
1.22 @@ -248,7 +245,8 @@
1.23 return bridgeRMI.appendFormula(id, f);
1.24 }
1.25
1.26 - CalcChanged intermediateSteps(int id, ICalcIterator ci) throws RemoteException {
1.27 + CalcChanged intermediateSteps(int id, ICalcIterator ci)
1.28 + throws RemoteException {
1.29 return bridgeRMI.intermediateSteps(id, ci);
1.30 }
1.31
1.32 @@ -366,4 +364,32 @@
1.33 }
1.34 return null;
1.35 }
1.36 +
1.37 + /**
1.38 + * @see isac.util.interfaces.ICalcIterator#getTactic()
1.39 + */
1.40 + public Tactic getTactic(int id, Position pos) throws RemoteException {
1.41 + return bridgeRMI.getTactic(id, pos);
1.42 + }
1.43 +
1.44 + public Vector getApplicableTactics(int calcTreeID, int scope, Position pos)
1.45 + throws RemoteException {
1.46 + return bridgeRMI.getAppliableTactics(calcTreeID, scope, pos);
1.47 + }
1.48 +
1.49 + /**
1.50 + * @see isac.util.interfaces.ICalcIterator#getAssumptions()
1.51 + */
1.52 + public Assumptions getAssumptions(int id, Position pos) throws RemoteException {
1.53 + return bridgeRMI.getAssumptions(id, pos);
1.54 + }
1.55 +
1.56 + /**
1.57 + * @see isac.util.interfaces.ICalcIterator#getAssumptions()
1.58 + */
1.59 + public Assumptions getAccumulatedAssumptions(int id, Position pos) throws RemoteException {
1.60 + return bridgeRMI.getAccumulatedAssumptions(id, pos);
1.61 + }
1.62 +
1.63 +
1.64 }
1.65 \ No newline at end of file
2.1 --- a/src/java/isac/util/formulae/Assumptions.java Fri Feb 18 17:56:07 2005 +0100
2.2 +++ b/src/java/isac/util/formulae/Assumptions.java Fri Feb 18 17:56:07 2005 +0100
2.3 @@ -32,13 +32,11 @@
2.4 formulae_ = new Vector();
2.5 }
2.6
2.7 - /*
2.8 - * (non-Javadoc)
2.9 - *
2.10 + /**
2.11 * @see isac.util.interfaces.ICalcElement#toSMLString()
2.12 + * ATTENTION: does NOT make sense for the Vector formulae_
2.13 */
2.14 public String toSMLString() {
2.15 - // TODO Auto-generated method stub
2.16 return null;
2.17 }
2.18
3.1 --- a/src/java/isac/util/interfaces/ICalcIterator.java Fri Feb 18 17:56:07 2005 +0100
3.2 +++ b/src/java/isac/util/interfaces/ICalcIterator.java Fri Feb 18 17:56:07 2005 +0100
3.3 @@ -10,6 +10,7 @@
3.4
3.5 import java.rmi.Remote;
3.6 import java.rmi.RemoteException;
3.7 +import java.util.Vector;
3.8
3.9 /**
3.10 * References a certain position in a CalcTree.
3.11 @@ -47,7 +48,7 @@
3.12 * @return Position
3.13 */
3.14 public Position getPosition() throws RemoteException;
3.15 -
3.16 +
3.17 /**
3.18 * Reference the first (root) element in the attached calculation tree.
3.19 *
3.20 @@ -116,7 +117,7 @@
3.21 * moveDown() would move to another element WN040819 awaiting
3.22 * problems with parallel branches (OR, AND, etc.) in calcTree
3.23 * @deprecated due to calcChangedEvent since 0512
3.24 - */
3.25 + */
3.26 public boolean isLast() throws RemoteException;
3.27
3.28 /**
3.29 @@ -141,10 +142,32 @@
3.30 public Tactic getTactic() throws RemoteException;
3.31
3.32 /**
3.33 - * @return Assumption generated by the Tactic applied to the formula, both
3.34 + * Get a list of tactics applicable to the active formula.
3.35 + *
3.36 + * @param scope
3.37 + * WN0502 not yet impl. The filter parameter selects the scope of
3.38 + * search for applicable tactics.
3.39 + * @return Vector with applicable tactics
3.40 + * @see #TACTICS_ALL
3.41 + * @see #TACTICS_CURRENT_THEORY
3.42 + * @see #TACTICS_CURRENT_METHOD
3.43 + */
3.44 + public Vector getApplicableTactics(int scope) throws RemoteException;
3.45 +
3.46 + /**
3.47 + * @return Assumptions generated by the Tactic applied to the formula, both
3.48 * under the same Iterator
3.49 */
3.50 - public Assumptions getAssumption() throws RemoteException;
3.51 + public Assumptions getAssumptions() throws RemoteException;
3.52 +
3.53 + /**
3.54 + * @return Assumptions accumulated during calculation down to the formula
3.55 + * under the Iterator
3.56 + * ATTENTION: this returnvalue is also used by getAssumptions as long as
3.57 + * getAccumulatedAssumptions does not include references to their _several_
3.58 + * sources -- i.e. change _this_ return, not that in getAssumptions !
3.59 + */
3.60 + public Assumptions getAccumulatedAssumptions() throws RemoteException;
3.61
3.62 /**
3.63 * The current level of nesting into subcalculations.
3.64 @@ -168,21 +191,22 @@
3.65
3.66 /**
3.67 * for test-output
3.68 + *
3.69 * @return 'position', i.e. unique identifier in a CalcTree
3.70 */
3.71 public String toSMLString();
3.72 -
3.73 -// /**
3.74 -// * Create a copy of this Iterator: the clone will point to the Position
3.75 -// * in the calcTree (Position may come from a formula in the worksheet)
3.76 -// *
3.77 -// * @return a cloned Iterator
3.78 -// */
3.79 -// public ICalcIterator clone(Position p);
3.80
3.81 -// /**
3.82 -// * @return the position unique within a calctree
3.83 -// * @see isac.uti.interfaces.ICalcIterator#clone(Position)
3.84 -// */
3.85 -// public Position getSmlPos();
3.86 + // /**
3.87 + // * Create a copy of this Iterator: the clone will point to the Position
3.88 + // * in the calcTree (Position may come from a formula in the worksheet)
3.89 + // *
3.90 + // * @return a cloned Iterator
3.91 + // */
3.92 + // public ICalcIterator clone(Position p);
3.93 +
3.94 + // /**
3.95 + // * @return the position unique within a calctree
3.96 + // * @see isac.uti.interfaces.ICalcIterator#clone(Position)
3.97 + // */
3.98 + // public Position getSmlPos();
3.99 }
3.100 \ No newline at end of file
4.1 --- a/src/java/isac/wsdialog/DialogIterator.java Fri Feb 18 17:56:07 2005 +0100
4.2 +++ b/src/java/isac/wsdialog/DialogIterator.java Fri Feb 18 17:56:07 2005 +0100
4.3 @@ -8,6 +8,7 @@
4.4
4.5 import java.rmi.RemoteException;
4.6 import java.rmi.server.UnicastRemoteObject;
4.7 +import java.util.Vector;
4.8
4.9 import isac.bridge.CalcIterator;
4.10 import isac.util.formulae.Assumptions;
4.11 @@ -187,7 +188,7 @@
4.12 /* (non-Javadoc)
4.13 * @see isac.util.interfaces.ICalcIterator#getAssumption()
4.14 */
4.15 -public Assumptions getAssumption() throws RemoteException{
4.16 +public Assumptions getAssumptions() throws RemoteException{
4.17 // TODO Auto-generated method stub
4.18 return null;
4.19 }
4.20 @@ -204,4 +205,20 @@
4.21 // return p.toSMLString();
4.22 }
4.23
4.24 +/* (non-Javadoc)
4.25 + * @see isac.util.interfaces.ICalcIterator#getApplicableTactics()
4.26 + */
4.27 +public Vector getApplicableTactics(int scope) throws RemoteException {
4.28 + // TODO Auto-generated method stub
4.29 + return null;
4.30 }
4.31 +
4.32 +/* (non-Javadoc)
4.33 + * @see isac.util.interfaces.ICalcIterator#getAccumulatedAssumptions()
4.34 + */
4.35 +public Assumptions getAccumulatedAssumptions() throws RemoteException {
4.36 + // TODO Auto-generated method stub
4.37 + return null;
4.38 +}
4.39 +
4.40 +}
5.1 --- a/src/xml/isac.dtd Fri Feb 18 17:56:07 2005 +0100
5.2 +++ b/src/xml/isac.dtd Fri Feb 18 17:56:07 2005 +0100
5.3 @@ -1,4 +1,4 @@
5.4 -<!ELEMENT ISAC (ADDUSER | DELCALC | CALCITERATOR | SYSERROR |
5.5 +<!ELEMENT ISAC (CALCTREE | ADDUSER | DELCALC | CALCITERATOR | SYSERROR |
5.6 TRYMATCH | TRYREFINE |
5.7 AUTOCALC | MODIFYCALCHEAD | NEXTTAC | SETNEXTTACTIC | INTERSTEPS |
5.8 APPENDFORMULA | REPLACEFORMULA |