Beispiel #1
0
  /**
   * Create a calendar date with the specified components. <code>year</code> must be the complete
   * year (i.e., a year of 98 is 98 A.D in the 1st century). <code>timezone</code> is a real number
   * in the range -12.0 to +14.0 where UTC is zone 0.0; The number is the number of hours to add to
   * UTC to arrive at local time.
   *
   * @param year
   * @param month
   * @param day
   * @param hour
   * @param minute
   * @param second
   * @param millis
   * @param timezone
   * @return CalendarDate
   */
  public static CalendarDate makeDateTime(
      int year, int month, int day, int hour, int minute, int second, int millis, double timezone) {
    {
      int time = (hour * Stella.MILLIS_PER_HOUR) + (minute * 60000) + (second * 1000) + millis;

      time = ((int) (time - (timezone * Stella.MILLIS_PER_HOUR)));
      return (CalendarDate.makeCalendarDate(
          Stella.julianDayToModifiedJulianDay(Stella.computeJulianDay(year, month, day)), time));
    }
  }
Beispiel #2
0
  /**
   * Create a calendar date with current time and date.
   *
   * @return CalendarDate
   */
  public static CalendarDate makeCurrentDateTime() {
    {
      int year = Stella.NULL_INTEGER;
      int month = Stella.NULL_INTEGER;
      int day = Stella.NULL_INTEGER;
      Keyword dow = null;
      int hour = Stella.NULL_INTEGER;
      int minute = Stella.NULL_INTEGER;
      int second = Stella.NULL_INTEGER;
      int millisecond = Stella.NULL_INTEGER;

      {
        Object[] caller_MV_returnarray = new Object[7];

        year = Stella.getCurrentDateTime(caller_MV_returnarray);
        month = ((int) (((IntegerWrapper) (caller_MV_returnarray[0])).wrapperValue));
        day = ((int) (((IntegerWrapper) (caller_MV_returnarray[1])).wrapperValue));
        dow = ((Keyword) (caller_MV_returnarray[2]));
        hour = ((int) (((IntegerWrapper) (caller_MV_returnarray[3])).wrapperValue));
        minute = ((int) (((IntegerWrapper) (caller_MV_returnarray[4])).wrapperValue));
        second = ((int) (((IntegerWrapper) (caller_MV_returnarray[5])).wrapperValue));
        millisecond = ((int) (((IntegerWrapper) (caller_MV_returnarray[6])).wrapperValue));
      }
      dow = dow;
      return (CalendarDate.makeDateTime(year, month, day, hour, minute, second, millisecond, 0.0));
    }
  }
Beispiel #3
0
  /**
   * Returns the time part of the string representation of <code>date</code> adjusted for <code>
   * timezone</code>. The timezone is included in the string if <code>includeTimezoneP</code> is
   * <code>true</code>. The value <code>true</code> is recommended. Milliseconds will be included if
   * <code>includeMillisP</code> is <code>true</code>. Hours will be zero-padded to length 2 if
   * <code>padHoursP</code> is <code>true</code>.
   *
   * @param timezone
   * @param includeTimezoneP
   * @param includeMillisP
   * @param padHoursP
   * @return String
   */
  public String calendarDateToTimeString(
      double timezone, boolean includeTimezoneP, boolean includeMillisP, boolean padHoursP) {
    {
      CalendarDate date = this;

      {
        int hours = Stella.NULL_INTEGER;
        int minutes = Stella.NULL_INTEGER;
        int seconds = Stella.NULL_INTEGER;
        int milli = Stella.NULL_INTEGER;

        {
          Object[] caller_MV_returnarray = new Object[3];

          hours = date.getTime(timezone, caller_MV_returnarray);
          minutes = ((int) (((IntegerWrapper) (caller_MV_returnarray[0])).wrapperValue));
          seconds = ((int) (((IntegerWrapper) (caller_MV_returnarray[1])).wrapperValue));
          milli = ((int) (((IntegerWrapper) (caller_MV_returnarray[2])).wrapperValue));
        }
        {
          String timezoneString =
              (includeTimezoneP
                  ? (((timezone == 0.0) ? " UTC" : (" " + Native.floatToString(timezone))))
                  : "");
          String milliString =
              (includeMillisP
                  ? ("."
                      + Stella.formatWithPadding(
                          Native.integerToString(milli), 3, '0', Stella.KWD_RIGHT, false))
                  : "");

          return (((padHoursP
                  ? Stella.formatWithPadding(
                      Native.integerToString(hours), 2, '0', Stella.KWD_RIGHT, false)
                  : Native.integerToString(hours)))
              + ":"
              + Stella.formatWithPadding(
                  Native.integerToString(minutes), 2, '0', Stella.KWD_RIGHT, false)
              + ":"
              + Stella.formatWithPadding(
                  Native.integerToString(seconds), 2, '0', Stella.KWD_RIGHT, false)
              + milliString
              + timezoneString);
        }
      }
    }
  }
