public static Keyword sumOfUnitsSpecialist(ControlFrame frame, Keyword lastmove) {
    { Proposition proposition = frame.proposition;
      Stella_Object listarg = (proposition.arguments.theArray)[0];
      Stella_Object listskolem = Logic.argumentBoundTo(listarg);
      Stella_Object sumarg = (proposition.arguments.theArray)[1];
      DimNumber sum = null;

      lastmove = lastmove;
      if ((listskolem != null) &&
          (!Logic.logicalCollectionP(listskolem))) {
        {
          System.out.println();
          System.out.println("Non list appears in second argument to 'SUM-OF-NUMBERS'");
          System.out.println();
        }
;
        return (Units.KWD_TERMINAL_FAILURE);
      }
      { List listvalue = Logic.assertedCollectionMembers(listskolem, true);
        DimNumberLogicWrapper dimvalue = null;

        if (listvalue.emptyP()) {
          return (Units.KWD_TERMINAL_FAILURE);
        }
        try {
          { Stella_Object v = null;
            Cons iter000 = listvalue.theConsList;

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              v = iter000.value;
              dimvalue = Units.helpGetDimNumber(v);
              if (dimvalue != null) {
                if (sum == null) {
                  sum = ((DimNumber)(dimvalue.wrapperValue));
                }
                else {
                  sum = sum.add(((DimNumber)(dimvalue.wrapperValue)));
                }
              }
              else {
                return (Units.KWD_FAILURE);
              }
            }
          }
        } catch (IncompatibleUnitsException e000) {
          return (Units.KWD_TERMINAL_FAILURE);
        }
        if (sum == null) {
          return (Units.KWD_TERMINAL_FAILURE);
        }
        if (Logic.bindArgumentToValueP(sumarg, Units.wrapDimNumber(sum), true)) {
          {
            ControlFrame.setFrameTruthValue(frame, Logic.TRUE_TRUTH_VALUE);
            return (Units.KWD_FINAL_SUCCESS);
          }
        }
        else {
          {
            ControlFrame.setFrameTruthValue(frame, Logic.FALSE_TRUTH_VALUE);
            return (Units.KWD_TERMINAL_FAILURE);
          }
        }
      }
    }
  }