java: getElementsFromTo CalcTree --> CalcIterator
authorwneuper
Sun, 26 Jun 2005 13:02:29 +0200
changeset 2526f37df79389c0
parent 2525 a98929991bb8
child 2527 1064761e9547
java: getElementsFromTo CalcTree --> CalcIterator
src/java/isac/bridge/MathEngine.java
     1.1 --- a/src/java/isac/bridge/MathEngine.java	Sun Jun 26 13:02:29 2005 +0200
     1.2 +++ b/src/java/isac/bridge/MathEngine.java	Sun Jun 26 13:02:29 2005 +0200
     1.3 @@ -7,7 +7,10 @@
     1.4  import isac.util.Formalization;
     1.5  import isac.util.formulae.Assumptions;
     1.6  import isac.util.formulae.CalcFormula;
     1.7 +import isac.util.formulae.KEStoreID;
     1.8 +import isac.util.formulae.Match;
     1.9  import isac.util.formulae.Position;
    1.10 +import isac.util.formulae.ProblemID;
    1.11  import isac.util.interfaces.ICalcElement;
    1.12  import isac.util.interfaces.ICalcIterator;
    1.13  import isac.util.tactics.Tactic;
    1.14 @@ -51,8 +54,8 @@
    1.15              System.out.println("MathEngine Constr: connected to Bridge: "
    1.16                      + bridge_rmi_.toString());
    1.17              if (bridge_rmi_ == null)
    1.18 -                    System.out
    1.19 -                            .println("Error occured: The Bridge could not be found!");
    1.20 +                System.out
    1.21 +                        .println("Error occured: The Bridge could not be found!");
    1.22          } catch (Exception e) {
    1.23              System.out
    1.24                      .println("Could not connect to Bridge via RMI\n"
    1.25 @@ -135,8 +138,8 @@
    1.26       * calcTree = (CalcTree) calc_trees_.get(new Integer(id));//WN040922 TODO
    1.27       * simplify
    1.28       * 
    1.29 -     * if (calc_head_.getCalcHeadStatus() != CalcHead.MODEL_ITEM_CORRECT) { throw
    1.30 -     * new Exception("Startsolving with incorrect CalcHead"); } Tactic t =
    1.31 +     * if (calc_head_.getCalcHeadStatus() != CalcHead.MODEL_ITEM_CORRECT) {
    1.32 +     * throw new Exception("Startsolving with incorrect CalcHead"); } Tactic t =
    1.33       * calcTree.fetchProposedTactic(); if (t.getName().compareTo("Apply_Method") !=
    1.34       * 0) { throw new Exception("Startsolving fetches " + t.getName()); } //Next
    1.35       * Tactic must always be Apply_Method calcTree.setNextTactic(t); //return
    1.36 @@ -178,7 +181,8 @@
    1.37      //	 * @param problemID
    1.38      //	 * @return CalcHead, if the operation was successful, else null
    1.39      //	 */
    1.40 -    //	public void try_refine_(CalcHead calc_head_, CalcHeadCompoundID problemID)
    1.41 +    //	public void try_refine_(CalcHead calc_head_, CalcHeadCompoundID
    1.42 +    // problemID)
    1.43      //			throws NotInSpecificationPhaseException {
    1.44      //		CalcHead newCalcHead = null;
    1.45      //		try {
    1.46 @@ -389,4 +393,35 @@
    1.47          return bridge_rmi_.getAccumulatedAssumptions(id, pos);
    1.48      }
    1.49  
    1.50 +    /**
    1.51 +     * @see isac.util.interfaces.ICalcIterator#tryMatchProblem
    1.52 +     */
    1.53 +    public Match tryMatchProblem(int calcTreeID, ProblemID pblID)
    1.54 +            throws RemoteException {
    1.55 +        return bridge_rmi_.tryMatchProblem(calcTreeID, pblID);
    1.56 +    }
    1.57 +
    1.58 +    /**
    1.59 +     * @see isac.util.interfaces.ICalcIterator#tryRefineProblem
    1.60 +     */
    1.61 +    public Match tryRefineProblem(int calcTreeID, ProblemID pblID)
    1.62 +            throws RemoteException {
    1.63 +        return bridge_rmi_.tryRefineProblem(calcTreeID, pblID);
    1.64 +    }
    1.65 +
    1.66 +    /**
    1.67 +     * @see isac.util.interfaces.ICalcIterator#tryMatchMethod
    1.68 +     */
    1.69 +    public Match tryMatchMethod(int calcTreeID, KEStoreID pblID)
    1.70 +            throws RemoteException {
    1.71 +        return bridge_rmi_.tryMatchMethod(calcTreeID, pblID);
    1.72 +    }
    1.73 +
    1.74 +    /**
    1.75 +     * @see isac.util.interfaces.ICalcIterator#tryRefineMethod
    1.76 +     */
    1.77 +    public Match tryRefineMethod(int calcTreeID, KEStoreID pblID)
    1.78 +            throws RemoteException {
    1.79 +        return bridge_rmi_.tryRefineMethod(calcTreeID, pblID);
    1.80 +    }
    1.81  }
    1.82 \ No newline at end of file