Beispiel #4
0
  /**
   * Returns multiple values of year, month, day and day of week for <code>date</code> in <code>
   * timezone</code>. <code>timezone</code> is the number of hours added to UTC to get local time.
   * It is in the range -12.0 to +14.0 where UTC is zone 0.0
   *
   * @param timezone
   * @param MV_returnarray
   * @return int
   */
  public int getCalendarDate(double timezone, Object[] MV_returnarray) {
    {
      CalendarDate date = this;

      if (timezone == Stella.NULL_FLOAT) {
        Stella.STANDARD_WARNING.nativeStream.println(
            "Warning: Timezone not specified in GET-CALENDAR-DATE  Using local zone.");
        {
          int year = Stella.NULL_INTEGER;
          int month = Stella.NULL_INTEGER;
          int day = Stella.NULL_INTEGER;
          Keyword dow = null;

          {
            Object[] caller_MV_returnarray = new Object[3];

            year =
                Stella.computeCalendarDate(
                    Stella.modifiedJulianDayToJulianDay(date.modifiedJulianDay),
                    caller_MV_returnarray);
            month = ((int) (((IntegerWrapper) (caller_MV_returnarray[0])).wrapperValue));
            day = ((int) (((IntegerWrapper) (caller_MV_returnarray[1])).wrapperValue));
            dow = ((Keyword) (caller_MV_returnarray[2]));
          }
          dow = dow;
          timezone = Stella.getLocalTimeZoneForDate(year, month, day, 12, 0, 0);
        }
      }
      {
        int time = date.timeMillis;
        int timezoneAdjustedTime = ((int) (time + (timezone * Stella.MILLIS_PER_HOUR)));
        int dayOffset = 0;

        if (timezoneAdjustedTime < 0) {
          dayOffset = -1;
        } else if (timezoneAdjustedTime > Stella.MILLIS_PER_DAY) {
          dayOffset = 1;
        } else {
        }
        return (Stella.computeCalendarDate(
            Stella.modifiedJulianDayToJulianDay(date.modifiedJulianDay + dayOffset),
            MV_returnarray));
      }
    }
  }
