* @return TruthValue
   */
  public static TruthValue callAsk(Stella_Object query) {
    { Object old$Queryiterator$000 = Logic.$QUERYITERATOR$.get();
      Object old$ReversepolarityP$000 = Logic.$REVERSEPOLARITYp$.get();
      Object old$Inferencelevel$000 = Logic.$INFERENCELEVEL$.get();
      Object old$GenerateAllProofsP$000 = Logic.$GENERATE_ALL_PROOFSp$.get();

      try {
        Native.setSpecial(Logic.$QUERYITERATOR$, Logic.createAskQuery(query));
        Native.setBooleanSpecial(Logic.$REVERSEPOLARITYp$, false);
        Native.setSpecial(Logic.$INFERENCELEVEL$, Logic.currentInferenceLevel());
        Native.setBooleanSpecial(Logic.$GENERATE_ALL_PROOFSp$, false);
        { TruthValue truthValue = null;
          boolean threevaluedaskP = Logic.testQueryOptionP(((QueryIterator)(Logic.$QUERYITERATOR$.get())), Logic.KWD_THREE_VALUEDp);
          boolean fourvaluedaskP = Logic.testQueryOptionP(((QueryIterator)(Logic.$QUERYITERATOR$.get())), Logic.KWD_FOUR_VALUEDp);

          if (Logic.$MOST_RECENT_QUERY$ == null) {
            Logic.$MOST_RECENT_QUERY$ = ((QueryIterator)(Logic.$QUERYITERATOR$.get()));
          }
          ((QueryIterator)(Logic.$QUERYITERATOR$.get())).nextP();
          { TruthValue temp000 = ((QueryIterator)(Logic.$QUERYITERATOR$.get())).baseControlFrame.truthValue;

            truthValue = ((temp000 != null) ? temp000 : Logic.UNKNOWN_TRUTH_VALUE);
          }
          if (((truthValue == Logic.UNKNOWN_TRUTH_VALUE) ||
              (truthValue == null)) &&
              (threevaluedaskP ||
               fourvaluedaskP)) {
            ((QueryIterator)(Logic.$QUERYITERATOR$.get())).baseControlFrame.reversePolarityP = true;
            ((QueryIterator)(Logic.$QUERYITERATOR$.get())).reset();
            ((QueryIterator)(Logic.$QUERYITERATOR$.get())).nextP();
            { TruthValue temp001 = ((QueryIterator)(Logic.$QUERYITERATOR$.get())).baseControlFrame.truthValue;

              truthValue = ((temp001 != null) ? temp001 : Logic.UNKNOWN_TRUTH_VALUE);
            }
          }
          return (truthValue);
        }

      } finally {
        Logic.$GENERATE_ALL_PROOFSp$.set(old$GenerateAllProofsP$000);
        Logic.$INFERENCELEVEL$.set(old$Inferencelevel$000);
        Logic.$REVERSEPOLARITYp$.set(old$ReversepolarityP$000);
        Logic.$QUERYITERATOR$.set(old$Queryiterator$000);
      }
    }
  }