public static Stella_Object evaluateTypedArgument(Stella_Object argument, Surrogate type) {
    if ((type == Logic.SGT_LOGIC_PROPOSITION) ||
        (Logic.$AUTO_COERCE_PROPOSITIONAL_ARGUMENTSp$ &&
         Logic.propositionalArgumentP(argument))) {
      return (Logic.evaluatePropositionTerm(argument));
    }
    else if (type != null) {
      { Object old$Defaultcreationtype$000 = Logic.$DEFAULTCREATIONTYPE$.get();

        try {
          Native.setSpecial(Logic.$DEFAULTCREATIONTYPE$, type);
          return (Logic.evaluateTerm(argument));

        } finally {
          Logic.$DEFAULTCREATIONTYPE$.set(old$Defaultcreationtype$000);
        }
      }
    }
    else {
      return (Logic.evaluateTerm(argument));
    }
  }