public static void helpCollectFlattenedArguments(Proposition self, List flattenedarguments, List existsvariables) {
    { Stella_Object term = null;
      Vector vector000 = self.arguments;
      int index000 = 0;
      int length000 = vector000.length();

      for (;index000 < length000; index000 = index000 + 1) {
        term = (vector000.theArray)[index000];
        if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(term), Logic.SGT_LOGIC_PATTERN_VARIABLE)) {
          { PatternVariable term000 = ((PatternVariable)(term));

            { Proposition functionarg = term000.definingProposition;

              if ((functionarg != null) &&
                  (!existsvariables.memberP(term000))) {
                existsvariables.push(term000);
                Proposition.helpCollectFlattenedArguments(functionarg, flattenedarguments, existsvariables);
                if (functionarg.operator == Logic.SGT_STELLA_PROPOSITIONdIF) {
                  flattenedarguments.push(Proposition.expandIfProposition(functionarg));
                }
                else {
                  flattenedarguments.push(functionarg);
                }
              }
            }
          }
        }
        else {
        }
      }
    }
  }