Beispiel #5
0
  /**
   * Returns the date part of the string representation of <code>date</code> adjusted for <code>
   * timezone</code>. Format is YYYY-MMM-DD, where MMM is a three letter English abbreviation of the
   * month if <code>numericMonthP</code> is <code>false</code> and a two digit numeric value if
   * <code>numericMonthP</code> is <code>true</code>. The value <code>false</code> is recommended.
   *
   * @param timezone
   * @param numericMonthP
   * @return String
   */
  public String calendarDateToDateString(double timezone, boolean numericMonthP) {
    {
      CalendarDate date = this;

      {
        int year = Stella.NULL_INTEGER;
        int month = Stella.NULL_INTEGER;
        int day = Stella.NULL_INTEGER;
        Keyword dow = null;

        {
          Object[] caller_MV_returnarray = new Object[3];

          year = date.getCalendarDate(timezone, caller_MV_returnarray);
          month = ((int) (((IntegerWrapper) (caller_MV_returnarray[0])).wrapperValue));
          day = ((int) (((IntegerWrapper) (caller_MV_returnarray[1])).wrapperValue));
          dow = ((Keyword) (caller_MV_returnarray[2]));
        }
        dow = dow;
        {
          String yearString =
              ((year < 0)
                  ? (Native.integerToString(0 - year) + "BC")
                  : Native.integerToString(year));
          String monthString =
              (numericMonthP
                  ? Stella.formatWithPadding(
                      Native.integerToString(month), 2, '0', Stella.KWD_RIGHT, false)
                  : StringWrapper.unwrapString(
                      ((StringWrapper) ((Stella.$MONTH_ABBREVIATION_VECTOR$.theArray)[month]))));

          return (yearString
              + "-"
              + monthString
              + "-"
              + Stella.formatWithPadding(
                  Native.integerToString(day), 2, '0', Stella.KWD_RIGHT, false));
        }
      }
    }
  }
  public static Stella_Object stellaStringHashTableLookup(StellaHashTable self, String key) {
    {
      KvCons[] table = self.theTable;
      KvCons bucket = null;

      if (table == null) {
        return (null);
      }
      bucket = table[(((key.hashCode()) & 0x7FFFFFFF) % (self.size))];
      while (bucket != null) {
        if (Stella.stringEqlP(((StringWrapper) (bucket.key)).wrapperValue, key)) {
          return (bucket.value);
        } else {
          bucket = bucket.rest;
        }
      }
      return (null);
    }
  }
Beispiel #7
0
  /**
   * Returns an ISO-8601 string representation of <code>date</code> adjusted for <code>timezone
   * </code>. The Format is YYYY-MM-DDThh:mm:ss z:zz. The timezone as an offset hh:mm is included if
   * <code>includeTimezoneP</code> is <code>true</code>.
   *
   * <p>Recommended values for the flag is <code>true</code>.
   *
   * @param timezone
   * @param includeTimezoneP
   * @return String
   */
  public String calendarDateToIso8601String(double timezone, boolean includeTimezoneP) {
    {
      CalendarDate date = this;

      {
        String tzString = "";

        if (includeTimezoneP) {
          if (timezone == 0.0) {
            tzString = "Z";
          } else {
            tzString = Stella.timeZoneFormat60(timezone);
          }
        }
        return (date.calendarDateToDateString(timezone, true)
            + "T"
            + date.calendarDateToTimeString(timezone, false, false, true)
            + tzString);
      }
    }
  }
  public static void initializeStellaHashTable(StellaHashTable self) {
    {
      int size =
          Stella.pickHashTableSizePrime(
              Native.floor(self.initialSize / Stella.$STELLA_HASH_TABLE_AVG_BUCKET_LENGTH$));
      KvCons[] table = new KvCons[size];

      {
        int i = Stella.NULL_INTEGER;
        int iter000 = 0;
        int upperBound000 = size - 1;

        for (; iter000 <= upperBound000; iter000 = iter000 + 1) {
          i = iter000;
          table[i] = null;
        }
      }
      self.theTable = table;
      self.size = size;
      self.freeElements = Native.floor(size * Stella.$STELLA_HASH_TABLE_AVG_BUCKET_LENGTH$);
    }
  }
