public static boolean helpMemoizeTestPropertyP(Stella_Object self, Surrogate relation) {
    { Object old$ReversepolarityP$000 = Logic.$REVERSEPOLARITYp$.get();
      Object old$Context$000 = Stella.$CONTEXT$.get();

      try {
        Native.setBooleanSpecial(Logic.$REVERSEPOLARITYp$, false);
        Native.setSpecial(Stella.$CONTEXT$, Logic.getPropertyTestContext());
        if (Stella_Object.isaP(self, Logic.SGT_LOGIC_LOGIC_OBJECT) &&
            (((LogicObject)(self)).variableValueInverse() == Stella.NIL)) {
          { boolean foundP000 = false;

            { Proposition p = null;
              Iterator iter000 = Logic.unfilteredDependentPropositions(self, relation).allocateIterator();

              loop000 : while (iter000.nextP()) {
                p = ((Proposition)(iter000.value));
                if ((((Surrogate)(p.operator)) == relation) &&
                    ((!p.deletedP()) &&
                     ((((Boolean)(Logic.$REVERSEPOLARITYp$.get())).booleanValue() ? Proposition.falseP(p) : (Proposition.trueP(p) ||
                    Proposition.functionWithDefinedValueP(p)))))) {
                  foundP000 = true;
                  break loop000;
                }
              }
            }
            { boolean value000 = foundP000;

              return (value000);
            }
          }
        }
        else {
          return (Logic.allTrueDependentPropositions(self, relation, false).nextP());
        }

      } finally {
        Stella.$CONTEXT$.set(old$Context$000);
        Logic.$REVERSEPOLARITYp$.set(old$ReversepolarityP$000);
      }
    }
  }