public static Cons collectDefinedModulesFromSystemFile(SystemDefinition system) {
    { Cons startupforms = SystemDefinition.collectStartupFormsFromSystemFile(system);
      Module module = null;
      Cons modules = Stella.NIL;

      { Cons form = null;
        Cons iter000 = startupforms;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          form = ((Cons)(iter000.value));
          if (form.rest.value == Stella.KWD_MODULES) {
            { Stella_Object def = null;
              Cons iter001 = form.rest.rest;

              for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
                def = iter001.value;
                if (Stella_Object.consP(def) &&
                    (((Cons)(def)).value == Stella.SYM_STELLA_DEFINE_MODULE_FROM_STRINGIFIED_SOURCE)) {
                  module = Stella.getStellaModule(((StringWrapper)(((Cons)(def)).rest.value)).wrapperValue, false);
                  if (module != null) {
                    modules = Cons.cons(module, modules);
                  }
                }
              }
            }
          }
        }
      }
      return (modules.reverse());
    }
  }