From 5c790b9f23f74529f3f5366f4b99a835e1d383d0 Mon Sep 17 00:00:00 2001
From: Zed Lopez
Date: Tue, 18 Apr 2023 09:14:30 -0700
Subject: [PATCH 001/113] initial commit
---
.../WorldModelKit/Sections/ListWriter.i6t | 43 +++++++----
.../standard_rules/Sections/Actions.w | 14 ++--
.../standard_rules/Sections/Activities.w | 77 +++++++++++++++++++
.../Sections/Physical World Model.w | 10 +++
4 files changed, 124 insertions(+), 20 deletions(-)
diff --git a/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t b/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
index 2a041c3ef..cc9f31076 100644
--- a/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
+++ b/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
@@ -341,6 +341,24 @@ account.
rfalse;
];
+@h Having Evident Content
+This is true when something has at least one unconcealed thing in it.
+It's false when something is truly empty or when all the things in
+it are concealed, and is used to ensure that output is consistent
+in both those cases.
+
+=
+[ HasEvidentContent o x;
+if (~~((o ofclass K5_container) || (o ofclass K6_supporter))) rfalse;
+if (o has container && (o hasnt open) && (o hasnt transparent)) rfalse; ! opaque closed container's status never be obvious
+x = child(o);
+while (x) {
+if (~~ConcealedFromLists(x)) rtrue;
+x = sibling(x);
+}
+rfalse;
+];
+
@h Coalesce Marked List.
The return value is the new first entry in the raw list.
@@ -582,21 +600,16 @@ by Inform. But this seems to be sound.
=
[ ListEqual o1 o2;
- if ((o1.plural == 0) || (o2.plural == 0)) rfalse;
- if (child(o1) ~= 0 && WillRecurs(o1) ~= 0) rfalse;
- if (child(o2) ~= 0 && WillRecurs(o2) ~= 0) rfalse;
- if (c_style & (FULLINV_BIT + PARTINV_BIT) ~= 0) {
- if ((o1 hasnt worn && o2 has worn) || (o2 hasnt worn && o1 has worn)) rfalse;
- if ((o1 hasnt light && o2 has light) || (o2 hasnt light && o1 has light)) rfalse;
- if (o1 has container) {
- if (o2 hasnt container) rfalse;
- if ((o1 has open && o2 hasnt open) || (o2 has open && o1 hasnt open))
- rfalse;
- }
- else if (o2 has container)
- rfalse;
- }
- return Identical(o1, o2);
+ if (o1.KD_Count ~= o2.KD_Count) rfalse;
+ if ((o1.plural == 0) || (o2.plural == 0)) rfalse;
+ if (HasEvidentContent(o1) && WillRecurs(o1)) rfalse;
+ if (HasEvidentContent(o2) && WillRecurs(o2)) rfalse;
+ if (c_style & (FULLINV_BIT + PARTINV_BIT) ~= 0) {
+ if ((o1 hasnt worn && o2 has worn) || (o2 hasnt worn && o1 has worn)) rfalse;
+ if ((o1 hasnt light && o2 has light) || (o2 hasnt light && o1 has light)) rfalse;
+ if ((o1 has open && o2 hasnt open) || (o2 has open && o1 hasnt open)) rfalse;
+ }
+ return Identical(o1, o2);
];
[ WillRecurs o;
diff --git a/inform7/extensions/standard_rules/Sections/Actions.w b/inform7/extensions/standard_rules/Sections/Actions.w
index 9b1b81e8e..6f68f53cb 100644
--- a/inform7/extensions/standard_rules/Sections/Actions.w
+++ b/inform7/extensions/standard_rules/Sections/Actions.w
@@ -65,8 +65,9 @@ Carry out taking inventory (this is the print empty inventory rule):
Carry out taking inventory (this is the print standard inventory rule):
say "[We] [are] carrying:[line break]" (A);
- list the contents of the player, with newlines, indented, including contents,
- giving inventory information, with extra indentation.
+ now all things enclosed by the player are unmarked for listing;
+ now all things held by the player are marked for listing;
+ list the contents of the player, with newlines, indented, giving inventory information, with extra indentation, listing marked items only, not listing concealed items, including contents.
@ Report.
@@ -1183,7 +1184,10 @@ Carry out examining (this is the examine directions rule):
Carry out examining (this is the examine containers rule):
if the noun is a container:
- if the noun is open or the noun is transparent:
+ if the noun is falsely empty:
+ say "[The noun] [are] empty." (C);
+ now examine text printed is true;
+ else if the noun is open or the noun is transparent:
if something described which is not scenery is in the noun and something which
is not the player is in the noun:
say "In [the noun] " (A);
@@ -1198,7 +1202,7 @@ Carry out examining (this is the examine containers rule):
now examine text printed is true;
Carry out examining (this is the examine supporters rule):
- if the noun is a supporter:
+ if the noun is a supporter and the noun is not falsely empty:
if something described which is not scenery is on the noun and something which is
not the player is on the noun:
say "On [the noun] " (A);
@@ -1657,7 +1661,7 @@ Carry out an actor opening (this is the standard opening rule):
Report an actor opening (this is the reveal any newly visible interior rule):
if the actor is the player and
the noun is an opaque container and
- the first thing held by the noun is not nothing and
+ the noun is clearly non-empty and
the noun does not enclose the actor:
if the action is not silent:
if the actor is the player:
diff --git a/inform7/extensions/standard_rules/Sections/Activities.w b/inform7/extensions/standard_rules/Sections/Activities.w
index 62091cf96..039890030 100644
--- a/inform7/extensions/standard_rules/Sections/Activities.w
+++ b/inform7/extensions/standard_rules/Sections/Activities.w
@@ -65,9 +65,57 @@ supplemented by details:
=
Printing room description details of something (documented at act_details) is an activity.
The printing room description details activity is accessible to Inter as "PRINTING_ROOM_DESC_DETAILS_ACT".
+
+For printing room description details of a container (called the box) when the box is falsely empty (this is the falsely empty container room description details rule):
+ say text of list writer internal rule response (A); [ " (" ]
+ if the box is lit and the location is unlit begin;
+ if the box is closed, say text of list writer internal rule response (J); [ "closed, empty[if serial comma option is active],[end if] and providing light" ]
+ else say text of list writer internal rule response (I); [ "empty and providing light" ]
+ else;
+ if the box is closed, say text of list writer internal rule response (E); [ "closed" ]
+ else say text of list writer internal rule response (F); [ "empty" ]
+ end if;
+ say text of list writer internal rule response (B); [ ")" ]
+
Printing inventory details of something (documented at act_idetails) is an activity.
The printing inventory details activity is accessible to Inter as "PRINTING_INVENTORY_DETAILS_ACT".
+
+To say the deceitfully empty inventory details of (box - a container):
+ let inventory text printed be false;
+ if the box is lit begin;
+ if the box is worn, say text of list writer internal rule response (K); [ "providing light and being worn" ]
+ else say text of list writer internal rule response (D); [ "providing light" ]
+ now inventory text printed is true;
+ else if the box is worn;
+ say text of list writer internal rule response (L); [ "being worn" ]
+ now inventory text printed is true;
+ end if;
+ if the box is openable begin;
+ if inventory text printed is true begin;
+ if the serial comma option is active, say ",";
+ say text of list writer internal rule response (C); [ "and" ]
+ end if;
+ if the box is open begin;
+ say text of list writer internal rule response (N); [ "open but empty" ]
+ else; [ it's closed ]
+ if the box is locked, say text of list writer internal rule response (P); [ "closed and locked" ]
+ else say text of list writer internal rule response (O); [ "closed" ]
+ now inventory text printed is true;
+ end if;
+ else; [ it's not openable ]
+ if the box is transparent begin;
+ if inventory text printed is true, say text of list writer internal rule response (C); [ "and" ]
+ say text of list writer internal rule response (F); [ "empty" ]
+ now inventory text printed is true; [ not relevant unless code is added ]
+ end if;
+ end if;
+
+For printing inventory details of a container (called the box) when the box is falsely empty (this is the falsely empty container inventory details rule):
+ say text of list writer internal rule response (A); [ "(" ]
+ say the deceitfully empty inventory details of box;
+ say text of list writer internal rule response (B); [ ")" ]
+
@ Names of things are often formed up into lists, in which they are sometimes
grouped together:
@@ -711,6 +759,34 @@ For printing a locale paragraph about a supporter (called the tabletop)
Definition: a thing (called the item) is locale-supportable if the item is not
scenery and the item is not mentioned and the item is not undescribed.
+For printing a locale paragraph about a thing (called the platform)
+ (this is the describe what's on scenery supporters in room descriptions rule):
+ if the platform is not a scenery supporter that does not enclose the player, continue the activity;
+ let print a paragraph be false;
+ let item be the first thing held by the platform;
+ while item is not nothing begin;
+ if the item is not scenery and the item is described and the platform does not conceal the item begin;
+ if the item is mentioned begin;
+ now the item is not marked for listing;
+ else;
+ now the item is marked for listing;
+ now print a paragraph is true;
+ end if;
+ end if;
+ now the item is the next thing held after the item;
+ end while;
+ if print a paragraph is true begin;
+ set pronouns from the platform;
+ increase the locale paragraph count by 1;
+ say "On [the platform] " (A);
+ list the contents of the platform, as a sentence, including contents,
+ giving brief inventory information, tersely, not listing
+ concealed items, prefacing with is/are, listing marked items only;
+ say ".[paragraph break]";
+ end if;
+ continue the activity
+
+[
For printing a locale paragraph about a thing (called the item)
(this is the describe what's on scenery supporters in room descriptions rule):
if the item is scenery and the item does not enclose the player:
@@ -727,6 +803,7 @@ For printing a locale paragraph about a thing (called the item)
concealed items, prefacing with is/are, listing marked items only;
say ".[paragraph break]";
continue the activity.
+]
For printing a locale paragraph about a thing (called the item)
(this is the describe what's on mentioned supporters in room descriptions rule):
diff --git a/inform7/extensions/standard_rules/Sections/Physical World Model.w b/inform7/extensions/standard_rules/Sections/Physical World Model.w
index 5b82a9b0f..4700f91a2 100644
--- a/inform7/extensions/standard_rules/Sections/Physical World Model.w
+++ b/inform7/extensions/standard_rules/Sections/Physical World Model.w
@@ -92,6 +92,16 @@ The verb to conceal (he conceals, they conceal, he concealed, it is concealed,
he is concealing) means the concealment relation.
Definition: Something is concealed rather than unconcealed if the holder of it conceals it.
+@ Something is obviously not empty if it has at least one obvious (unconcealed) thing in it.
+ Something is apparently empty if it's either truly empty or everything in it is concealed.
+
+=
+Definition: a container is clearly non-empty rather than possibly empty if I6 routine "HasEvidentContent" says so (it contains at least one unconcealed thing).
+Definition: a supporter is clearly non-empty rather than possibly empty if I6 routine "HasEvidentContent" says so (it supports at least one unconcealed thing).
+
+Definition: a container is falsely empty if I6 condition "(child(*1) && (~~HasEvidentContent(*1)))" says so (it contains at least one thing and everything in it is concealed).
+Definition: a supporter is falsely empty if I6 condition "(child(*1) && (~~HasEvidentContent(*1)))" says so (it supports at least one thing and everything in it is concealed).
+
@ A final sort of pseudo-containment: does the entire world contain
something, or not? (For things destroyed during play, or not yet created, the
answer would be no.)
From 877a876e0f5c2f22f338181962fd8861e24caa6e Mon Sep 17 00:00:00 2001
From: Zed Lopez
Date: Thu, 20 Apr 2023 21:35:26 -0700
Subject: [PATCH 002/113] believed to be working concealment patches
---
.../WorldModelKit/Sections/ListWriter.i6t | 26 +++++-----
inform7/Tests/Test Cases/Concealment.txt | 50 +++++++++++++++++++
.../standard_rules/Sections/Actions.w | 10 ++--
.../standard_rules/Sections/Activities.w | 5 +-
.../Sections/Physical World Model.w | 50 ++++++++++++++++---
resources/Documentation/The Recipe Book.txt | 2 +
6 files changed, 117 insertions(+), 26 deletions(-)
create mode 100644 inform7/Tests/Test Cases/Concealment.txt
diff --git a/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t b/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
index cc9f31076..8f44cd594 100644
--- a/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
+++ b/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
@@ -345,18 +345,20 @@ account.
This is true when something has at least one unconcealed thing in it.
It's false when something is truly empty or when all the things in
it are concealed, and is used to ensure that output is consistent
-in both those cases.
+in both those cases. The player shouldn't count for these purposes,
+but since the player has the concealed attribute, the player gets
+excluded anyway.
=
-[ HasEvidentContent o x;
-if (~~((o ofclass K5_container) || (o ofclass K6_supporter))) rfalse;
-if (o has container && (o hasnt open) && (o hasnt transparent)) rfalse; ! opaque closed container's status never be obvious
-x = child(o);
-while (x) {
-if (~~ConcealedFromLists(x)) rtrue;
-x = sibling(x);
-}
-rfalse;
+[ ObviouslyOccupied o x;
+ if (~~((o ofclass K5_container) || (o ofclass K6_supporter))) rfalse;
+ if (o has container && o hasnt open && o hasnt transparent) rfalse; ! opaque closed container's status can never be obvious
+ x = child(o);
+ while (x) {
+ if ((x hasnt concealed) && (~~TestConcealment(o, x))) rtrue;
+ x = sibling(x);
+ }
+ rfalse;
];
@h Coalesce Marked List.
@@ -602,8 +604,8 @@ by Inform. But this seems to be sound.
[ ListEqual o1 o2;
if (o1.KD_Count ~= o2.KD_Count) rfalse;
if ((o1.plural == 0) || (o2.plural == 0)) rfalse;
- if (HasEvidentContent(o1) && WillRecurs(o1)) rfalse;
- if (HasEvidentContent(o2) && WillRecurs(o2)) rfalse;
+ if (ObviouslyOccupied(o1) && WillRecurs(o1)) rfalse;
+ if (ObviouslyOccupied(o2) && WillRecurs(o2)) rfalse;
if (c_style & (FULLINV_BIT + PARTINV_BIT) ~= 0) {
if ((o1 hasnt worn && o2 has worn) || (o2 hasnt worn && o1 has worn)) rfalse;
if ((o1 hasnt light && o2 has light) || (o2 hasnt light && o1 has light)) rfalse;
diff --git a/inform7/Tests/Test Cases/Concealment.txt b/inform7/Tests/Test Cases/Concealment.txt
new file mode 100644
index 000000000..68092c014
--- /dev/null
+++ b/inform7/Tests/Test Cases/Concealment.txt
@@ -0,0 +1,50 @@
+Lab is a room.
+
+A thing can be occulted.
+
+For deciding the concealed possessions of a thing when the particular possession is occulted: rule succeeds.
+
+The table is a scenery supporter in the lab.
+The plans are an occulted thing. The plans are on the table.
+The journal is an occulted thing. The journal is on the table.
+
+The desk is a scenery supporter in the lab.
+The letter is an occulted thing. The letter is on the desk.
+
+The settee is a scenery supporter in the lab.
+The postcard is an occulted thing. The postcard is on the settee.
+The cushion is on the settee.
+
+The stool is a scenery supporter in the lab.
+The shoe is on the stool.
+
+The lava floor is a scenery supporter in the lab.
+
+The cardboard box is a closed openable container. The limited edition She-Ra action figure is an occulted thing in the cardboard box. The Power of Greyskull is an occulted thing in the cardboard box. The cardboard box is in the lab.
+
+The pouch is a closed openable container. The love letter is an occulted thing in the pouch. The pouch is in the lab.
+
+The gift box is a closed openable container. The card is an occulted thing. The card is in the gift box. The ball is in the gift box. The gift box is in the lab.
+
+The jar is a closed openable container. The cookie is a thing. The jar contains the cookie. The jar is in the lab.
+
+The crate is a closed openable enterable container. The crate is in the lab.
+
+The tray is a portable supporter. The wine glass is an occulted thing on the tray. The player carries the tray.
+
+The platform is an enterable supporter. It is in the Lab.
+
+The deck is an enterable supporter. It is in the Lab.
+The invisible jet is an occulted thing.
+The invisible jet is on the deck.
+
+The stage is an enterable supporter. It is in the Lab.
+The mask is on the stage.
+
+The beam is an enterable supporter. It is in the Lab.
+The wrench is on the beam.
+The tape is an occulted thing.
+The tape is on the beam.
+
+Test me with "x table / x desk / x settee / x stool / x lava floor / open cardboard box / open pouch / open gift box / open jar / open crate / x cardboard box / x pouch / x gift box / x jar / x crate / l / i / x tray / get glass / x deck / stand on deck / x deck / l / exit / x platform / stand on platform / x platform / l / exit / x stage / stand on stage / x stage / l / exit / x beam / stand on beam / x beam / l / exit".
+
diff --git a/inform7/extensions/standard_rules/Sections/Actions.w b/inform7/extensions/standard_rules/Sections/Actions.w
index 6f68f53cb..b02bb16f1 100644
--- a/inform7/extensions/standard_rules/Sections/Actions.w
+++ b/inform7/extensions/standard_rules/Sections/Actions.w
@@ -1184,10 +1184,8 @@ Carry out examining (this is the examine directions rule):
Carry out examining (this is the examine containers rule):
if the noun is a container:
- if the noun is falsely empty:
- say "[The noun] [are] empty." (C);
- now examine text printed is true;
- else if the noun is open or the noun is transparent:
+ if the noun is closed and the noun is opaque, make no decision;
+ if the noun is not falsely-unoccupied:
if something described which is not scenery is in the noun and something which
is not the player is in the noun:
say "In [the noun] " (A);
@@ -1202,7 +1200,7 @@ Carry out examining (this is the examine containers rule):
now examine text printed is true;
Carry out examining (this is the examine supporters rule):
- if the noun is a supporter and the noun is not falsely empty:
+ if the noun is a supporter and the noun is not falsely-unoccupied:
if something described which is not scenery is on the noun and something which is
not the player is on the noun:
say "On [the noun] " (A);
@@ -1661,7 +1659,7 @@ Carry out an actor opening (this is the standard opening rule):
Report an actor opening (this is the reveal any newly visible interior rule):
if the actor is the player and
the noun is an opaque container and
- the noun is clearly non-empty and
+ the noun is obviously-occupied and
the noun does not enclose the actor:
if the action is not silent:
if the actor is the player:
diff --git a/inform7/extensions/standard_rules/Sections/Activities.w b/inform7/extensions/standard_rules/Sections/Activities.w
index 039890030..0ff66fece 100644
--- a/inform7/extensions/standard_rules/Sections/Activities.w
+++ b/inform7/extensions/standard_rules/Sections/Activities.w
@@ -66,7 +66,7 @@ supplemented by details:
Printing room description details of something (documented at act_details) is an activity.
The printing room description details activity is accessible to Inter as "PRINTING_ROOM_DESC_DETAILS_ACT".
-For printing room description details of a container (called the box) when the box is falsely empty (this is the falsely empty container room description details rule):
+For printing room description details of a container (called the box) when the box is falsely-unoccupied (this is the falsely-unoccupied container room description details rule):
say text of list writer internal rule response (A); [ " (" ]
if the box is lit and the location is unlit begin;
if the box is closed, say text of list writer internal rule response (J); [ "closed, empty[if serial comma option is active],[end if] and providing light" ]
@@ -111,7 +111,7 @@ To say the deceitfully empty inventory details of (box - a container):
end if;
end if;
-For printing inventory details of a container (called the box) when the box is falsely empty (this is the falsely empty container inventory details rule):
+For printing inventory details of a container (called the box) when the box is falsely-unoccupied (this is the falsely-unoccupied container inventory details rule):
say text of list writer internal rule response (A); [ "(" ]
say the deceitfully empty inventory details of box;
say text of list writer internal rule response (B); [ ")" ]
@@ -559,6 +559,7 @@ For printing the locale description (this is the interesting locale paragraphs r
For printing the locale description (this is the you-can-also-see rule):
let the domain be the parameter-object;
let the mentionable count be 0;
+ if the domain is a thing and the domain holds the player and the domain is falsely-unoccupied, continue the activity;
repeat with item running through things:
now the item is not marked for listing;
repeat through the Table of Locale Priorities:
diff --git a/inform7/extensions/standard_rules/Sections/Physical World Model.w b/inform7/extensions/standard_rules/Sections/Physical World Model.w
index 4700f91a2..bc5e6fcb7 100644
--- a/inform7/extensions/standard_rules/Sections/Physical World Model.w
+++ b/inform7/extensions/standard_rules/Sections/Physical World Model.w
@@ -92,15 +92,53 @@ The verb to conceal (he conceals, they conceal, he concealed, it is concealed,
he is concealing) means the concealment relation.
Definition: Something is concealed rather than unconcealed if the holder of it conceals it.
-@ Something is obviously not empty if it has at least one obvious (unconcealed) thing in it.
- Something is apparently empty if it's either truly empty or everything in it is concealed.
+@ If a supporter or container has something on/in it, but all the contents are concealed or
+undescribed, default behavior should be the same to what it would be if it were empty. The
+following adjectives assist the maintenance of the deceit.
+
+Something is obviously-occupied if it has at least one obvious (neither concealed nor
+undescribed) thing in it, but closed opaque containers the player is outside of aren't
+obviously-occupied because their status isn't obvious. The player is undescribed and so
+the player's own presence in an enterable supporter or container doesn't count toward it
+being considered occupied. The opposite of obviously-occupied is possibly-unoccupied.
+Something is possibly-unoccupied if it's truly empty, or the only things in it are concealed
+or undescribed (or both), or it's a closed opaque container the player is outside of.
+
+Something is falsely-unoccupied if it's not a closed opaque continer the player is outside
+of and it's not truly empty but everything in it is concealed or undescribed. Note that
+falsely-unoccupied is not the opposite of obviously-occupied. Possibly-occupied is the
+opposite of obviously-occupied; falsely-occupied is something different.
+
+None of this considers visibility per se and they behave the same way in light or
+darkness. The presumption is that if the game is evaluating whether the player can perceive
+the contents of a thing, it has already been determined that they can perceive that
+thing.
+
+These tests only consider what's directly contained or supported. If there's an obvious
+thing its contents can't make it any less obvious; if something is undescribed or
+concealed, it's assumed that the game shouldn't be calling attention to their contents.
+
+These adjectives are not defined for people. Things directly held by the player are always
+perceptible by the player. Things possessed by other people aren't mentioned by default
+in room descriptions or when searching or examining them, but only through whatever rules
+an author adds to do so, so the details are left to the author.
=
-Definition: a container is clearly non-empty rather than possibly empty if I6 routine "HasEvidentContent" says so (it contains at least one unconcealed thing).
-Definition: a supporter is clearly non-empty rather than possibly empty if I6 routine "HasEvidentContent" says so (it supports at least one unconcealed thing).
+Definition: a container is obviously-occupied rather than possibly-unoccupied if
+I6 routine "ObviouslyOccupied" says so (it contains at least one obvious thing).
-Definition: a container is falsely empty if I6 condition "(child(*1) && (~~HasEvidentContent(*1)))" says so (it contains at least one thing and everything in it is concealed).
-Definition: a supporter is falsely empty if I6 condition "(child(*1) && (~~HasEvidentContent(*1)))" says so (it supports at least one thing and everything in it is concealed).
+Definition: a supporter is obviously-occupied rather than possibly-unoccupied if
+I6 routine "ObviouslyOccupied" says so (it supports at least one obvious thing).
+
+Definition: a container (called c) is falsely-unoccupied:
+ if the first thing held by it is nothing, no;
+ if it is closed and it is opaque and it does not enclose the player, no;
+ decide on whether or not it is possibly-unoccupied;
+
+Definition: a supporter is falsely-unoccupied:
+ if the first thing held by it is nothing, no;
+ if the first thing held by it is the player and the next thing held after the player is nothing, no;
+ decide on whether or not it is possibly-unoccupied;
@ A final sort of pseudo-containment: does the entire world contain
something, or not? (For things destroyed during play, or not yet created, the
diff --git a/resources/Documentation/The Recipe Book.txt b/resources/Documentation/The Recipe Book.txt
index 37c20f328..87a841fa4 100644
--- a/resources/Documentation/The Recipe Book.txt
+++ b/resources/Documentation/The Recipe Book.txt
@@ -259,6 +259,8 @@ When the story compiles the list of nondescript items, it adds tags such as "(op
Rule for printing room description details: stop.
+The "(empty)" tag can appear when something is not truly empty if everything within is concealed or undescribed.
+
And we can suppress the "(open)" and "(on which is...)" sorts of tags with the "omit the contents in listing" phrase, as in
Rule for printing the name of the bottle while not inserting or removing:
From c9f6ea9b38c36aa34964a2b6800cb9430e0c2c8e Mon Sep 17 00:00:00 2001
From: Zed Lopez
Date: Sat, 22 Apr 2023 16:13:31 -0700
Subject: [PATCH 003/113] completed concealment fixes
---
.../WorldModelKit/Sections/ListWriter.i6t | 8 +--
inform7/Tests/Test Cases/Concealment.txt | 50 -------------------
.../Test Cases/_Results_Ideal/Undescribed.txt | 10 ++--
.../standard_rules/Sections/Actions.w | 10 ++--
.../standard_rules/Sections/Activities.w | 10 ++--
5 files changed, 21 insertions(+), 67 deletions(-)
delete mode 100644 inform7/Tests/Test Cases/Concealment.txt
diff --git a/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t b/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
index 8f44cd594..33e5253e0 100644
--- a/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
+++ b/inform7/Internal/Inter/WorldModelKit/Sections/ListWriter.i6t
@@ -344,10 +344,10 @@ account.
@h Having Evident Content
This is true when something has at least one unconcealed thing in it.
It's false when something is truly empty or when all the things in
-it are concealed, and is used to ensure that output is consistent
-in both those cases. The player shouldn't count for these purposes,
-but since the player has the concealed attribute, the player gets
-excluded anyway.
+it are concealed or undescribed, and is used to ensure that output
+is consistent in both those cases. The player shouldn't count for
+these purposes, but since the player is undescribed, they're excluded
+anyway.
=
[ ObviouslyOccupied o x;
diff --git a/inform7/Tests/Test Cases/Concealment.txt b/inform7/Tests/Test Cases/Concealment.txt
deleted file mode 100644
index 68092c014..000000000
--- a/inform7/Tests/Test Cases/Concealment.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-Lab is a room.
-
-A thing can be occulted.
-
-For deciding the concealed possessions of a thing when the particular possession is occulted: rule succeeds.
-
-The table is a scenery supporter in the lab.
-The plans are an occulted thing. The plans are on the table.
-The journal is an occulted thing. The journal is on the table.
-
-The desk is a scenery supporter in the lab.
-The letter is an occulted thing. The letter is on the desk.
-
-The settee is a scenery supporter in the lab.
-The postcard is an occulted thing. The postcard is on the settee.
-The cushion is on the settee.
-
-The stool is a scenery supporter in the lab.
-The shoe is on the stool.
-
-The lava floor is a scenery supporter in the lab.
-
-The cardboard box is a closed openable container. The limited edition She-Ra action figure is an occulted thing in the cardboard box. The Power of Greyskull is an occulted thing in the cardboard box. The cardboard box is in the lab.
-
-The pouch is a closed openable container. The love letter is an occulted thing in the pouch. The pouch is in the lab.
-
-The gift box is a closed openable container. The card is an occulted thing. The card is in the gift box. The ball is in the gift box. The gift box is in the lab.
-
-The jar is a closed openable container. The cookie is a thing. The jar contains the cookie. The jar is in the lab.
-
-The crate is a closed openable enterable container. The crate is in the lab.
-
-The tray is a portable supporter. The wine glass is an occulted thing on the tray. The player carries the tray.
-
-The platform is an enterable supporter. It is in the Lab.
-
-The deck is an enterable supporter. It is in the Lab.
-The invisible jet is an occulted thing.
-The invisible jet is on the deck.
-
-The stage is an enterable supporter. It is in the Lab.
-The mask is on the stage.
-
-The beam is an enterable supporter. It is in the Lab.
-The wrench is on the beam.
-The tape is an occulted thing.
-The tape is on the beam.
-
-Test me with "x table / x desk / x settee / x stool / x lava floor / open cardboard box / open pouch / open gift box / open jar / open crate / x cardboard box / x pouch / x gift box / x jar / x crate / l / i / x tray / get glass / x deck / stand on deck / x deck / l / exit / x platform / stand on platform / x platform / l / exit / x stage / stand on stage / x stage / l / exit / x beam / stand on beam / x beam / l / exit".
-
diff --git a/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt b/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt
index caff7729a..9f108ec97 100644
--- a/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt
+++ b/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt
@@ -1,23 +1,23 @@
Bar
Welcome
An Interactive Fiction
- Release 1 / Serial number 150512 / Inform 7 build 6M22 (I6/v6.33 lib 6/12N) SD
+ Release 1 / Serial number 160428 / Inform 7 v10.2.0 / D
Bar
- You can see a counter (on which is a glass jar) and an obvious item here.
+ You can see a counter (on which is a glass jar (empty)) and an obvious item here.
> > Bar
(Testing.)
>[1] x jar
- The glass jar is empty.
+ You see nothing special about the glass jar.
>[2] x hidden object
You see nothing special about the hidden object.
>[3] look
Bar
- You can see a counter (on which is a glass jar) and an obvious item here.
+ You can see a counter (on which is a glass jar (empty)) and an obvious item here.
>[4] take all
obvious item: Taken.
@@ -102,7 +102,7 @@
Dropped.
>[23] x glass jar
- The glass jar is empty.
+ You see nothing special about the glass jar.
>[24] search glass jar
The glass jar is empty.
diff --git a/inform7/extensions/standard_rules/Sections/Actions.w b/inform7/extensions/standard_rules/Sections/Actions.w
index b02bb16f1..8f0aa0fdb 100644
--- a/inform7/extensions/standard_rules/Sections/Actions.w
+++ b/inform7/extensions/standard_rules/Sections/Actions.w
@@ -1193,11 +1193,11 @@ Carry out examining (this is the examine containers rule):
concealed items, prefacing with is/are;
say ".";
now examine text printed is true;
- otherwise if examine text printed is false:
- if the player is in the noun:
- make no decision;
- say "[The noun] [are] empty." (B);
- now examine text printed is true;
+ otherwise if examine text printed is false and the first thing held by the noun is nothing:
+ if the player is in the noun:
+ make no decision;
+ say "[The noun] [are] empty." (B);
+ now examine text printed is true;
Carry out examining (this is the examine supporters rule):
if the noun is a supporter and the noun is not falsely-unoccupied:
diff --git a/inform7/extensions/standard_rules/Sections/Activities.w b/inform7/extensions/standard_rules/Sections/Activities.w
index 0ff66fece..4e46d3059 100644
--- a/inform7/extensions/standard_rules/Sections/Activities.w
+++ b/inform7/extensions/standard_rules/Sections/Activities.w
@@ -112,9 +112,12 @@ To say the deceitfully empty inventory details of (box - a container):
end if;
For printing inventory details of a container (called the box) when the box is falsely-unoccupied (this is the falsely-unoccupied container inventory details rule):
- say text of list writer internal rule response (A); [ "(" ]
- say the deceitfully empty inventory details of box;
- say text of list writer internal rule response (B); [ ")" ]
+ let the tag be "[the deceitfully empty inventory details of box]";
+ if tag is not empty begin;
+ say text of list writer internal rule response (A); [ "(" ]
+ say tag;
+ say text of list writer internal rule response (B); [ ")" ]
+ end if;
@ Names of things are often formed up into lists, in which they are sometimes
grouped together:
@@ -127,6 +130,7 @@ The standard contents listing rule is defined by Inter as "STANDARD_CONTENTS_LIS
Grouping together something (documented at act_gt) is an activity.
The grouping together activity is accessible to Inter as "GROUPING_TOGETHER_ACT".
+
@ And such lists of names are formed up in turn into room descriptions.
Something which is visible in a room can either have a paragraph of its own
or can be relegated to the list of "nondescript" items at the end.
From d34efdab5249d80b34021aad892016362ac8f391 Mon Sep 17 00:00:00 2001
From: Zed Lopez
Date: Sat, 22 Apr 2023 16:18:14 -0700
Subject: [PATCH 004/113] removing commented out code
---
.../standard_rules/Sections/Activities.w | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/inform7/extensions/standard_rules/Sections/Activities.w b/inform7/extensions/standard_rules/Sections/Activities.w
index 4e46d3059..69b4a4eab 100644
--- a/inform7/extensions/standard_rules/Sections/Activities.w
+++ b/inform7/extensions/standard_rules/Sections/Activities.w
@@ -791,25 +791,6 @@ For printing a locale paragraph about a thing (called the platform)
end if;
continue the activity
-[
-For printing a locale paragraph about a thing (called the item)
- (this is the describe what's on scenery supporters in room descriptions rule):
- if the item is scenery and the item does not enclose the player:
- if a locale-supportable thing is on the item:
- set pronouns from the item;
- repeat with possibility running through things on the item:
- now the possibility is marked for listing;
- if the possibility is mentioned:
- now the possibility is not marked for listing;
- increase the locale paragraph count by 1;
- say "On [the item] " (A);
- list the contents of the item, as a sentence, including contents,
- giving brief inventory information, tersely, not listing
- concealed items, prefacing with is/are, listing marked items only;
- say ".[paragraph break]";
- continue the activity.
-]
-
For printing a locale paragraph about a thing (called the item)
(this is the describe what's on mentioned supporters in room descriptions rule):
if the item is mentioned and the item is not undescribed and the item is
From 56fd1565220b6d92f065afd0f7b823b479104ec6 Mon Sep 17 00:00:00 2001
From: Zed Lopez
Date: Sat, 22 Apr 2023 17:50:59 -0700
Subject: [PATCH 005/113] fix to examining containers; reblessing Undescribed
---
.../Test Cases/_Results_Ideal/Undescribed.txt | 4 ++--
.../standard_rules/Sections/Actions.w | 19 +++++++++----------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt b/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt
index 9f108ec97..54015b8ce 100644
--- a/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt
+++ b/inform7/Tests/Test Cases/_Results_Ideal/Undescribed.txt
@@ -10,7 +10,7 @@
(Testing.)
>[1] x jar
- You see nothing special about the glass jar.
+ The glass jar is empty.
>[2] x hidden object
You see nothing special about the hidden object.
@@ -102,7 +102,7 @@
Dropped.
>[23] x glass jar
- You see nothing special about the glass jar.
+ The glass jar is empty.
>[24] search glass jar
The glass jar is empty.
diff --git a/inform7/extensions/standard_rules/Sections/Actions.w b/inform7/extensions/standard_rules/Sections/Actions.w
index 8f0aa0fdb..a36f38a3e 100644
--- a/inform7/extensions/standard_rules/Sections/Actions.w
+++ b/inform7/extensions/standard_rules/Sections/Actions.w
@@ -1184,16 +1184,15 @@ Carry out examining (this is the examine directions rule):
Carry out examining (this is the examine containers rule):
if the noun is a container:
- if the noun is closed and the noun is opaque, make no decision;
- if the noun is not falsely-unoccupied:
- if something described which is not scenery is in the noun and something which
- is not the player is in the noun:
- say "In [the noun] " (A);
- list the contents of the noun, as a sentence, tersely, not listing
- concealed items, prefacing with is/are;
- say ".";
- now examine text printed is true;
- otherwise if examine text printed is false and the first thing held by the noun is nothing:
+ if the noun is closed and the noun is opaque, make no decision;
+ if something described which is not scenery is in the noun and something which
+ is not the player is in the noun and the noun is not falsely-unoccupied:
+ say "In [the noun] " (A);
+ list the contents of the noun, as a sentence, tersely, not listing
+ concealed items, prefacing with is/are;
+ say ".";
+ now examine text printed is true;
+ otherwise if examine text printed is false:
if the player is in the noun:
make no decision;
say "[The noun] [are] empty." (B);
From 9881c2eb099042191cd229c0d2c3a48ab74ec407 Mon Sep 17 00:00:00 2001
From: Zed Lopez
Date: Sun, 23 Apr 2023 01:39:46 -0700
Subject: [PATCH 006/113] initial commit toward deactivate_clarification
---
inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t b/inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t
index 7b6a1445a..9491d04b7 100644
--- a/inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t
+++ b/inform7/Internal/Inter/CommandParserKit/Sections/Parser.i6t
@@ -98,6 +98,8 @@ Global hb_wn; ! left over? (And a save value for wn.)
Global usual_grammar_after; ! Point from which usual grammar is parsed (it may vary from
! the above if user's routines match multi-word verbs)
+Global dont_ask_for_clarification; ! Allows deactivating clarification question
+
@h Grammar Token Variables.
More globals, but dealing at the level of individual tokens now.
@@ -1750,7 +1752,7 @@ Parse an object name.
#Ifdef DEBUG;
if (parser_trace >= 3) print " [Calling NounDomain on location and actor]^";
#Endif; ! DEBUG
- l = NounDomain(actors_location, actor, token);
+ l = NounDomain(actors_location, actor, token, dont_ask_for_clarification);
if (l == REPARSE_CODE) return l; ! Reparse after Q&A
if (indef_wanted == INDEF_ALL_WANTED && l == 0 && number_matched == 0)
l = 1; ! ReviseMulti if TAKE ALL FROM empty container
@@ -1834,7 +1836,7 @@ Parse an object name.
! Case 2: token is "held" (which fortunately can't take multiple objects)
! and may generate an implicit take
- l = NounDomain(actor,actors_location,token); ! Same as above...
+ l = NounDomain(actor,actors_location,token,dont_ask_for_clarification); ! Same as above...
if (l == REPARSE_CODE) return l;
if (l == 0) {
if (indef_possambig) {
From 32064e9d248838b9baac5440b9044cf705c4d307 Mon Sep 17 00:00:00 2001
From: Zed Lopez
Date: Sun, 23 Apr 2023 07:13:52 -0700
Subject: [PATCH 007/113] clarification deactivation commitification
---
inform7/Tests/Test Cases/Clarified.txt | 15 +++++++++
.../Test Cases/_Results_Ideal/Clarified.txt | 33 +++++++++++++++++++
2 files changed, 48 insertions(+)
create mode 100644 inform7/Tests/Test Cases/Clarified.txt
create mode 100644 inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt
diff --git a/inform7/Tests/Test Cases/Clarified.txt b/inform7/Tests/Test Cases/Clarified.txt
new file mode 100644
index 000000000..d9b95d942
--- /dev/null
+++ b/inform7/Tests/Test Cases/Clarified.txt
@@ -0,0 +1,15 @@
+"The Clarified Ancients of Mu Mu"
+
+Lab is a room.
+
+no-clarifications is a truth state that varies.
+The no-clarifications variable translates into Inter as "dont_ask_for_clarification".
+
+The red box is a thing in the Lab.
+The blue box is a thing in the Lab.
+
+After dropping:
+ now no-clarifications is true;
+ continue the action.
+
+Test me with "get box / red / drop box / l / get box / i".
diff --git a/inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt b/inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt
new file mode 100644
index 000000000..22d4af022
--- /dev/null
+++ b/inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt
@@ -0,0 +1,33 @@
+ Lab
+ The Clarified Ancients of Mu Mu
+ An Interactive Fiction
+ Release 1 / Serial number 160428 / Inform 7 v10.2.0 / D
+
+ Lab
+ You can see a red box and a blue box here.
+
+> > Lab
+ (Testing.)
+
+ >[1] get box
+ Which do you mean, the red box or the blue box?
+
+ >[2] red
+ Taken.
+
+ >[3] drop box
+ (the red box)
+ Dropped.
+
+ >[4] l
+ Lab
+ You can see a red box and a blue box here.
+
+ >[5] get box
+ Taken.
+
+ >[6] i
+ You are carrying:
+ a red box
+
+> >
\ No newline at end of file
From 4ec7fb8e294ab920d87721d0ec5a5ec64b97b2db Mon Sep 17 00:00:00 2001
From: Zed Lopez
Date: Sun, 23 Apr 2023 07:20:30 -0700
Subject: [PATCH 008/113] clarification reactivation commitification
---
inform7/Tests/Test Cases/Clarified.txt | 6 +++++-
inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt | 6 ++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/inform7/Tests/Test Cases/Clarified.txt b/inform7/Tests/Test Cases/Clarified.txt
index d9b95d942..4f5af876d 100644
--- a/inform7/Tests/Test Cases/Clarified.txt
+++ b/inform7/Tests/Test Cases/Clarified.txt
@@ -12,4 +12,8 @@ After dropping:
now no-clarifications is true;
continue the action.
-Test me with "get box / red / drop box / l / get box / i".
+After taking the blue box:
+ now no-clarifications is false;
+ continue the action.
+
+Test me with "get box / red / drop box / l / get box / i / get blue box / drop box".
diff --git a/inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt b/inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt
index 22d4af022..20c5977de 100644
--- a/inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt
+++ b/inform7/Tests/Test Cases/_Results_Ideal/Clarified.txt
@@ -30,4 +30,10 @@
You are carrying:
a red box
+ >[7] get blue box
+ Taken.
+
+ >[8] drop box
+ Which do you mean, the blue box or the red box?
+
> >
\ No newline at end of file
From 4fb6e57b866eacd84d27e4752c7d0147fc982ac0 Mon Sep 17 00:00:00 2001
From: Graham Nelson
Date: Sun, 23 Apr 2023 21:16:45 +0100
Subject: [PATCH 009/113] Fix for Jira bug I7-2297
---
README.md | 2 +-
build.txt | 4 +-
docs/pipeline-module/2-pe.html | 2 +-
docs/pipeline-module/3-css.html | 12 ++++
inform7/Figures/timings-diagnostics.txt | 57 ++++++++++---------
.../BasicInformExtrasKit/kit_metadata.json | 2 +-
.../Inter/BasicInformKit/kit_metadata.json | 2 +-
.../Inter/CommandParserKit/kit_metadata.json | 2 +-
.../EnglishLanguageKit/kit_metadata.json | 2 +-
.../Inter/WorldModelKit/kit_metadata.json | 2 +-
.../Chapter 3/Compile Splats Stage.w | 12 ++++
11 files changed, 62 insertions(+), 37 deletions(-)
diff --git a/README.md b/README.md
index fb892e0ce..a6edab434 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Inform 7
-[Version](notes/versioning.md): 10.2.0-beta+6W35 'Krypton' (22 April 2023)
+[Version](notes/versioning.md): 10.2.0-beta+6W36 'Krypton' (23 April 2023)
## About Inform
diff --git a/build.txt b/build.txt
index a39ec3e66..b42abe7dc 100644
--- a/build.txt
+++ b/build.txt
@@ -1,3 +1,3 @@
Prerelease: beta
-Build Date: 22 April 2023
-Build Number: 6W35
+Build Date: 23 April 2023
+Build Number: 6W36
diff --git a/docs/pipeline-module/2-pe.html b/docs/pipeline-module/2-pe.html
index 8cc149e4d..8397d6d83 100644
--- a/docs/pipeline-module/2-pe.html
+++ b/docs/pipeline-module/2-pe.html
@@ -216,7 +216,7 @@ what the red button marked "danger" does.
intpipeline_error_count = 0;
-voidPipelineErrors::kit_error(char *message, text_stream *quote) {
+voidPipelineErrors::kit_error(char *message, text_stream *quote) { #ifdefPROBLEMS_MODULETEMPORARY_TEXT(M)WRITE_TO(M, message, quote);
diff --git a/docs/pipeline-module/3-css.html b/docs/pipeline-module/3-css.html
index ee7e1db3d..3e854cc99 100644
--- a/docs/pipeline-module/3-css.html
+++ b/docs/pipeline-module/3-css.html
@@ -1012,6 +1012,18 @@ which contains the actual code.
TEMPORARY_TEXT(value)Extract a token3.1.3.1.4.5.2.2;if (Str::len(value) == 0) break;
+intinvalid = FALSE;
+for (inti=0; i<Str::len(value); i++) {
+wchar_tc = Str::get_at(value, i);
+if ((c != '_') && (Characters::isalnum(c) == FALSE) &&
+ ((i > 0) || (Characters::isdigit(c) == FALSE)))
+invalid = TRUE;
+ }
+if (invalid) {
+text_stream *err = Str::new();
+WRITE_TO(err, "'%S' in function '%S'", value, identifier);
+PipelineErrors::kit_error("invalid Inform 6 local variable name: %S", err);
+ }inter_symbol *loc_name =InterSymbolsTable::create_with_unique_name(InterPackage::scope(IP), value);InterSymbol::make_local(loc_name);
diff --git a/inform7/Figures/timings-diagnostics.txt b/inform7/Figures/timings-diagnostics.txt
index 22dff5f8d..8428455dc 100644
--- a/inform7/Figures/timings-diagnostics.txt
+++ b/inform7/Figures/timings-diagnostics.txt
@@ -1,32 +1,33 @@
100.0% in inform7 run
- 70.0% in compilation to Inter
- 49.4% in //Sequence::undertake_queued_tasks//
+ 70.5% in compilation to Inter
+ 49.6% in //Sequence::undertake_queued_tasks//
4.9% in //MajorNodes::pre_pass//
- 3.3% in //MajorNodes::pass_1//
- 1.7% in //ImperativeDefinitions::assess_all//
- 1.5% in //RTPhrasebook::compile_entries//
- 1.3% in //RTKindConstructors::compile//
- 1.1% in //Sequence::lint_inter//
- 0.5% in //MajorNodes::pass_2//
- 0.5% in //Sequence::undertake_queued_tasks//
- 0.5% in //Sequence::undertake_queued_tasks//
- 0.5% in //World::stage_V//
- 0.3% in //ImperativeDefinitions::compile_first_block//
- 0.1% in //CompletionModule::compile//
- 0.1% in //InferenceSubjects::emit_all//
- 0.1% in //RTKindConstructors::compile_permissions//
- 0.1% in //Task::make_built_in_kind_constructors//
+ 3.5% in //MajorNodes::pass_1//
+ 1.8% in //ImperativeDefinitions::assess_all//
+ 1.4% in //RTKindConstructors::compile//
+ 1.4% in //RTPhrasebook::compile_entries//
+ 1.0% in //Sequence::lint_inter//
+ 0.6% in //MajorNodes::pass_2//
+ 0.6% in //Sequence::undertake_queued_tasks//
+ 0.6% in //World::stage_V//
+ 0.4% in //ImperativeDefinitions::compile_first_block//
+ 0.4% in //Sequence::undertake_queued_tasks//
+ 0.2% in //CompletionModule::compile//
+ 0.2% in //InferenceSubjects::emit_all//
+ 0.2% in //RTKindConstructors::compile_permissions//
+ 0.2% in //Task::make_built_in_kind_constructors//
+ 0.2% in //World::stages_II_and_III//
2.9% not specifically accounted for
- 26.3% in running Inter pipeline
- 10.2% in step 14/15: generate inform6 -> auto.inf
+ 25.9% in running Inter pipeline
+ 9.8% in step 14/15: generate inform6 -> auto.inf
5.7% in step 5/15: load-binary-kits
- 5.5% in step 6/15: make-synoptic-module
- 1.7% in step 9/15: make-identifiers-unique
- 0.3% in step 12/15: eliminate-redundant-operations
- 0.3% in step 4/15: compile-splats
- 0.3% in step 7/15: shorten-wiring
- 0.3% in step 8/15: detect-indirect-calls
- 0.1% in step 11/15: eliminate-redundant-labels
- 1.3% not specifically accounted for
- 3.1% in supervisor
- 0.4% not specifically accounted for
+ 5.3% in step 6/15: make-synoptic-module
+ 1.8% in step 9/15: make-identifiers-unique
+ 0.4% in step 12/15: eliminate-redundant-operations
+ 0.4% in step 4/15: compile-splats
+ 0.4% in step 7/15: shorten-wiring
+ 0.2% in step 11/15: eliminate-redundant-labels
+ 0.2% in step 8/15: detect-indirect-calls
+ 1.4% not specifically accounted for
+ 3.0% in supervisor
+ 0.5% not specifically accounted for
diff --git a/inform7/Internal/Inter/BasicInformExtrasKit/kit_metadata.json b/inform7/Internal/Inter/BasicInformExtrasKit/kit_metadata.json
index 065be9583..7659513e0 100644
--- a/inform7/Internal/Inter/BasicInformExtrasKit/kit_metadata.json
+++ b/inform7/Internal/Inter/BasicInformExtrasKit/kit_metadata.json
@@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "BasicInformExtrasKit",
- "version": "10.2.0-beta+6W35"
+ "version": "10.2.0-beta+6W36"
},
"kit-details": {
"has-priority": 1
diff --git a/inform7/Internal/Inter/BasicInformKit/kit_metadata.json b/inform7/Internal/Inter/BasicInformKit/kit_metadata.json
index 132488c33..4f1c182ea 100644
--- a/inform7/Internal/Inter/BasicInformKit/kit_metadata.json
+++ b/inform7/Internal/Inter/BasicInformKit/kit_metadata.json
@@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "BasicInformKit",
- "version": "10.2.0-beta+6W35"
+ "version": "10.2.0-beta+6W36"
},
"needs": [ {
"unless": {
diff --git a/inform7/Internal/Inter/CommandParserKit/kit_metadata.json b/inform7/Internal/Inter/CommandParserKit/kit_metadata.json
index c3dc033bb..6fc33fb98 100644
--- a/inform7/Internal/Inter/CommandParserKit/kit_metadata.json
+++ b/inform7/Internal/Inter/CommandParserKit/kit_metadata.json
@@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "CommandParserKit",
- "version": "10.2.0-beta+6W35"
+ "version": "10.2.0-beta+6W36"
},
"needs": [ {
"need": {
diff --git a/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json b/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json
index 6dd0e9946..0fd67aeb4 100644
--- a/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json
+++ b/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json
@@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "EnglishLanguageKit",
- "version": "10.2.0-beta+6W35"
+ "version": "10.2.0-beta+6W36"
},
"needs": [ {
"need": {
diff --git a/inform7/Internal/Inter/WorldModelKit/kit_metadata.json b/inform7/Internal/Inter/WorldModelKit/kit_metadata.json
index b1fdae91d..f86f634cc 100644
--- a/inform7/Internal/Inter/WorldModelKit/kit_metadata.json
+++ b/inform7/Internal/Inter/WorldModelKit/kit_metadata.json
@@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "WorldModelKit",
- "version": "10.2.0-beta+6W35"
+ "version": "10.2.0-beta+6W36"
},
"needs": [ {
"need": {
diff --git a/inter/pipeline-module/Chapter 3/Compile Splats Stage.w b/inter/pipeline-module/Chapter 3/Compile Splats Stage.w
index 404ff39a2..bbe2a0bc4 100644
--- a/inter/pipeline-module/Chapter 3/Compile Splats Stage.w
+++ b/inter/pipeline-module/Chapter 3/Compile Splats Stage.w
@@ -757,6 +757,18 @@ These have package types |_function| and |_code| respectively.
TEMPORARY_TEXT(value)
@;
if (Str::len(value) == 0) break;
+ int invalid = FALSE;
+ for (int i=0; i 0) || (Characters::isdigit(c) == FALSE)))
+ invalid = TRUE;
+ }
+ if (invalid) {
+ text_stream *err = Str::new();
+ WRITE_TO(err, "'%S' in function '%S'", value, identifier);
+ PipelineErrors::kit_error("invalid Inform 6 local variable name: %S", err);
+ }
inter_symbol *loc_name =
InterSymbolsTable::create_with_unique_name(InterPackage::scope(IP), value);
InterSymbol::make_local(loc_name);
From c9f22044b542110fbfef81e3c250a9b5d84c2c1b Mon Sep 17 00:00:00 2001
From: Graham Nelson
Date: Sun, 23 Apr 2023 21:18:14 +0100
Subject: [PATCH 010/113] Updated notes
---
notes/release/pending.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/notes/release/pending.md b/notes/release/pending.md
index fd9f6dbd6..f552b9c21 100644
--- a/notes/release/pending.md
+++ b/notes/release/pending.md
@@ -30,6 +30,9 @@ These will be added to release notes when the release is made.
- Fix for Jira bug [I7-2304](https://inform7.atlassian.net/browse/I7-2304)
"switch(): first branch can't start with negative number"
([commit 1c18007](https://github.com/ganelson/inform/commit/1c18007326bf6fb15c74a1d5742827a4d76a0c20))
+- Fix for Jira bug [I7-2297](https://inform7.atlassian.net/browse/I7-2297)
+ "Missing semicolon after I6 routine crashed compiler without explanation"
+ ([commit 4fb6e57](https://github.com/ganelson/inform/commit/4fb6e57b866eacd84d27e4752c7d0147fc982ac0))
- Fix for Jira bug [I7-2284](https://inform7.atlassian.net/browse/I7-2284)
"Inter error" - arising from a sentence trying to use an either-or property
in a way which would make it unheld by default, when an existing sentence
From 4d97b499cfd3e15650d1bba1e6e8c70c24a01fb2 Mon Sep 17 00:00:00 2001
From: Graham Nelson
Date: Sun, 23 Apr 2023 23:15:44 +0100
Subject: [PATCH 011/113] Fix for Jira bug I7-2335
---
docs/pipeline-module/2-pe.html | 2 +-
docs/pipeline-module/3-css.html | 159 +++++++++++++-----
inform7/Figures/timings-diagnostics.txt | 60 +++----
.../Chapter 3/Compile Splats Stage.w | 117 +++++++++----
4 files changed, 230 insertions(+), 108 deletions(-)
diff --git a/docs/pipeline-module/2-pe.html b/docs/pipeline-module/2-pe.html
index 8397d6d83..ad4163462 100644
--- a/docs/pipeline-module/2-pe.html
+++ b/docs/pipeline-module/2-pe.html
@@ -216,7 +216,7 @@ what the red button marked "danger" does.
intpipeline_error_count = 0;
-voidPipelineErrors::kit_error(char *message, text_stream *quote) {
+voidPipelineErrors::kit_error(char *message, text_stream *quote) { #ifdefPROBLEMS_MODULETEMPORARY_TEXT(M)WRITE_TO(M, message, quote);
diff --git a/docs/pipeline-module/3-css.html b/docs/pipeline-module/3-css.html
index 3e854cc99..47077261f 100644
--- a/docs/pipeline-module/3-css.html
+++ b/docs/pipeline-module/3-css.html
@@ -255,21 +255,21 @@ meaningfully have a value, even though a third token is present.
§3.1.3.1.4.5.2.2.1. Process the token3.1.3.1.4.5.2.2.1 =
+
+
+
+if (Str::eq(value, I"+"))
+PipelineErrors::kit_error("Inform 6 array declaration using operator '+' "
+"(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
+elseif (Str::eq(value, I"-"))
+PipelineErrors::kit_error("Inform 6 array declaration using operator '-' "
+"(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
+elseif (Str::eq(value, I"*"))
+PipelineErrors::kit_error("Inform 6 array declaration using operator '*' "
+"(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
+elseif (Str::eq(value, I"/"))
+PipelineErrors::kit_error("Inform 6 array declaration using operator '/' "
+"(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
+else {
+inter_pairval = InterValuePairs::undef();
+Assimilate a value3.1.3.1.4.1.1;
+Add value to the entry pile3.1.3.1.4.5.2.2.1.1;
+ }
+
§3.2. How functions are assimilated. Functions in Inform 6 are usually called "routines", and have a syntax like so:
@@ -1010,7 +1077,7 @@ which contains the actual code.
string_positionspos = Str::start(local_var_names);while (TRUE) {TEMPORARY_TEXT(value)
-Extract a token3.1.3.1.4.5.2.2;
+Extract a token3.1.3.1.4.5.2.2.2;if (Str::len(value) == 0) break;intinvalid = FALSE;for (inti=0; i<Str::len(value); i++) {
@@ -1430,8 +1497,9 @@ before they are needed.
inter_schema *sch = ParsingSchemas::from_text(S);
+intexcess_tokens = FALSE;inter_symbol *result_s =
-CompileSplatsStage::compute_r(step, IBM, sch->node_tree);
+CompileSplatsStage::compute_r(step, IBM, sch->node_tree, &excess_tokens);if (result_s == NULL) {PipelineErrors::kit_error("Inform 6 constant too complex", S);returnInterValuePairs::number(1);
@@ -1445,9 +1513,10 @@ reducing unary subtraction to a case of binary subtraction.
inter_symbol *CompileSplatsStage::compute_r(pipeline_step *step,
-inter_bookmark *IBM, inter_schema_node *isn) {
+inter_bookmark *IBM, inter_schema_node *isn, int *excess_tokens) {
+if (isn == NULL) returnNULL;if (isn->isn_type == SUBEXPRESSION_ISNT)
-returnCompileSplatsStage::compute_r(step, IBM, isn->child_node);
+returnCompileSplatsStage::compute_r(step, IBM, isn->child_node, excess_tokens);if (isn->isn_type == OPERATION_ISNT) {inter_tiop = 0;if (isn->isn_clarifier == PLUS_BIP) op = CONST_LIST_FORMAT_SUM;
@@ -1460,7 +1529,7 @@ reducing unary subtraction to a case of binary subtraction.
}if (isn->isn_type == EXPRESSION_ISNT) {inter_schema_token *t = isn->expression_tokens;
-if ((t == NULL) || (t->next)) internal_error("malformed EXPRESSION_ISNT");
+if ((t == NULL) || (t->next)) { *excess_tokens = TRUE; returnNULL; }returnCompileSplatsStage::compute_eval(step, IBM, t); }returnNULL;
@@ -1470,8 +1539,8 @@ reducing unary subtraction to a case of binary subtraction.
diff --git a/inform7/Figures/timings-diagnostics.txt b/inform7/Figures/timings-diagnostics.txt
index 8428455dc..7df9fb478 100644
--- a/inform7/Figures/timings-diagnostics.txt
+++ b/inform7/Figures/timings-diagnostics.txt
@@ -1,33 +1,33 @@
100.0% in inform7 run
- 70.5% in compilation to Inter
- 49.6% in //Sequence::undertake_queued_tasks//
- 4.9% in //MajorNodes::pre_pass//
- 3.5% in //MajorNodes::pass_1//
- 1.8% in //ImperativeDefinitions::assess_all//
- 1.4% in //RTKindConstructors::compile//
- 1.4% in //RTPhrasebook::compile_entries//
- 1.0% in //Sequence::lint_inter//
- 0.6% in //MajorNodes::pass_2//
- 0.6% in //Sequence::undertake_queued_tasks//
- 0.6% in //World::stage_V//
- 0.4% in //ImperativeDefinitions::compile_first_block//
- 0.4% in //Sequence::undertake_queued_tasks//
- 0.2% in //CompletionModule::compile//
- 0.2% in //InferenceSubjects::emit_all//
- 0.2% in //RTKindConstructors::compile_permissions//
- 0.2% in //Task::make_built_in_kind_constructors//
- 0.2% in //World::stages_II_and_III//
+ 70.0% in compilation to Inter
+ 49.7% in //Sequence::undertake_queued_tasks//
+ 4.8% in //MajorNodes::pre_pass//
+ 3.3% in //MajorNodes::pass_1//
+ 1.7% in //ImperativeDefinitions::assess_all//
+ 1.5% in //RTPhrasebook::compile_entries//
+ 1.3% in //RTKindConstructors::compile//
+ 0.9% in //Sequence::lint_inter//
+ 0.5% in //MajorNodes::pass_2//
+ 0.5% in //Sequence::undertake_queued_tasks//
+ 0.5% in //Sequence::undertake_queued_tasks//
+ 0.5% in //World::stage_V//
+ 0.3% in //ImperativeDefinitions::compile_first_block//
+ 0.1% in //CompletionModule::compile//
+ 0.1% in //InferenceSubjects::emit_all//
+ 0.1% in //RTKindConstructors::compile_permissions//
+ 0.1% in //Task::make_built_in_kind_constructors//
+ 0.1% in //World::stages_II_and_III//
2.9% not specifically accounted for
- 25.9% in running Inter pipeline
- 9.8% in step 14/15: generate inform6 -> auto.inf
- 5.7% in step 5/15: load-binary-kits
- 5.3% in step 6/15: make-synoptic-module
- 1.8% in step 9/15: make-identifiers-unique
- 0.4% in step 12/15: eliminate-redundant-operations
- 0.4% in step 4/15: compile-splats
- 0.4% in step 7/15: shorten-wiring
- 0.2% in step 11/15: eliminate-redundant-labels
- 0.2% in step 8/15: detect-indirect-calls
+ 26.2% in running Inter pipeline
+ 10.0% in step 14/15: generate inform6 -> auto.inf
+ 5.8% in step 5/15: load-binary-kits
+ 5.4% in step 6/15: make-synoptic-module
+ 1.7% in step 9/15: make-identifiers-unique
+ 0.3% in step 12/15: eliminate-redundant-operations
+ 0.3% in step 4/15: compile-splats
+ 0.3% in step 7/15: shorten-wiring
+ 0.3% in step 8/15: detect-indirect-calls
+ 0.1% in step 11/15: eliminate-redundant-labels
1.4% not specifically accounted for
- 3.0% in supervisor
- 0.5% not specifically accounted for
+ 3.1% in supervisor
+ 0.6% not specifically accounted for
diff --git a/inter/pipeline-module/Chapter 3/Compile Splats Stage.w b/inter/pipeline-module/Chapter 3/Compile Splats Stage.w
index bbe2a0bc4..561912b75 100644
--- a/inter/pipeline-module/Chapter 3/Compile Splats Stage.w
+++ b/inter/pipeline-module/Chapter 3/Compile Splats Stage.w
@@ -165,21 +165,21 @@ meaningfully have a value, even though a third token is present.
@ =
text_stream *S = SplatInstruction::splatter(P);
if (directive == VERB_PLM) {
- if (Regexp::match(&mr, S, L" *%C+ (%c*?) *;%c*")) {
+ if (Regexp::match(&mr, S, L" *%C+ (%c*?) *; *")) {
raw_identifier = I"assim_gv"; value = mr.exp[0];
} else {
LOG("Unable to parse start of VERB_PLM: '%S'\n", S); proceed = FALSE;
}
} else {
- if (Regexp::match(&mr, S, L" *%C+ *(%C+?)(--> *%c*?) *;%c*")) {
+ if (Regexp::match(&mr, S, L" *%C+ *(%C+?)(--> *%c*?) *; *")) {
raw_identifier = mr.exp[0]; value = mr.exp[1];
- } else if (Regexp::match(&mr, S, L" *%C+ *(%C+?)(-> *%c*?) *;%c*")) {
+ } else if (Regexp::match(&mr, S, L" *%C+ *(%C+?)(-> *%c*?) *; *")) {
raw_identifier = mr.exp[0]; value = mr.exp[1];
- } else if (Regexp::match(&mr, S, L" *%C+ (%C*?) *;%c*")) {
+ } else if (Regexp::match(&mr, S, L" *%C+ (%C*?) *; *")) {
raw_identifier = mr.exp[0];
- } else if (Regexp::match(&mr, S, L" *%C+ (%C*) *= *(%c*?) *;%c*")) {
+ } else if (Regexp::match(&mr, S, L" *%C+ (%C*) *= *(%c*?) *; *")) {
raw_identifier = mr.exp[0]; value = mr.exp[1];
- } else if (Regexp::match(&mr, S, L" *%C+ (%C*) (%c*?) *;%c*")) {
+ } else if (Regexp::match(&mr, S, L" *%C+ (%C*) (%c*?) *; *")) {
raw_identifier = mr.exp[0]; value = mr.exp[1];
} else {
LOG("Unable to parse start of constant: '%S'\n", S); proceed = FALSE;
@@ -431,6 +431,9 @@ first to work out which of the several array formats this is, then the contents
conts = mr.exp[0]; bounded = TRUE;
} else if (Regexp::match(&mr, value, L" *buffer *(%c*?) *")) {
conts = mr.exp[0]; as_bytes = TRUE; bounded = TRUE;
+ } else if (Regexp::match(&mr, value, L" *string *(%c*?) *")) {
+ LOG("Identifier = <%S>, Value = <%S>", identifier, value);
+ PipelineErrors::kit_error("Inform 6 'string' arrays are unsupported", NULL);
} else {
LOG("Identifier = <%S>, Value = <%S>", identifier, value);
PipelineErrors::kit_error("invalid Inform 6 array declaration", NULL);
@@ -450,33 +453,81 @@ support that here: the standard Inform kits do not need it, and it's hard to
see why other kits would, either.
@ =
+ match_results mr = Regexp::create_mr();
+ if (Regexp::match(&mr, conts, L" *%[ *(%c*?) *%] *"))
+ @
+ else
+ @;
+ Regexp::dispose_of(&mr);
+
+@ =
+ text_stream *entries = mr.exp[0];
+ int sq = FALSE, dq = FALSE, from = 0;
+ for (int i=0; i;
+ from = i+1;
+ }
+ if ((c == '\'') && (dq == FALSE)) {
+ if (sq == FALSE) sq = TRUE;
+ else if ((sq) && (Str::get_at(entries, i-1) != '\\')) sq = FALSE;
+ }
+ if ((c == '\"') && (sq == FALSE)) {
+ if (dq == FALSE) dq = TRUE;
+ else dq = FALSE;
+ }
+ }
+ if (Str::len(entries) > from) {
+ int to = Str::len(entries) - 1;
+ @;
+ }
+
+@ =
+ text_stream *full_conts = entries;
+ if (from > to) {
+ PipelineErrors::kit_error("Inform 6 array contains empty entry", NULL);
+ } else {
+ int count_before = no_assimilated_array_entries;
+ TEMPORARY_TEXT(conts)
+ for (int j=from; j<=to; j++) PUT_TO(conts, Str::get_at(full_conts, j));
+ @
+ DISCARD_TEXT(conts)
+ if (no_assimilated_array_entries > count_before+1)
+ PipelineErrors::kit_error(
+ "Multiple entries between ';' markers in a '[ ...; ...; ... ]' array", NULL);
+ }
+
+@ =
string_position spos = Str::start(conts);
int finished = FALSE;
while (finished == FALSE) {
TEMPORARY_TEXT(value)
@;
- if (Str::eq(value, I"+"))
- PipelineErrors::kit_error("Inform 6 array declaration using operator '+' "
- "(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
- else if (Str::eq(value, I"-"))
- PipelineErrors::kit_error("Inform 6 array declaration using operator '-' "
- "(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
- else if (Str::eq(value, I"*"))
- PipelineErrors::kit_error("Inform 6 array declaration using operator '*' "
- "(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
- else if (Str::eq(value, I"/"))
- PipelineErrors::kit_error("Inform 6 array declaration using operator '/' "
- "(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
- else {
- if (Str::len(value) > 0) {
- inter_pair val = InterValuePairs::undef();
- @;
- @;
- } else finished = TRUE;
- }
+ if (Str::len(value) > 0) @ else finished = TRUE;
DISCARD_TEXT(value)
}
+@ =
+ if (Str::eq(value, I"+"))
+ PipelineErrors::kit_error("Inform 6 array declaration using operator '+' "
+ "(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
+ else if (Str::eq(value, I"-"))
+ PipelineErrors::kit_error("Inform 6 array declaration using operator '-' "
+ "(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
+ else if (Str::eq(value, I"*"))
+ PipelineErrors::kit_error("Inform 6 array declaration using operator '*' "
+ "(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
+ else if (Str::eq(value, I"/"))
+ PipelineErrors::kit_error("Inform 6 array declaration using operator '/' "
+ "(use brackets '(' ... ')' around the size for a calculated array size)", NULL);
+ else {
+ inter_pair val = InterValuePairs::undef();
+ @;
+ @;
+ }
+
@ In command grammar introduced by |Verb|, the tokens |*| and |/| can occur
without having any arithmetic meaning, so they must not be rejected. That's
really why we treat this case as different, though we also treat keywords
@@ -1117,8 +1168,9 @@ before they are needed.
@ =
inter_schema *sch = ParsingSchemas::from_text(S);
+ int excess_tokens = FALSE;
inter_symbol *result_s =
- CompileSplatsStage::compute_r(step, IBM, sch->node_tree);
+ CompileSplatsStage::compute_r(step, IBM, sch->node_tree, &excess_tokens);
if (result_s == NULL) {
PipelineErrors::kit_error("Inform 6 constant too complex", S);
return InterValuePairs::number(1);
@@ -1130,9 +1182,10 @@ reducing unary subtraction to a case of binary subtraction.
=
inter_symbol *CompileSplatsStage::compute_r(pipeline_step *step,
- inter_bookmark *IBM, inter_schema_node *isn) {
+ inter_bookmark *IBM, inter_schema_node *isn, int *excess_tokens) {
+ if (isn == NULL) return NULL;
if (isn->isn_type == SUBEXPRESSION_ISNT)
- return CompileSplatsStage::compute_r(step, IBM, isn->child_node);
+ return CompileSplatsStage::compute_r(step, IBM, isn->child_node, excess_tokens);
if (isn->isn_type == OPERATION_ISNT) {
inter_ti op = 0;
if (isn->isn_clarifier == PLUS_BIP) op = CONST_LIST_FORMAT_SUM;
@@ -1145,20 +1198,20 @@ inter_symbol *CompileSplatsStage::compute_r(pipeline_step *step,
}
if (isn->isn_type == EXPRESSION_ISNT) {
inter_schema_token *t = isn->expression_tokens;
- if ((t == NULL) || (t->next)) internal_error("malformed EXPRESSION_ISNT");
+ if ((t == NULL) || (t->next)) { *excess_tokens = TRUE; return NULL; }
return CompileSplatsStage::compute_eval(step, IBM, t);
}
return NULL;
}
@ =
- inter_symbol *i1 = CompileSplatsStage::compute_r(step, IBM, isn->child_node);
- inter_symbol *i2 = CompileSplatsStage::compute_r(step, IBM, isn->child_node->next_node);
+ inter_symbol *i1 = CompileSplatsStage::compute_r(step, IBM, isn->child_node, excess_tokens);
+ inter_symbol *i2 = CompileSplatsStage::compute_r(step, IBM, isn->child_node->next_node, excess_tokens);
if ((i1 == NULL) || (i2 == NULL)) return NULL;
return CompileSplatsStage::compute_binary_op(op, step, IBM, i1, i2);
@ =
- inter_symbol *i2 = CompileSplatsStage::compute_r(step, IBM, isn->child_node);
+ inter_symbol *i2 = CompileSplatsStage::compute_r(step, IBM, isn->child_node, excess_tokens);
if (i2 == NULL) return NULL;
return CompileSplatsStage::compute_binary_op(CONST_LIST_FORMAT_DIFFERENCE, step, IBM, NULL, i2);
From a1d0a7bda8dbba39257f33ff17619f3f732371dc Mon Sep 17 00:00:00 2001
From: Graham Nelson
Date: Sun, 23 Apr 2023 23:17:56 +0100
Subject: [PATCH 012/113] Updated notes
---
notes/release/pending.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/notes/release/pending.md b/notes/release/pending.md
index f552b9c21..2dd8f1d07 100644
--- a/notes/release/pending.md
+++ b/notes/release/pending.md
@@ -18,6 +18,9 @@ These will be added to release notes when the release is made.
## Bug fixes
+- Fix for Jira bug [I7-2335](https://inform7.atlassian.net/browse/I7-2335)
+ "Several previously-legal forms of the Array directive no longer work in I6 inclusions in 10.1.2"
+ ([commit 4d97b49](https://github.com/ganelson/inform/commit/4d97b499cfd3e15650d1bba1e6e8c70c24a01fb2))
- Fix for Jira bug [I7-2334](https://inform7.atlassian.net/browse/I7-2334)
"imbalanced parentheses in Definition by I6 Condition causes abject failure"
([commit 5d45863](https://github.com/ganelson/inform/commit/5d4586387c6b7405cd45e43f04c984583cd76bb3))
From 8d9283124995c5675dd5acfb5fa306d114ea7909 Mon Sep 17 00:00:00 2001
From: Graham Nelson
Date: Tue, 25 Apr 2023 10:37:50 +0100
Subject: [PATCH 013/113] Improved error reporting on kit and insertion code
---
README.md | 2 +-
build.txt | 4 +-
docs/bytecode-module/1-tiv.html | 6 +-
docs/bytecode-module/2-in.html | 6 +-
docs/bytecode-module/3-ie.html | 2 +-
docs/bytecode-module/4-tic.html | 64 +++++++++---
docs/bytecode-module/5-tsc.html | 45 +++++++--
docs/core-module/1-wtc.html | 4 +-
docs/core-module/2-pwst.html | 93 ++++++++++++++++++
docs/pipeline-module/2-pe.html | 52 +++++-----
docs/pipeline-module/3-css.html | 13 +++
docs/pipeline-module/3-ps.html | 84 ++++++++++++----
docs/problems-module/2-pl1.html | 35 ++++++-
docs/problems-module/2-pl2.html | 78 ++++++++++-----
docs/runtime-module/2-emt.html | 11 ++-
docs/supervisor-module/3-is.html | 10 +-
docs/supervisor-module/6-st.html | 16 ++-
docs/words-module/3-lxr.html | 4 +
.../supervisor-module/Chapter 3/Inter Skill.w | 10 +-
.../supervisor-module/Chapter 6/Source Text.w | 16 ++-
inform7/Figures/memory-diagnostics.txt | 16 +--
inform7/Figures/timings-diagnostics.txt | 56 +++++------
.../BasicInformExtrasKit/kit_metadata.json | 2 +-
.../Inter/BasicInformKit/kit_metadata.json | 2 +-
.../Inter/CommandParserKit/kit_metadata.json | 2 +-
.../Internal/Inter/DialogueKit/arch-16.interb | Bin 112240 -> 112240 bytes
.../Inter/DialogueKit/arch-16d.interb | Bin 112261 -> 112261 bytes
.../Internal/Inter/DialogueKit/arch-32.interb | Bin 112404 -> 112404 bytes
.../Inter/DialogueKit/arch-32d.interb | Bin 112425 -> 112425 bytes
.../Inter/EnglishLanguageKit/arch-16.interb | Bin 20753 -> 20753 bytes
.../Inter/EnglishLanguageKit/arch-16d.interb | Bin 20774 -> 20774 bytes
.../Inter/EnglishLanguageKit/arch-32.interb | Bin 20759 -> 20759 bytes
.../Inter/EnglishLanguageKit/arch-32d.interb | Bin 20780 -> 20780 bytes
.../EnglishLanguageKit/kit_metadata.json | 2 +-
.../Inter/WorldModelKit/kit_metadata.json | 2 +-
.../Chapter 2/Problems With Source Text.w | 92 +++++++++++++++++
inform7/runtime-module/Chapter 2/Emit.w | 11 ++-
.../Invalid/_Results_Ideal/inversion.txt | 2 +-
.../Chapter 1/The Inter Version.w | 5 +-
.../Chapter 4/The Insert Construct.w | 62 +++++++++---
.../Chapter 5/The Splat Construct.w | 45 +++++++--
.../Chapter 2/Pipeline Errors.w | 42 ++++----
.../Chapter 3/Compile Splats Stage.w | 13 +++
.../Chapter 3/Parsing Stages.w | 53 +++++++++-
.../Chapter 2/Problems, Level 1.w | 25 +++++
.../Chapter 2/Problems, Level 2.w | 31 +++++-
services/words-module/Chapter 3/Lexer.w | 4 +
47 files changed, 824 insertions(+), 198 deletions(-)
diff --git a/README.md b/README.md
index a6edab434..1cbd09bb8 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Inform 7
-[Version](notes/versioning.md): 10.2.0-beta+6W36 'Krypton' (23 April 2023)
+[Version](notes/versioning.md): 10.2.0-beta+6W37 'Krypton' (25 April 2023)
## About Inform
diff --git a/build.txt b/build.txt
index b42abe7dc..69d40f175 100644
--- a/build.txt
+++ b/build.txt
@@ -1,3 +1,3 @@
Prerelease: beta
-Build Date: 23 April 2023
-Build Number: 6W36
+Build Date: 25 April 2023
+Build Number: 6W37
diff --git a/docs/bytecode-module/1-tiv.html b/docs/bytecode-module/1-tiv.html
index 5cb01a73c..087e7cd89 100644
--- a/docs/bytecode-module/1-tiv.html
+++ b/docs/bytecode-module/1-tiv.html
@@ -121,12 +121,16 @@ represent new data structures with custom kind constructors from Neptune files
in Inform kits.
+
5.0.0 (24 April 2023) added (further) new fields to SPLAT_IST instructions, to
+record their provenance and so make better error reporting possible.
+
+
§3. Anyway, the implementation, such as it is:
semantic_version_numberInterVersion::current(void) {
-semantic_version_numberV = VersionNumbers::from_text(I"4.0.0");
+semantic_version_numberV = VersionNumbers::from_text(I"5.0.0");if (VersionNumbers::is_null(V)) internal_error("malformed version number");returnV;}
diff --git a/docs/bytecode-module/2-in.html b/docs/bytecode-module/2-in.html
index abfdfc0ca..320ad9fc6 100644
--- a/docs/bytecode-module/2-in.html
+++ b/docs/bytecode-module/2-in.html
@@ -190,7 +190,7 @@ call those creator functions, not these.
returnP;}
-inter_tree_node *Inode::new_with_2_data_fields(inter_bookmark *IBM, intS,
+inter_tree_node *Inode::new_with_2_data_fields(inter_bookmark *IBM, intS,inter_tiV1, inter_tiV2, inter_error_location *eloc, inter_tilevel) {inter_tree *I = InterBookmark::tree(IBM);inter_tree_node *P = Inode::new_node(InterTree::warehouse(I), I, 4,
@@ -215,7 +215,7 @@ call those creator functions, not these.
returnP;}
-inter_tree_node *Inode::new_with_4_data_fields(inter_bookmark *IBM, intS,
+inter_tree_node *Inode::new_with_4_data_fields(inter_bookmark *IBM, intS,inter_tiV1, inter_tiV2, inter_tiV3, inter_tiV4, inter_error_location *eloc,inter_tilevel) {inter_tree *I = InterBookmark::tree(IBM);
@@ -246,7 +246,7 @@ call those creator functions, not these.
returnP;}
-inter_tree_node *Inode::new_with_6_data_fields(inter_bookmark *IBM, intS,
+inter_tree_node *Inode::new_with_6_data_fields(inter_bookmark *IBM, intS,inter_tiV1, inter_tiV2, inter_tiV3, inter_tiV4, inter_tiV5, inter_tiV6,inter_error_location *eloc, inter_tilevel) {inter_tree *I = InterBookmark::tree(IBM);
diff --git a/docs/bytecode-module/3-ie.html b/docs/bytecode-module/3-ie.html
index 78aa2a37f..03dbe057c 100644
--- a/docs/bytecode-module/3-ie.html
+++ b/docs/bytecode-module/3-ie.html
@@ -71,7 +71,7 @@ where an error has occurred, in reading in Inter either from a text or binary fi
size_terror_offset;} inter_error_location;
-
The structure inter_error_location is accessed in 2/it, 3/iibf and here.
+
The structure inter_error_location is accessed in 2/it, 3/iibf, 5/tsc and here.
§2. These two possibilities have two creators. Note that neither of these requires
any memory to be allocated, so they return quickly and cannot cause memory leaks.
So it's no problem to manufacture an inter_error_location for each location
diff --git a/docs/bytecode-module/4-tic.html b/docs/bytecode-module/4-tic.html
index cc2090515..2a1df780d 100644
--- a/docs/bytecode-module/4-tic.html
+++ b/docs/bytecode-module/4-tic.html
@@ -59,7 +59,7 @@ function togglePopup(material_id) {
§1. Definition. For what this does and why it is used, see Data Packages in Textual Inter (in inter).
But please use it as little as possible: in an ideal world it would be abolished.
@@ -68,8 +68,8 @@ But please use it as little as possible: in an ideal world it would be abolished
diff --git a/docs/bytecode-module/3-iibf.html b/docs/bytecode-module/3-iibf.html
index be36659fa..41e575dd7 100644
--- a/docs/bytecode-module/3-iibf.html
+++ b/docs/bytecode-module/3-iibf.html
@@ -1051,7 +1051,7 @@ the definition of any symbol created in the instruction to }
diff --git a/docs/bytecode-module/3-mtd.html b/docs/bytecode-module/3-mtd.html
index 47b25b3d3..25faf1dc5 100644
--- a/docs/bytecode-module/3-mtd.html
+++ b/docs/bytecode-module/3-mtd.html
@@ -215,7 +215,7 @@ must then be extracted):
}
Recording where fragments of text originally came from.
+
+
§1. Inter code sometimes needs to contain fragments of not-yet-parsed Inform 6
+syntax code, in the form of SPLAT_IST and INSERT_IST instructions. In order
+for it to be possible to relate errors in those fragments to the original text
+files they came from, we need to record their "provenance".
+
+
+
This is only a wrapper for saying something like "line 17 in whatever.txt".
+Line numbers count from 1 at the top of a text file.
+
§7. PLMs. At some point PLM stood for something, but what it was is now forgotten —
diff --git a/docs/bytecode-module/index.html b/docs/bytecode-module/index.html
index e6e3fe052..ec94aca4f 100644
--- a/docs/bytecode-module/index.html
+++ b/docs/bytecode-module/index.html
@@ -186,6 +186,11 @@
Inter Errors -
To issue error messages arising from loading incorrect Inter code from files.
+
+
+ Text Provenance -
+ Recording where fragments of text originally came from.