The algorithm used to apply abbreviations for Z-code has been replaced with a more efficient dynamic programming algorithm, based on the paper by R.A. Wagner “Common phrases and minimum-space text storage”, Communications of the ACM, 16 (3) (1973).
Inform has been refactored to use dynamic memory allocation rather than fixed size buffers. As a result, the following settings are now removed: if the available space is filled, Inform will allocate more memory without requiring user intervention.
MAX_ABBREVS (removed only for Glulx)
MAX_LOCAL_VARIABLES (now a constant)
As a result of this, the memory size command line arguments ($SMALL, $LARGE and $HUGE) are now redundant, and have been removed.
It is now possible to declare an individual property with the Property directive:
Property individual propname;
A new setting $ZCODE_LESS_DICT_DATA has been introduced. When set to a non-zero value, this tells the compiler to omit the last byte of Z-code dictionary entries (which can be referred as #dict_par3), as this is commonly unused.
There are now warnings if the compiler detects that the type used in certain expressions is not correct. This only checks expressions that contain defined symbols, and does not change the generated code. The checks are:
remove O: O is an object
move O to P: O is an object; P is an object or a class
give O A: O is an object; A is an attribute
O has/hasnt A: O is an object; A is an attribute
O in/notin P: O is an object; P is an object or a class
X ofclass C: C is a class
X provides P: P is a property
X.P, X.P(), X.&P, X.#P: P is a property
Assembly output (-a mode) now shows symbolic information for each assembly operand, if possible.
The -u switch now generates $MAX_ABBREVS possible abbreviations.
The Trace verbs directive now prints out the entire grammar table.
Using the -D switch when the game or library does not support debug_flag now produces an explanatory warning:
DEBUG mode is on, but this story or library does not appear to support it
Expressions of the form (x <= y or z) or (x >= y or z) now produce a warning message: while their effect is documented, well defined, and is not being changed, it is not necessarily what a user might expect.
The check for whether an abbreviation actually reduces the size of the Z-code output file has been made more accurate, and the message if an abbreviation does not reduce the size is now a warning, rather than an error.
For Glulx, stub functions (and the veneer function Symb__Tab()) are now always compiled as local-argument functions (with a type byte of 0xC1). Previously, they were in some cases compiled as stack-argument functions (with a type byte of 0xC0).
Counts of properties in errors and in the statistics report (output with the -s switch) are now consistent, and reflect how many properties the user can define.
The check that there are not too many common properties defined now correctly excludes individual and alias properties.
Inform will now report an error if the “class” line of a class definition mentions the class being defined.
A crash when compiling a malformed array declaration has been fixed.
Woot, this is fantastic news. Thanks, David, and thanks, Andrew, for the dynamic memory allocation, and @mulehollandaise for the abbreviation implementation.
I’ve been thinking about schemes for optimizing text storage space by identifying common substrings and had been failing to find the right search terms to turn up the prior art I felt sure must exist, so I appreciate the pointer to the paper! Guess I should’ve been following Highly optimized abbreviations computed efficiently.
I know that there was some discussion not so very long ago about the best options to use when compiling, but I can’t seem to find it now. The basic compilation command of
cc *.c -o inform
works fine, but weren’t some switches for optimization recommended?
If there were, these switches do not seem to be mentioned in either the current release notes or the readme.txt file included with source. Would it be possible to add the correct invocation to one or both documents?
Is that file supposed to be included in the source code download that’s at the IF Archive? At present, the included readme.txt file only says:
This is version 6.36 of the Inform compiler,
copyright (c) Graham Nelson 1993 - 2022
Full release notes and instructions are available at
and the release notes at that URL (which could probably be switched to https since it looks like that’s supported now) doesn’t mention the README.md file or its URL.