Property names give rise to abbreviations

While displaying the abbreviations with minimal code for PunyInform, I noticed that some of the abbreviations proposed were not in any of the source code strings, such as:

Abbreviate "_to/";
Abbreviate "when_";

minimal code:

System_file;
Property door_to;
Property when_closed;
Property when_off;
Property with_key;
Property door_dir;
Property orders;
Property capacity;
Property invent;
Property inside_description;
Property react_before;
Property react_after;
Property add_to_scope;
Property parse_name;
Property when_open;
Property when_on;
Property daemon;
Property article;
[ Main; ];

inform6 -u test.inf

Inform 6.43 (in development)
Beginning calculation of optimal abbreviations…

Chosen abbreviations (in Inform syntax):

Abbreviate ". ";
Abbreviate ", ";
Abbreviate “when_o”;
Abbreviate “rea”;

That seems to explain the "when_", but I have no idea about the strange "_to/".

1 Like

Inform compiles in a table of property and attribute names, which get used in runtime error messages. For example

[** object has no property sw_to **]

PunyInform does a lot of property aliasing, with lines like

Property door_dir           alias w_to;

This generates a table entry string like "w_to/door_dir". With a lot of those in the game, the abbreviation optimizer picks "to_/" as a common string.

If you compile with the option $OMIT_SYMBOL_TABLE=1, Inform will skip the symbol table, at the cost of less explicit runtime error messages.

3 Likes