public static boolean containsOutputVariableP(Cons clause, Cons outputVariables) {
    { Stella_Object term = null;
      Cons iter000 = clause;

      for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
        term = iter000.value;
        { Surrogate testValue000 = Stella_Object.safePrimaryType(term);

          if (Surrogate.subtypeOfSymbolP(testValue000)) {
            { Symbol term000 = ((Symbol)(term));

              if (outputVariables.memberP(term000)) {
                return (true);
              }
            }
          }
          else if (testValue000 == Logic.SGT_STELLA_CONS) {
            { Cons term000 = ((Cons)(term));

              if (Logic.containsOutputVariableP(term000, outputVariables)) {
                return (true);
              }
            }
          }
          else {
          }
        }
      }
    }
    return (false);
  }