Beispiel #9
0
  /**
   * Returns multiple values of hours, minutes, seconds, milliseconds for the calendar date <code>
   * date</code> in <code>timezone</code>. <code>timezone</code> is the number of hours added to UTC
   * to get local time. It is in the range -12.0 to +14.0 where UTC is zone 0.0
   *
   * @param timezone
   * @param MV_returnarray
   * @return int
   */
  public int getTime(double timezone, Object[] MV_returnarray) {
    {
      CalendarDate date = this;

      if (timezone == Stella.NULL_FLOAT) {
        Stella.STANDARD_WARNING.nativeStream.println(
            "Warning: Timezone not specified in GET-TIME.  Using local zone.");
        {
          int year = Stella.NULL_INTEGER;
          int month = Stella.NULL_INTEGER;
          int day = Stella.NULL_INTEGER;
          Keyword dow = null;

          {
            Object[] caller_MV_returnarray = new Object[3];

            year =
                Stella.computeCalendarDate(
                    Stella.modifiedJulianDayToJulianDay(date.modifiedJulianDay),
                    caller_MV_returnarray);
            month = ((int) (((IntegerWrapper) (caller_MV_returnarray[0])).wrapperValue));
            day = ((int) (((IntegerWrapper) (caller_MV_returnarray[1])).wrapperValue));
            dow = ((Keyword) (caller_MV_returnarray[2]));
          }
          dow = dow;
          timezone = Stella.getLocalTimeZoneForDate(year, month, day, 12, 0, 0);
        }
      }
      if (timezone == 0.0) {
        return (Stella.decodeTimeInMillis(date.timeMillis, MV_returnarray));
      } else if (timezone < 0.0) {
        return (Stella.decodeTimeInMillis(
            ((((int)
                    (date.timeMillis
                        + Stella.MILLIS_PER_DAY
                        + (timezone * Stella.MILLIS_PER_HOUR))))
                % Stella.MILLIS_PER_DAY),
            MV_returnarray));
      } else {
        return (Stella.decodeTimeInMillis(
            ((((int) (date.timeMillis + (timezone * Stella.MILLIS_PER_HOUR))))
                % Stella.MILLIS_PER_DAY),
            MV_returnarray));
      }
    }
  }
  public static void rehashStellaHashTable(StellaHashTable self, int newsize) {
    if (self.theTable == null) {
      StellaHashTable.initializeStellaHashTable(self);
      return;
    }
    {
      int size = self.size;
      KvCons[] table = self.theTable;
      KvCons[] newtable = new KvCons[newsize];
      int newbucketindex = 0;
      KvCons newbucket = null;
      KvCons cursor = null;
      KvCons current = null;
      boolean equaltestP = self.equalTestP;

      {
        int i = Stella.NULL_INTEGER;
        int iter000 = 0;
        int upperBound000 = newsize - 1;

        for (; iter000 <= upperBound000; iter000 = iter000 + 1) {
          i = iter000;
          newtable[i] = null;
        }
      }
      {
        int i = Stella.NULL_INTEGER;
        int iter001 = 0;
        int upperBound001 = size - 1;

        for (; iter001 <= upperBound001; iter001 = iter001 + 1) {
          i = iter001;
          cursor = table[i];
          while (cursor != null) {
            if (equaltestP) {
              newbucketindex = (((cursor.key.equalHashCode()) & 0x7FFFFFFF) % newsize);
            } else {
              newbucketindex = (((cursor.key.hashCode_()) & 0x7FFFFFFF) % newsize);
            }
            newbucket = newtable[newbucketindex];
            current = cursor;
            cursor = cursor.rest;
            if (newbucket != null) {
              current.rest = newbucket.rest;
              newbucket.rest = current;
            } else {
              newtable[newbucketindex] = current;
              current.rest = null;
            }
          }
        }
      }
      self.theTable = newtable;
      self.size = newsize;
      self.freeElements =
          Stella.max(
              self.freeElements
                  + Native.floor((newsize - size) * Stella.$STELLA_HASH_TABLE_AVG_BUCKET_LENGTH$),
              0);
    }
  }
  public static void stellaHashTableInsertAt(
      StellaHashTable self, Stella_Object key, Stella_Object value) {
    {
      KvCons[] table = self.theTable;
      int free = self.freeElements;
      int bucketindex = 0;
      KvCons bucket = null;
      boolean equaltestP = self.equalTestP;

      if (table == null) {
        StellaHashTable.initializeStellaHashTable(self);
        table = self.theTable;
        free = self.freeElements;
      }
      if (free == 0) {
        StellaHashTable.rehashStellaHashTable(self, Stella.pickHashTableSizePrime(self.size + 1));
        table = self.theTable;
        free = self.freeElements;
      }
      if (equaltestP) {
        bucketindex = (((key.equalHashCode()) & 0x7FFFFFFF) % (self.size));
      } else {
        bucketindex = (((key.hashCode_()) & 0x7FFFFFFF) % (self.size));
      }
      bucket = table[bucketindex];
      if (bucket == null) {
        {
          KvCons self000 = KvCons.newKvCons();

          self000.key = key;
          self000.value = value;
          table[bucketindex] = self000;
        }
        self.freeElements = free - 1;
      } else {
        {
          KvCons cursor = bucket;

          if (equaltestP) {
            while ((cursor != null) && (!Stella_Object.equalP(cursor.key, key))) {
              cursor = cursor.rest;
            }
          } else {
            while ((cursor != null) && (!Stella_Object.eqlP(cursor.key, key))) {
              cursor = cursor.rest;
            }
          }
          if (cursor != null) {
            cursor.value = value;
          } else {
            {
              KvCons self001 = KvCons.newKvCons();

              self001.key = key;
              self001.value = value;
              self001.rest = bucket.rest;
              bucket.rest = self001;
            }
            self.freeElements = free - 1;
          }
        }
      }
    }
  }
  public static void startupCppTranslateFile() {
    {
      Object old$Module$000 = Stella.$MODULE$.get();
      Object old$Context$000 = Stella.$CONTEXT$.get();

      try {
        Native.setSpecial(Stella.$MODULE$, Stella.$STELLA_MODULE$);
        Native.setSpecial(Stella.$CONTEXT$, ((Module) (Stella.$MODULE$.get())));
        if (Stella.currentStartupTimePhaseP(2)) {
          Stella.SYM_STELLA_AUXILIARY_VARIABLE =
              ((Symbol) (Stella.internRigidSymbolWrtModule("AUXILIARY-VARIABLE", null, 0)));
          Stella.SYM_STELLA_CPP_FUNCTION =
              ((Symbol) (Stella.internRigidSymbolWrtModule("CPP_FUNCTION", null, 0)));
          Stella.SYM_STELLA_CPP_DEFPRINT =
              ((Symbol) (Stella.internRigidSymbolWrtModule("CPP_DEFPRINT", null, 0)));
          Stella.KWD_UPPERCASE =
              ((Keyword) (Stella.internRigidSymbolWrtModule("UPPERCASE", null, 2)));
          Stella.SYM_STELLA_STARTUP_CPP_TRANSLATE_FILE =
              ((Symbol) (Stella.internRigidSymbolWrtModule("STARTUP-CPP-TRANSLATE-FILE", null, 0)));
        }
        if (Stella.currentStartupTimePhaseP(4)) {
          Stella.$CURRENT_STREAM$.setDefaultValue(Stella.STANDARD_OUTPUT);
        }
        if (Stella.currentStartupTimePhaseP(6)) {
          Stella.finalizeClasses();
        }
        if (Stella.currentStartupTimePhaseP(7)) {
          Stella.defineFunctionObject(
              "CPPTRANS",
              "(DEFUN CPPTRANS ((STATEMENT OBJECT)) :COMMAND? TRUE :PUBLIC? TRUE :EVALUATE-ARGUMENTS? FALSE :DOCUMENTATION \"Translate `statement' to C++ and print the result.\")",
              Native.find_java_method(
                  "edu.isi.stella.Stella_Object",
                  "cpptrans",
                  new java.lang.Class[] {Native.find_java_class("edu.isi.stella.Stella_Object")}),
              null);
          Stella.defineFunctionObject(
              "CPP-MAKE-CODE-OUTPUT-FILE-NAME",
              "(DEFUN (CPP-MAKE-CODE-OUTPUT-FILE-NAME FILE-NAME) ((FILENAME FILE-NAME)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppMakeCodeOutputFileName",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-MAKE-HEADER-OUTPUT-FILE-NAME",
              "(DEFUN (CPP-MAKE-HEADER-OUTPUT-FILE-NAME FILE-NAME) ((FILENAME FILE-NAME)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppMakeHeaderOutputFileName",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-FILE-HEADER",
              "(DEFUN CPP-OUTPUT-FILE-HEADER ((STREAM OUTPUT-STREAM) (FILE FILE-NAME)))",
              Native.find_java_method(
                  "edu.isi.stella.OutputStream",
                  "cppOutputFileHeader",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.stella.OutputStream"),
                    Native.find_java_class("java.lang.String")
                  }),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-INCLUDE-DIRECTIVE",
              "(DEFUN CPP-OUTPUT-INCLUDE-DIRECTIVE ((FILENAME FILE-NAME) (STRIPDIRECTORY? BOOLEAN)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppOutputIncludeDirective",
                  new java.lang.Class[] {
                    Native.find_java_class("java.lang.String"), java.lang.Boolean.TYPE
                  }),
              null);
          Stella.defineFunctionObject(
              "CPP-STANDALONE-OUTPUT-IMPORT-DECLARATIONS",
              "(DEFUN CPP-STANDALONE-OUTPUT-IMPORT-DECLARATIONS ((HEADERFILENAME FILE-NAME)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppStandaloneOutputImportDeclarations",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-RELATIVIZE-HEADER-FILE",
              "(DEFUN (CPP-RELATIVIZE-HEADER-FILE FILE-NAME) ((HEADERFILE FILE-NAME) (SYSTEMNAME STRING)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppRelativizeHeaderFile",
                  new java.lang.Class[] {
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("java.lang.String")
                  }),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-IMPORT-DECLARATIONS",
              "(DEFUN CPP-OUTPUT-IMPORT-DECLARATIONS ((SYSTEMNAME STRING)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppOutputImportDeclarations",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-CLASS-HEAD-DECLARATIONS",
              "(DEFUN CPP-OUTPUT-CLASS-HEAD-DECLARATIONS ((CLASSES CONS)))",
              Native.find_java_method(
                  "edu.isi.stella.Cons",
                  "cppOutputClassHeadDeclarations",
                  new java.lang.Class[] {Native.find_java_class("edu.isi.stella.Cons")}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-NAMESPACE-HEADER",
              "(DEFUN CPP-OUTPUT-NAMESPACE-HEADER ((MODULE MODULE)))",
              Native.find_java_method(
                  "edu.isi.stella.Module",
                  "cppOutputNamespaceHeader",
                  new java.lang.Class[] {Native.find_java_class("edu.isi.stella.Module")}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-NAMESPACE-FOOTER",
              "(DEFUN CPP-OUTPUT-NAMESPACE-FOOTER ((MODULE MODULE)))",
              Native.find_java_method(
                  "edu.isi.stella.Module",
                  "cppOutputNamespaceFooter",
                  new java.lang.Class[] {Native.find_java_class("edu.isi.stella.Module")}),
              null);
          Stella.defineFunctionObject(
              "CPP-UNIT-DEFINES-MAIN?",
              "(DEFUN (CPP-UNIT-DEFINES-MAIN? BOOLEAN) ((UNIT TRANSLATION-UNIT)))",
              Native.find_java_method(
                  "edu.isi.stella.TranslationUnit",
                  "cppUnitDefinesMainP",
                  new java.lang.Class[] {Native.find_java_class("edu.isi.stella.TranslationUnit")}),
              null);
          Stella.defineFunctionObject(
              "CPP-YIELD-MAIN-FILE-NAME",
              "(DEFUN (CPP-YIELD-MAIN-FILE-NAME FILE-NAME) ())",
              Native.find_java_method(
                  "edu.isi.stella.Stella", "cppYieldMainFileName", new java.lang.Class[] {}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-MAIN",
              "(DEFUN CPP-OUTPUT-MAIN ((UNIT TRANSLATION-UNIT)))",
              Native.find_java_method(
                  "edu.isi.stella.TranslationUnit",
                  "cppOutputMain",
                  new java.lang.Class[] {Native.find_java_class("edu.isi.stella.TranslationUnit")}),
              null);
          Stella.defineFunctionObject(
              "CPP-SORT-UNITS-FOR-HEADER-FILE",
              "(DEFUN (CPP-SORT-UNITS-FOR-HEADER-FILE (LIST OF (CONS OF TRANSLATION-UNIT))) ((FILEUNITS (LIST OF TRANSLATION-UNIT))))",
              Native.find_java_method(
                  "edu.isi.stella.List",
                  "cppSortUnitsForHeaderFile",
                  new java.lang.Class[] {Native.find_java_class("edu.isi.stella.List")}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-NAMESPACE-CHANGE",
              "(DEFUN CPP-OUTPUT-NAMESPACE-CHANGE ((FROMNAMESPACE MODULE) (TONAMESPACE MODULE)))",
              Native.find_java_method(
                  "edu.isi.stella.Module",
                  "cppOutputNamespaceChange",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.stella.Module"),
                    Native.find_java_class("edu.isi.stella.Module")
                  }),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-ALL-UNITS-TO-FILE",
              "(DEFUN CPP-OUTPUT-ALL-UNITS-TO-FILE ((FILENAME FILE-NAME)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppOutputAllUnitsToFile",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-TRANSLATE-FILE",
              "(DEFUN CPP-TRANSLATE-FILE ((FILENAME FILE-NAME)) :PUBLIC? TRUE)",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppTranslateFile",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-STANDALONE-TRANSLATE-FILE",
              "(DEFUN CPP-STANDALONE-TRANSLATE-FILE ((FILENAME FILE-NAME)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppStandaloneTranslateFile",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-TRANSLATE-SYSTEM",
              "(DEFUN CPP-TRANSLATE-SYSTEM ((SYSTEMNAME STRING)) :DOCUMENTATION \"Translate the system `systemName' to C++.\" :PUBLIC? TRUE)",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppTranslateSystem",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-TRANSLATE-WALKED-SYSTEM-UNITS",
              "(DEFUN CPP-TRANSLATE-WALKED-SYSTEM-UNITS ((SYSTEMUNITS SYSTEM-UNITS-ALIST)))",
              Native.find_java_method(
                  "edu.isi.stella.KeyValueList",
                  "cppTranslateWalkedSystemUnits",
                  new java.lang.Class[] {Native.find_java_class("edu.isi.stella.KeyValueList")}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-SYSTEM-SPECIFIC-FILES",
              "(DEFUN CPP-OUTPUT-SYSTEM-SPECIFIC-FILES ())",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppOutputSystemSpecificFiles",
                  new java.lang.Class[] {}),
              null);
          Stella.defineFunctionObject(
              "CPP-YIELD-SYSTEM-HEADER-FILE-NAME",
              "(DEFUN (CPP-YIELD-SYSTEM-HEADER-FILE-NAME STRING) ((SYSTEMNAME STRING)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppYieldSystemHeaderFileName",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-YIELD-SYSTEM-HEADER-FILE-GUARD",
              "(DEFUN (CPP-YIELD-SYSTEM-HEADER-FILE-GUARD STRING) ((SYSTEMNAME STRING)))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppYieldSystemHeaderFileGuard",
                  new java.lang.Class[] {Native.find_java_class("java.lang.String")}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-SYSTEM-HEADER-FILE",
              "(DEFUN CPP-OUTPUT-SYSTEM-HEADER-FILE ())",
              Native.find_java_method(
                  "edu.isi.stella.Stella", "cppOutputSystemHeaderFile", new java.lang.Class[] {}),
              null);
          Stella.defineFunctionObject(
              "CPP-YIELD-SYSTEMS-ROOT-DIRECTORY",
              "(DEFUN (CPP-YIELD-SYSTEMS-ROOT-DIRECTORY STRING) ())",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "cppYieldSystemsRootDirectory",
                  new java.lang.Class[] {}),
              null);
          Stella.defineFunctionObject(
              "CPP-YIELD-STELLA-ROOT-DIRECTORY",
              "(DEFUN (CPP-YIELD-STELLA-ROOT-DIRECTORY STRING) ())",
              Native.find_java_method(
                  "edu.isi.stella.Stella", "cppYieldStellaRootDirectory", new java.lang.Class[] {}),
              null);
          Stella.defineFunctionObject(
              "CPP-OUTPUT-SYSTEM-MAKEFILE",
              "(DEFUN CPP-OUTPUT-SYSTEM-MAKEFILE ())",
              Native.find_java_method(
                  "edu.isi.stella.Stella", "cppOutputSystemMakefile", new java.lang.Class[] {}),
              null);
          Stella.defineFunctionObject(
              "SUBSTITUTE-TEMPLATE-VARIABLES-IN-STRING",
              "(DEFUN (SUBSTITUTE-TEMPLATE-VARIABLES-IN-STRING STRING) ((STRING STRING) (VARIABLES (KEY-VALUE-LIST OF STRING-WRAPPER STRING-WRAPPER))))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "substituteTemplateVariablesInString",
                  new java.lang.Class[] {
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("edu.isi.stella.KeyValueList")
                  }),
              null);
          Stella.defineFunctionObject(
              "SUBSTITUTE-TEMPLATE-VARIABLES-TO-STREAM",
              "(DEFUN SUBSTITUTE-TEMPLATE-VARIABLES-TO-STREAM ((TEMPLATESTREAM INPUT-STREAM) (OUTPUTSTREAM OUTPUT-STREAM) (VARIABLES (KEY-VALUE-LIST OF STRING-WRAPPER STRING-WRAPPER))))",
              Native.find_java_method(
                  "edu.isi.stella.InputStream",
                  "substituteTemplateVariablesToStream",
                  new java.lang.Class[] {
                    Native.find_java_class("edu.isi.stella.InputStream"),
                    Native.find_java_class("edu.isi.stella.OutputStream"),
                    Native.find_java_class("edu.isi.stella.KeyValueList")
                  }),
              null);
          Stella.defineFunctionObject(
              "SUBSTITUTE-TEMPLATE-VARIABLES-TO-MAKEFILE",
              "(DEFUN SUBSTITUTE-TEMPLATE-VARIABLES-TO-MAKEFILE ((TEMPLATEFILE STRING) (OUTPUTFILE STRING) (VARIABLES (KEY-VALUE-LIST OF STRING-WRAPPER STRING-WRAPPER))))",
              Native.find_java_method(
                  "edu.isi.stella.Stella",
                  "substituteTemplateVariablesToMakefile",
                  new java.lang.Class[] {
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("java.lang.String"),
                    Native.find_java_class("edu.isi.stella.KeyValueList")
                  }),
              null);
          Stella.defineFunctionObject(
              "STARTUP-CPP-TRANSLATE-FILE",
              "(DEFUN STARTUP-CPP-TRANSLATE-FILE () :PUBLIC? TRUE)",
              Native.find_java_method(
                  "edu.isi.stella._StartupCppTranslateFile",
                  "startupCppTranslateFile",
                  new java.lang.Class[] {}),
              null);
          {
            MethodSlot function =
                Symbol.lookupFunction(Stella.SYM_STELLA_STARTUP_CPP_TRANSLATE_FILE);

            KeyValueList.setDynamicSlotValue(
                function.dynamicSlots,
                Stella.SYM_STELLA_METHOD_STARTUP_CLASSNAME,
                StringWrapper.wrapString("_StartupCppTranslateFile"),
                Stella.NULL_STRING_WRAPPER);
          }
        }
        if (Stella.currentStartupTimePhaseP(8)) {
          Stella.finalizeSlots();
          Stella.cleanupUnfinalizedClasses();
        }
        if (Stella.currentStartupTimePhaseP(9)) {
          Stella.defineStellaGlobalVariableFromStringifiedSource(
              "(DEFSPECIAL *CURRENT-STREAM* OUTPUT-STREAM STANDARD-OUTPUT)");
          Stella.defineStellaGlobalVariableFromStringifiedSource(
              "(DEFGLOBAL *CPP-TRANSLATED-FILE-SUFFIX* STRING \"\")");
          Stella.defineStellaGlobalVariableFromStringifiedSource(
              "(DEFGLOBAL *MAKEFILE-TEMPLATE-VARIABLE-PREFIX* STRING \"#$\")");
        }

      } finally {
        Stella.$CONTEXT$.set(old$Context$000);
        Stella.$MODULE$.set(old$Module$000);
      }
    }
  }