From 5e44d82c213580cf940fbad36b805396ede107ba Mon Sep 17 00:00:00 2001 From: Graham Nelson Date: Sun, 7 Apr 2024 13:00:23 +0100 Subject: [PATCH] Completed plumbing-in of IE-0010 on concepts --- README.md | 2 +- build.txt | 4 +- .../Inter/Architecture16Kit/kit_metadata.json | 2 +- .../Inter/Architecture32Kit/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 +- inform7/Tests/Test Cases/Cupid--I.txt | 14 +- inform7/Tests/Test Cases/Showtree--I.txt | 10 +- .../Tests/Test Internals/Index-Chart--I.txt | 394 +++++++++--------- inform7/Tests/Test Internals/Kinds--I.txt | 4 +- .../Test Problems/PM_KindsCircular--I.txt | 4 +- .../PM_TransposedNegationPair--I.txt | 4 +- .../PM_TransposedNegationPair2--I.txt | 4 +- .../Tests/Test Problems/PM_VarKOVClash--I.txt | 6 +- .../PM_VariableContradiction--I.txt | 4 +- .../Sections/Physical World Model.w | 36 +- .../Documentation/Writing with Inform.md | 55 ++- 19 files changed, 305 insertions(+), 248 deletions(-) diff --git a/README.md b/README.md index 4f754c32f..acc9e3a3a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Inform 7 -[Version](notes/versioning.md): 10.2.0-beta+6X40 'Krypton' (4 April 2024) +[Version](notes/versioning.md): 10.2.0-beta+6X41 'Krypton' (7 April 2024) ## About Inform diff --git a/build.txt b/build.txt index cf3928ea3..d1e800d8e 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ Prerelease: beta -Build Date: 4 April 2024 -Build Number: 6X40 +Build Date: 7 April 2024 +Build Number: 6X41 diff --git a/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json b/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json index ae4a2a1c9..5360b0155 100644 --- a/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json +++ b/inform7/Internal/Inter/Architecture16Kit/kit_metadata.json @@ -2,7 +2,7 @@ "is": { "type": "kit", "title": "Architecture16Kit", - "version": "10.2.0-beta+6X40" + "version": "10.2.0-beta+6X41" }, "compatibility": "16-bit", "kit-details": { diff --git a/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json b/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json index 9d07af95a..15bee505a 100644 --- a/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json +++ b/inform7/Internal/Inter/Architecture32Kit/kit_metadata.json @@ -2,7 +2,7 @@ "is": { "type": "kit", "title": "Architecture32Kit", - "version": "10.2.0-beta+6X40" + "version": "10.2.0-beta+6X41" }, "compatibility": "32-bit", "kit-details": { diff --git a/inform7/Internal/Inter/BasicInformKit/kit_metadata.json b/inform7/Internal/Inter/BasicInformKit/kit_metadata.json index f44d0dc38..4562c3005 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+6X40" + "version": "10.2.0-beta+6X41" }, "needs": [ { "need": { diff --git a/inform7/Internal/Inter/CommandParserKit/kit_metadata.json b/inform7/Internal/Inter/CommandParserKit/kit_metadata.json index d97e831f4..173b5a046 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+6X40" + "version": "10.2.0-beta+6X41" }, "needs": [ { "need": { diff --git a/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json b/inform7/Internal/Inter/EnglishLanguageKit/kit_metadata.json index 785cc54e1..d4f1fb977 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+6X40" + "version": "10.2.0-beta+6X41" }, "needs": [ { "need": { diff --git a/inform7/Internal/Inter/WorldModelKit/kit_metadata.json b/inform7/Internal/Inter/WorldModelKit/kit_metadata.json index 642874734..41ad75ffc 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+6X40" + "version": "10.2.0-beta+6X41" }, "needs": [ { "need": { diff --git a/inform7/Tests/Test Cases/Cupid--I.txt b/inform7/Tests/Test Cases/Cupid--I.txt index 426ede59b..76a809e9a 100644 --- a/inform7/Tests/Test Cases/Cupid--I.txt +++ b/inform7/Tests/Test Cases/Cupid--I.txt @@ -1,18 +1,18 @@ Temple of Cupid Emily will be given chocolates and flowers on 14 February. - (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 29) + (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 30) Kate will be given chocolates and flowers on 14 February. - (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 29) + (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 30) Helen will be given chocolates and flowers on 14 February. - (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 29) + (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 30) Emily will be given chocolates, flowers and a sports car on 14 February. - (BV###-->L### 2**6 1 ref = {chocolates, flowers and a sports car} of kind 29) + (BV###-->L### 2**6 1 ref = {chocolates, flowers and a sports car} of kind 30) Kate will be given chocolates and flowers on 14 February. - (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 29) + (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 30) Helen will be given chocolates and flowers on 14 February. - (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 29) + (BV###-->L### 2**4 resident = {chocolates and flowers} of kind 30) "Q" = list of texts: {"chocolates", "flowers", "a sports car"} - (BV###-->L### 2**6 2 refs = {chocolates, flowers and a sports car} of kind 29) + (BV###-->L### 2**6 2 refs = {chocolates, flowers and a sports car} of kind 30) "X" = text: Emily's apple (BV### = p"Emily's apple") diff --git a/inform7/Tests/Test Cases/Showtree--I.txt b/inform7/Tests/Test Cases/Showtree--I.txt index a1e159df8..5d2a9c7c8 100644 --- a/inform7/Tests/Test Cases/Showtree--I.txt +++ b/inform7/Tests/Test Cases/Showtree--I.txt @@ -16,7 +16,7 @@ You see nothing special about the red tree. >[3] showtree - (Compass object) (22) + (Compass object) (23) the north the northeast the northwest @@ -29,10 +29,10 @@ the down the inside the outside - (thedark object) (23) - (VPH_25) (24) - (VPH_3) (25) - Lab (39) + (thedark object) (24) + (VPH_26) (25) + (VPH_3) (26) + Lab (40) yourself a red tree a red envelope diff --git a/inform7/Tests/Test Internals/Index-Chart--I.txt b/inform7/Tests/Test Internals/Index-Chart--I.txt index bce49b025..417d685c0 100644 --- a/inform7/Tests/Test Internals/Index-Chart--I.txt +++ b/inform7/Tests/Test Internals/Index-Chart--I.txt @@ -76,7 +76,7 @@ - object [15]      + object [15]      north  @@ -109,6 +109,23 @@ + + concept      + + + nothing  + + + tick  + + + tick  + + + tick + + + room [1]       @@ -125,7 +142,7 @@ tick - + thing [2]      @@ -142,7 +159,7 @@ tick - + door [1]       @@ -159,9 +176,9 @@ tick - + - mystic portal [1]       + mystic portal [1]       Great Gates of Kiev  @@ -176,7 +193,7 @@ tick - + container      @@ -193,9 +210,26 @@ tick + + + vehicle       + + + nothing  + + + tick  + + + tick  + + + tick + + - vehicle       + player's holdall       nothing  @@ -211,23 +245,6 @@ - - player's holdall       - - - nothing  - - - tick  - - - tick  - - - tick - - - supporter      @@ -244,7 +261,7 @@ tick - + backdrop       @@ -261,7 +278,7 @@ tick - + person [1]       @@ -278,9 +295,26 @@ tick + + + man      + + + nothing  + + + tick  + + + tick  + + + tick + + - man      + woman      nothing  @@ -297,7 +331,7 @@ - woman      + animal      nothing  @@ -314,7 +348,7 @@ - animal      + device       nothing  @@ -330,23 +364,6 @@ - - device       - - - nothing  - - - tick  - - - tick  - - - tick - - - direction [12]       @@ -363,7 +380,7 @@ tick - + region       @@ -385,9 +402,26 @@ + + + number        + + + 0  + + + cross  + + + cross  + + + tick + + - number        + real number        0  @@ -404,24 +438,7 @@ - real number        - - - 0  - - - cross  - - - cross  - - - tick - - - - - time        + time        9:00 AM  @@ -436,9 +453,9 @@ tick - + - truth state       + truth state       false  @@ -453,9 +470,9 @@ tick - + - text      + text      ""  @@ -470,9 +487,9 @@ cross - + - snippet       + snippet       word 1 of command  @@ -487,9 +504,9 @@ cross - + - unicode character      + unicode character      unicode 32 (a space)  @@ -504,9 +521,9 @@ cross - + - action       + action       waiting  @@ -521,9 +538,9 @@ cross - + - scene  [1]      + scene  [1]      Entire Game  @@ -538,9 +555,9 @@ tick - + - command parser error [25]      + command parser error [25]      didn't understand error  @@ -555,9 +572,9 @@ tick - + - dynasty  [4]      + dynasty  [4]      Stuart  @@ -572,9 +589,9 @@ tick - + - use option      + use option      the ineffectual option  @@ -589,9 +606,9 @@ cross - + - response      + response      ?  @@ -606,9 +623,9 @@ cross - + - verb       + verb       verb be  @@ -623,9 +640,9 @@ cross - + - table name       + table name       a table with no rows or columns  @@ -640,9 +657,9 @@ cross - + - equation name      + equation name      an equation doing nothing  @@ -657,9 +674,9 @@ cross - + - rulebook outcome      + rulebook outcome      allow access  @@ -674,9 +691,26 @@ cross + + + external file       + + + a non-file  + + + tick  + + + tick  + + + tick + + - external file       + internal file      a non-file  @@ -693,24 +727,7 @@ - internal file      - - - a non-file  - - - tick  - - - tick  - - - tick - - - - - action name       + action name       waiting action  @@ -725,9 +742,9 @@ cross - + - figure name  [1]      + figure name  [1]      Figure of cover  @@ -742,9 +759,9 @@ tick - + - sound name       + sound name       a silent non-sound  @@ -764,7 +781,7 @@ - + natural language [1]      @@ -781,9 +798,9 @@ tick - + - grammatical tense  [5]      + grammatical tense  [5]      present tense  @@ -798,9 +815,9 @@ tick - + - narrative viewpoint  [6]      + narrative viewpoint  [6]      first person singular  @@ -815,9 +832,9 @@ tick - + - grammatical case  [2]      + grammatical case  [2]      nominative  @@ -832,9 +849,9 @@ tick - + - grammatical gender  [3]      + grammatical gender  [3]      neuter gender  @@ -876,73 +893,73 @@ - + - list of K       + list of K       { } - + - phrase K -> L      + phrase K -> L      always the default value of L - + - relation of K      + relation of K      a relation never holding - + - K based rule producing L       + K based rule producing L       the little-used do nothing rule - + - K based rulebook producing L       + K based rulebook producing L       the action-processing rules - + - activity on K       + activity on K       printing the name - + - description of K       + description of K       matching nothing - + - K valued property      + K valued property      -- - + - K valued table column      + K valued table column      -- @@ -954,7 +971,7 @@ -

object (plural objects)

+

object (plural objects)

Matches: value, sayable value
Objects are values intended to simulate physical things: places, people, things, and so on. They come in many kinds. The special value 'nothing' is also allowed, and can be used to mean 'no object at all'.
Usually singular-named not plural-named, improper-named not proper-named.
@@ -966,6 +983,9 @@ Objects are values intended to simulate physical things: places, people, things, conceptual, like ideas, or are needed for internal book-keeping.

+

concept (plural concepts)

+

+

room (plural rooms) 

Represents geographical locations, both indoor and outdoor, which are not necessarily areas in a building. A player in one @@ -999,7 +1019,7 @@ the long slide. Through the long slide is the cellar.').
Can have leading-through destination (object).

-

mystic portal (plural mystic portals) 

+

mystic portal (plural mystic portals) 

Great Gates of Kiev 

container (plural containers)

@@ -1012,7 +1032,7 @@ instead.
Can have carrying capacity (number).

-

vehicle (plural vehicles) 

+

vehicle (plural vehicles) 

Represents a container large enough for a person to enter, and which can then move between rooms at the driver's instruction. (If a supporter is needed instead, try the extension @@ -1021,7 +1041,7 @@ Rideable Vehicles by Graham Nelson.)
Usually fixed in place not portable.

-

player's holdall (plural player's holdalls) 

+

player's holdall (plural player's holdalls) 

Represents a container which the player can carry around as a sort of rucksack, into which spare items are automatically stowed away.
@@ -1057,25 +1077,25 @@ bartering with.
Can have carrying capacity (number).

yourself

-

man (plural men)

+

man (plural men)

Represents a man or boy.
Always male not female.
Never neuter.

-

woman (plural women)

+

woman (plural women)

Represents a woman or girl.
Always female not male.
Never neuter.

-

animal (plural animals)

+

animal (plural animals)

Represents an animal, or at any rate a non-human living creature reasonably large and possible to interact with: a giant Venus fly-trap might qualify, but not a patch of lichen.

-

device (plural devices) 

+

device (plural devices) 

Represents a machine or contrivance of some kind which can be switched on or off.
Usually switched off not switched on.
@@ -1111,46 +1131,46 @@ and are optional.


-

number (plural numbers) 

+

number (plural numbers) 

Matches: value, sayable value, understandable value, arithmetic value
Whole number in the range -32768, -32767, ..., -2, -1, 0, 1, 2, 3, ..., 32767: small numbers can be written textually as 'one', 'two', 'three', ..., 'ten', 'eleven', 'twelve'. (A much larger number range is allowed if we compile the source to Glulx rather than the Z-machine: see the Settings panel.)

-

real number (plural real numbers) 

+

real number (plural real numbers) 

Matches: value, sayable value, understandable value, arithmetic value, real arithmetic value
A real, or 'floating-point' number: the difference between this and ordinary "number" is that real numbers can hold values like 3.141, which aren't whole numbers, and can also hold very large or very small quantities in an approximate way. (Use of real numbers is only allowed if we compile the source to Glulx rather than the Z-machine: see the Settings panel.)

-

time (plural times) 

+

time (plural times) 

Matches: value, sayable value, understandable value, arithmetic value
A time of day, written in the form '2:34 AM' or '12:51 PM', or a length of time such as '10 minutes' or '3 hours 31 minutes', which must be between 0 minutes and 23 hours 59 minutes inclusive.

-

truth state (plural truth states) 

+

truth state (plural truth states) 

Matches: value, sayable value, understandable value
The state of whether something is 'true' or 'false'. (In other computing languages, this might be called 'boolean', after the 19th-century logician George Boole, who first realised this was a kind of value.)

-

text (plural texts)

+

text (plural texts)

Matches: value, sayable value
Some text in double quotation marks, perhaps with substitutions written in square brackets.

-

snippet (plural snippets) 

+

snippet (plural snippets) 

Matches: value, sayable value
A fragment of the player's most recent typed command, taking in a run of consecutive words.

-

unicode character (plural unicode characters)

+

unicode character (plural unicode characters)

Matches: value, sayable value
A single character - a letter or item of punctuation.

-

action (plural actions) 

+

action (plural actions) 

Matches: value, sayable value
A stored action, which can later be tried.

-

scene (plural scenes) 

+

scene (plural scenes) 

Matches: value, sayable value, understandable value, enumerated value
Like a scene in a play: a period of time which is usually tied to events in the plot. Scenes are created by sentences like 'Midnight Arrival is a scene.'
Usually non-recurring not recurring.
Can have description (text).

Entire Game

-

command parser error (plural command parser errors)

+

command parser error (plural command parser errors)

Matches: value, sayable value, understandable value, enumerated value

 25 command parser errors

-

dynasty  (plural dynasties)

+

dynasty  (plural dynasties)

Matches: value, sayable value, understandable value, enumerated value

Stuart , Hanover , Saxe-Coburg-Gotha , Windsor 

-

use option (plural use options)

+

use option (plural use options)

Matches: value, sayable value
One of the optional ways to configure Inform, such as the 'authorial modesty option'.

-

response (plural responses)

+

response (plural responses)

Matches: value, sayable value
One of the standard responses issued by the Standard Rules or other extensions.

-

verb (plural verbs) 

+

verb (plural verbs) 

Matches: value, sayable value
One of the verbs which Inform knows how to conjugate.

-

table name (plural table names) 

+

table name (plural table names) 

Matches: value, sayable value
Like tables of information in a book or newspaper, tables in Inform hold values which have been organised into rows and columns. A table name is just a single value, identifying which table is meant - say, 'Table of US Presidents' might be a table name value.

-

equation name (plural equation names)

+

equation name (plural equation names)

Matches: value
Like formulae in a textbook or a scientific paper, equations in Inform are written out in displayed form and given names.

-

rulebook outcome (plural rulebook outcomes)

+

rulebook outcome (plural rulebook outcomes)

Matches: value, sayable value

-

external file (plural external files) 

+

external file (plural external files) 

Matches: value, sayable value, understandable value, enumerated value
When made with the Glulx setting, an Inform project can make limited use of files stored on the computer which is operating the story at run-time. An external-file is just the name of one of these files (not the filename in the usual sense, but a name given to it in the Inform source text).

-

internal file (plural internal files)

+

internal file (plural internal files)

Matches: value, sayable value, understandable value, enumerated value
When made with the Glulx setting, an Inform project can make limited use of files held internally within the 'blorb' which makes up the story.

-

action name (plural action names) 

+

action name (plural action names) 

Matches: value, sayable value
An action is what happens when one of the people in the simulated world decides to do something. A full action would be something like 'dropping the box', but an action name is just the choice of which sort of thing is being done: here, it's 'the dropping action'. (Action names are always written with the word 'action' at the end, to make sure they aren't mistaken for full actions.)

-

figure name (plural figure names) 

+

figure name (plural figure names) 

Matches: value, sayable value, understandable value, enumerated value
When made with the Glulx setting, an Inform project can include images as well as words, and these are called figures. A figure name is just the name of one of the figures in the current project.

Figure of cover

-

sound name (plural sound names) 

+

sound name (plural sound names) 

Matches: value, sayable value, understandable value, enumerated value
When made with the Glulx setting, an Inform project can include sound effects or pieces of music. A sound name is just the name of one of these sounds in the current project.

@@ -1217,61 +1237,61 @@ When made with the Glulx setting, an Inform project can include sound effects or

Matches: value, sayable value, understandable value, enumerated value

English language

-

grammatical tense  (plural grammatical tenses)

+

grammatical tense  (plural grammatical tenses)

Matches: value, sayable value, understandable value, enumerated value

present tense , past tense , perfect tense , past perfect tense , future tense 

-

narrative viewpoint  (plural narrative viewpoints)

+

narrative viewpoint  (plural narrative viewpoints)

Matches: value, sayable value, understandable value, enumerated value

first person singular , second person singular , third person singular , first person plural , second person plural , third person plural 

-

grammatical case  (plural grammatical cases)

+

grammatical case  (plural grammatical cases)

Matches: value, sayable value, understandable value, enumerated value

nominative , accusative 

-

grammatical gender  (plural grammatical genders)

+

grammatical gender  (plural grammatical genders)

Matches: value, sayable value, understandable value, enumerated value

neuter gender , masculine gender , feminine gender 


-

list of K (plural lists of K) 

+

list of K (plural lists of K) 

covariant 

Matches: value, sayable value
A flexible-length list of values, where all of the items have to have the same kind of value as each other - for instance, a list of rooms, or a list of lists of numbers. The empty list, with no items yet, is written { }, and a list with items in is written with commas dividing them - say {2, 5, 9}.

-

phrase K -> L (plural phrases K -> L)

+

phrase K -> L (plural phrases K -> L)

contravariant in K, covariant in L 

Matches: value, sayable value

-

relation of K (plural relations of K)

+

relation of K (plural relations of K)

covariant 

Matches: value, sayable value

-

K based rule producing L (plural K based rules producing L

+

K based rule producing L (plural K based rules producing L

contravariant in K, covariant in L 

Matches: value, sayable value
One of many, many rules which determine what happens during play. Rules can be triggered by scenes beginning or ending, by certain actions, at certain times, or in the course of carrying out certain activities.

-

K based rulebook producing L (plural K based rulebooks producing L

+

K based rulebook producing L (plural K based rulebooks producing L

contravariant in K, covariant in L 

Matches: value, sayable value
A list of rules to follow, in sequence, to get something done. A rulebook is like a ring-binder, with the individual rules as sheets of paper. Inform normally sorts these into their 'natural' order, with the most specific rules first, but it's easy to shuffle the pages if you need to. When some task is carried out during play, Inform is normally working through a rulebook, turning the pages one by one.

-

activity on K (plural activities on K

+

activity on K (plural activities on K

contravariant 

Matches: value
An activity is something which Inform does as part of the mechanics of play - for instance, printing the name of an object, which Inform often has to do. An activity can happen by itself ('printing the banner text', for instance) or can be applied to an object ('printing the name of something', say).

-

description of K (plural descriptions of K) 

+

description of K (plural descriptions of K) 

covariant 

Matches: value
A description of a set of values, where all of the items have to have the same kind of value as each other - for instance, 'even numbers' or 'open doors which are in lighted rooms'.

-

K valued property (plural K valued properties)

+

K valued property (plural K valued properties)

covariant 

Matches: value

-

K valued table column (plural K valued table columns)

+

K valued table column (plural K valued table columns)

covariant 

Matches: value

diff --git a/inform7/Tests/Test Internals/Kinds--I.txt b/inform7/Tests/Test Internals/Kinds--I.txt index f5cb2dd77..f1e340022 100644 --- a/inform7/Tests/Test Internals/Kinds--I.txt +++ b/inform7/Tests/Test Internals/Kinds--I.txt @@ -31,7 +31,7 @@ description of values <= value, stored value property <= value, stored value table column <= value, stored value combination value and value <= value, stored value, sayable value, pointer value -nothing <= value, stored value, sayable value, understandable value, arithmetic value, real arithmetic value, enumerated value, pointer value, object, number, real number, truth state, text, snippet, unicode character, use option, response, verb, table name, equation name, rulebook outcome, phrase value -> value, values variable-pointer, relation of values, values based rule producing values, values based rulebook producing values, activity on values, list of nothing, description of values, property, table column, combination value and value, , nothing, value, value, external file, internal file, described action, action, action name, time, scene, figure name, sound name, topic, abstract object, natural language, grammatical tense, narrative viewpoint, grammatical case, grammatical gender, room, thing, direction, door, container, supporter, backdrop, person, region, man, woman, animal, device, vehicle, player's holdall, command parser error +nothing <= value, stored value, sayable value, understandable value, arithmetic value, real arithmetic value, enumerated value, pointer value, object, number, real number, truth state, text, snippet, unicode character, use option, response, verb, table name, equation name, rulebook outcome, phrase value -> value, values variable-pointer, relation of values, values based rule producing values, values based rulebook producing values, activity on values, list of nothing, description of values, property, table column, combination value and value, , nothing, value, value, external file, internal file, described action, action, action name, time, scene, figure name, sound name, topic, abstract object, natural language, grammatical tense, narrative viewpoint, grammatical case, grammatical gender, room, thing, direction, door, container, supporter, backdrop, person, region, concept, man, woman, animal, device, vehicle, player's holdall, command parser error <= value nothing <= value value, value <= value @@ -60,6 +60,7 @@ supporter <= value, stored value, sayable value, object, thing backdrop <= value, stored value, sayable value, object, thing person <= value, stored value, sayable value, object, thing region <= value, stored value, sayable value, object +concept <= value, stored value, sayable value, object, abstract object man <= value, stored value, sayable value, object, thing, person woman <= value, stored value, sayable value, object, thing, person animal <= value, stored value, sayable value, object, thing, person @@ -138,6 +139,7 @@ supporter -> thing -> object -> sayable value -> stored value -> value -> backdrop -> thing -> object -> sayable value -> stored value -> value -> person -> thing -> object -> sayable value -> stored value -> value -> region -> object -> sayable value -> stored value -> value -> +concept -> abstract object -> object -> sayable value -> stored value -> value -> man -> person -> thing -> object -> sayable value -> stored value -> value -> woman -> person -> thing -> object -> sayable value -> stored value -> value -> animal -> person -> thing -> object -> sayable value -> stored value -> value -> diff --git a/inform7/Tests/Test Problems/PM_KindsCircular--I.txt b/inform7/Tests/Test Problems/PM_KindsCircular--I.txt index f2a2dc949..102155f00 100644 --- a/inform7/Tests/Test Problems/PM_KindsCircular--I.txt +++ b/inform7/Tests/Test Problems/PM_KindsCircular--I.txt @@ -2,10 +2,10 @@ Inform 7 v10.2.0 has started. I've now read your source text, which is 11 words long. I've also read version 2 of Basic Inform by Graham Nelson, which is 8538 words long. I've also read version 2 of English Language by Graham Nelson, which is 2330 words long. -I've also read version 7 of Standard Rules by Graham Nelson, which is 34998 words long. +I've also read version 7 of Standard Rules by Graham Nelson, which is 35036 words long. Problem__ PM_KindsCircular >--> You wrote 'A person is a kind of animal' (source text, line 3), but that - seems to contradict 'An animal is a kind of person' (the Standard Rules, line 357), + seems to contradict 'An animal is a kind of person' (the Standard Rules, line 356), as it would make a circularity with an animal and a thing each being kinds of the other. Inform 7 has finished. diff --git a/inform7/Tests/Test Problems/PM_TransposedNegationPair--I.txt b/inform7/Tests/Test Problems/PM_TransposedNegationPair--I.txt index b8a8332d4..a216c821b 100644 --- a/inform7/Tests/Test Problems/PM_TransposedNegationPair--I.txt +++ b/inform7/Tests/Test Problems/PM_TransposedNegationPair--I.txt @@ -2,7 +2,7 @@ Inform 7 v10.2.0 has started. I've now read your source text, which is 12 words long. I've also read version 2 of Basic Inform by Graham Nelson, which is 8538 words long. I've also read version 2 of English Language by Graham Nelson, which is 2330 words long. -I've also read version 7 of Standard Rules by Graham Nelson, which is 34998 words long. +I've also read version 7 of Standard Rules by Graham Nelson, which is 35036 words long. Problem__ PM_TransposedNegationPair >--> In 'A door is either opaque or transparent' (source text, line 3), you proposed to set up the properties 'opaque' and 'transparent' as opposites @@ -10,7 +10,7 @@ Problem__ PM_TransposedNegationPair opposites, but the other way around. (This matters because it affects whether things not explicitly said to be either should be opaque or transparent. Here you imply transparent is the default, but in the previous - declaration 'A container can be transparent or opaque' (the Standard Rules, line 268), + declaration 'A container can be transparent or opaque' (the Standard Rules, line 267), opaque was.) Putting these two property names the other way around should fix it. Inform 7 has finished. diff --git a/inform7/Tests/Test Problems/PM_TransposedNegationPair2--I.txt b/inform7/Tests/Test Problems/PM_TransposedNegationPair2--I.txt index 9dbba604c..dff3d73e5 100644 --- a/inform7/Tests/Test Problems/PM_TransposedNegationPair2--I.txt +++ b/inform7/Tests/Test Problems/PM_TransposedNegationPair2--I.txt @@ -2,12 +2,12 @@ Inform 7 v10.2.0 has started. I've now read your source text, which is 10 words long. I've also read version 2 of Basic Inform by Graham Nelson, which is 8538 words long. I've also read version 2 of English Language by Graham Nelson, which is 2330 words long. -I've also read version 7 of Standard Rules by Graham Nelson, which is 34998 words long. +I've also read version 7 of Standard Rules by Graham Nelson, which is 35036 words long. Problem__ PM_TransposedNegationPair2 >--> In 'A door can be opaque' (source text, line 3), you proposed to set up the property 'opaque' as something which is sometimes held and sometimes not, but by default is not. However, that clashes with the existing - declaration 'A container can be transparent or opaque' (the Standard Rules, line 268), + declaration 'A container can be transparent or opaque' (the Standard Rules, line 267), which establishes that opaque is the opposite of transparent, and is held by default. (The simplest way to fix this is just to change 'opaque' to 'transparent' in your sentence here.) diff --git a/inform7/Tests/Test Problems/PM_VarKOVClash--I.txt b/inform7/Tests/Test Problems/PM_VarKOVClash--I.txt index 5fa40eb7a..7f9b8b320 100644 --- a/inform7/Tests/Test Problems/PM_VarKOVClash--I.txt +++ b/inform7/Tests/Test Problems/PM_VarKOVClash--I.txt @@ -2,13 +2,13 @@ Inform 7 v10.2.0 has started. I've now read your source text, which is 46 words long. I've also read version 2 of Basic Inform by Graham Nelson, which is 8538 words long. I've also read version 2 of English Language by Graham Nelson, which is 2330 words long. -I've also read version 7 of Standard Rules by Graham Nelson, which is 34998 words long. +I've also read version 7 of Standard Rules by Graham Nelson, which is 35036 words long. Problem__ PM_VarKOVClash In Part Three - Variables and Rulebooks, Chapter 1 - Variables, Section 3 - Used when ruling on accessibility in the extension Standard Rules by Graham Nelson: >--> You wrote 'The container in question is an object that varies' (the - Standard Rules, line 471): but the name supplied for this new variable is a + Standard Rules, line 470): but the name supplied for this new variable is a piece of text which is not available because it has a rival meaning already, as a result of definitions made elsewhere. (Sometimes these are indirect: for instance, defining a column in a table called 'question' can @@ -19,7 +19,7 @@ In Part Three - Variables and Rulebooks, Chapter 1 - Variables, Section 3 - defined which might cause this clash. Problem__ PM_VarKOVClash >--> You wrote 'The supporter in question is an object that varies' (the - Standard Rules, line 472): again, the name supplied for this new variable + Standard Rules, line 471): again, the name supplied for this new variable is a piece of text which is not available because it has a rival meaning already. Inform 7 has finished. diff --git a/inform7/Tests/Test Problems/PM_VariableContradiction--I.txt b/inform7/Tests/Test Problems/PM_VariableContradiction--I.txt index 4140ae7b8..1fab48015 100644 --- a/inform7/Tests/Test Problems/PM_VariableContradiction--I.txt +++ b/inform7/Tests/Test Problems/PM_VariableContradiction--I.txt @@ -2,11 +2,11 @@ Inform 7 v10.2.0 has started. I've now read your source text, which is 15 words long. I've also read version 2 of Basic Inform by Graham Nelson, which is 8538 words long. I've also read version 2 of English Language by Graham Nelson, which is 2330 words long. -I've also read version 7 of Standard Rules by Graham Nelson, which is 34998 words long. +I've also read version 7 of Standard Rules by Graham Nelson, which is 35036 words long. Problem__ PM_VariableContradiction >--> You wrote 'The command prompt is "What do you want to do? >"' (source text, line 3), but in another sentence 'The command prompt is ">"' (the - Standard Rules, line 496): but this looks like a contradiction, because the + Standard Rules, line 495): but this looks like a contradiction, because the initial value of this variable seems to be being set in each of these sentences, but with a different outcome. Inform 7 has finished. diff --git a/inform7/extensions/standard_rules/Sections/Physical World Model.w b/inform7/extensions/standard_rules/Sections/Physical World Model.w index 46ed6c6fd..a044b128d 100644 --- a/inform7/extensions/standard_rules/Sections/Physical World Model.w +++ b/inform7/extensions/standard_rules/Sections/Physical World Model.w @@ -168,20 +168,29 @@ Chapter 2 - Kinds for the Physical World Section 1 - Kind Definitions -A room is a kind. -A thing is a kind. -A direction is a kind. +A room is a kind of object. +A thing is a kind of object. +A direction is a kind of object. A door is a kind of thing. A container is a kind of thing. A supporter is a kind of thing. A backdrop is a kind of thing. The plural of person is people. The plural of person is persons. A person is a kind of thing. -A region is a kind. +A region is a kind of object. + +A concept is a kind of abstract object. + +A room can be privately-named or publicly-named. A room is usually publicly-named. +A thing can be privately-named or publicly-named. A thing is usually publicly-named. +A direction can be privately-named or publicly-named. A direction is usually +publicly-named. +A region can be privately-named or publicly-named. A region is usually publicly-named. +A concept can be privately-named or publicly-named. A concept is usually publicly-named. @ At this point, then, the hierarchy looks like so: = (text) - kind + object room thing door @@ -191,6 +200,8 @@ A region is a kind. person direction region + abstract object + concept = This framework is the minimum kit needed in order for Inform to be able to manage the spatial relationships arising from its basic verbs. Room and thing @@ -209,13 +220,8 @@ Although further kinds will be created later ("vehicle", for instance), those are merely design choices, and Inform would not be troubled by their absence. -@ - -= -Section 1a - Concepts (for concepts language element only) - -A concept is a kind. -A concept can be privately-named or publicly-named. A concept is usually publicly-named. +In addition to the more physical kinds, "concept" is used by the dialogue system +for ideas or subjects to think about. @h Rooms. We now detail each of the fundamental kinds in turn, in order of their @@ -234,7 +240,6 @@ in IF as ambient environments in which interesting things happen, rather than being direct participants. = -A room can be privately-named or publicly-named. A room is usually publicly-named. A room can be lighted or dark. A room is usually lighted. A room can be visited or unvisited. A room is usually unvisited. @@ -274,8 +279,6 @@ might be inside the region 13th Arrondissement, which in turn is inside the region Paris. Regions are useful mainly when the world is a large one, and are optional." -A region can be privately-named or publicly-named. A region is usually publicly-named. - @h Things. Things are ubiquitous: @@ -325,7 +328,6 @@ only short-term information and is used as workspace by the I6 library and also by some of the I7 template routines.) = -A thing can be privately-named or publicly-named. A thing is usually publicly-named. A thing can be undescribed or described. A thing is usually described. A thing can be marked for listing or unmarked for listing. A thing is usually unmarked for listing. @@ -379,8 +381,6 @@ The specification of direction is "Represents a direction of movement, such as northeast or down. They always occur in opposite, matched pairs: northeast and southwest, for instance; down and up." -A direction can be privately-named or publicly-named. A direction is usually -publicly-named. A direction can be marked for listing or unmarked for listing. A direction is usually unmarked for listing. A direction can be scenery. A direction is always scenery. diff --git a/resources/Documentation/Writing with Inform.md b/resources/Documentation/Writing with Inform.md index 84254f61d..6f4e777a4 100644 --- a/resources/Documentation/Writing with Inform.md +++ b/resources/Documentation/Writing with Inform.md @@ -1382,7 +1382,7 @@ Making more specific kinds of existing ones is an excellent way to build out the isn't allowed. The numbers are fixed and all exist already; we can write a story where the world has no Bengal tigers, but not a story where the world has no number between 4 and 6. That doesn't mean numbers are all alike, of course, and we will later see that we can use words like `even` and `odd` to describe numbers, and even create new adjectives like `unlucky` or `perfect` for them. But these are not kinds. Saying that 2 is an even number does not create a new number, and saying that 3 is an even number makes no sense. So it is not possible in Inform to create a `kind of number`. -But what we can do is to invent entirely new concepts, like so: +But what we can do is to invent entirely new sorts of quantity, like so: A distance is a kind of value. @@ -1474,7 +1474,7 @@ We are allowed to define more than one `plural of` the same singular text, and f ^^{kinds: of value <-- |enumerated value} ^^{kinds: defining: kinds of value} ^^{defining: kinds of value} ^^{values: kinds of value} ^^{kinds: enumerated values} ^^{units of measure} -So much for making new and more specialised kinds of `object` – for example, new kinds of `room`, or of `animal`. This allows us to describe the physical world in elegant ways, but what about concepts which aren't so physical? +So much for making new and more specialised kinds of `object` – for example, new kinds of `room`, or of `animal`. This allows us to describe the physical world in elegant ways, but what about pieces of information which aren't so physical? To Inform, numbers like 1, 2, 3, ... and texts like `"Jackdaws love my big sphinx of quartz"` are not physical. They are values, but not objects, so they don't belong to the `object` kind. In fact, `number` and `text` are not kinds of any greater kind. @@ -1524,6 +1524,41 @@ These are the two ways in which writers size up the world, so Inform provides bo Quantitative kinds like this are sometimes called "units", because – as in this example – they're often units in the sense of measuring things. Many Inform projects never need units, but they can still be very useful, and they're described in detail in the chapter on [Numbers and Equations]. +## Abstract objects and concepts + +The objects seen so far have almost all been physical, in one way or another, and have all belonged to the kinds `thing`, `room`, `region` or `direction`. + +But Inform also has a kind called `abstract object`. This can be used for something which does exist in the world, but has no spatial location. Rather than creating individual abstract objects, it's best to create kinds for them, to avoid what might be a very miscellaneous collection. One such kind exists already: `concept`. So, for example: + + The paranormal is a concept. Understand "supernatural" as the paranormal. + +produces: + +> `object` ▸ `abstract object` ▸ `concept` ▹ `paranormal` + +By default there are no concepts, and none are created automatically. + +Abstract objects have no physical existence, of course, so it throws a problem message to write something like: + + The paranormal is a concept in the Dining Room. + +And this would produce a run-time problem: + + After rubbing the lamp: + now the paranormal is in the Cave. + +Why do we need abstract objects? It's all very well to write something like: + + An emotion is a kind of abstract object. + Hope, fear and chagrin are emotions. + +But we could just as well have written: + + Emotion is a kind of value. + Hope, fear and chagrin are emotions. + +The answer is that for almost all purposes a kind of value works just as well or better. But there are occasionally times when we want a property or a variable to hold a value which could be either physical or abstract. For example, somebody might want to talk about the lamp, or might want to talk about chagrin. How could a single value represent either? The answer is that if `chagrin` is set up so that it is an `abstract object`, then an `object` variable could indeed hold either the value `lamp` or the value `chagrin`. + ## Properties again {PM_ValueCantHaveProperties} {PM_ValueCantHaveVProperties} ^^{properties} ^^{relations} ^^{properties: either/or properties} ^^{either/or properties} ^^{properties: value properties} ^^{value properties} ^^{properties: holding text} ^^{Kinds page of Index panel+ui+} ^^{user interface: Index panel: Kinds page} ^^{Index panel+ui+: Kinds page} ^^{even / odd (number)+adj+} ^^{odd / even (number)+adj+} @@ -5928,7 +5963,7 @@ Here `it` refers to the supporter in question. Note that there are now two colon ^^{phrases: deciding a value} ^^{to decide what/which (value)+assert+} ^^{Inform 6 equivalent: return value} ^^{type-checking: in phrases that decide values} -A condition is a yes/no decision, but we can also take decisions where the result is a value. Suppose we want to create a concept of the "grand prize", which will have different values at different times in play. Each time the "grand prize" is referred to, Inform will have to decide what its value is, and the following tells Inform how to make that decision: +A condition is a yes/no decision, but we can also take decisions where the result is a value. Suppose we want to create a "grand prize", which will have different values at different times in play. Each time the "grand prize" is referred to, Inform will have to decide what its value is, and the following tells Inform how to make that decision: To decide which treasure is the grand prize: if the Dark Room has been visited, decide on the silver bars; @@ -6749,7 +6784,7 @@ In other words, does the effect apply only to particular people, things or place Rules like the one saying that photography is only possible if one holds the camera are, by convention, also counted as generic rules of play: they are not really special rules about the camera, but apply to all possible acts of photography anywhere, so are actually generic. -Sometimes we can choose our own answer to this question, and go either way. Suppose we want a certain place to be muddy-floored, affecting things that happen there. One way would be to write exceptional rules applying to that one room. But we could alternatively create a general concept of muddiness (`A room can be clean or muddy. A room is usually clean.`) and then regard the new behaviour as being a set of generic rules applying in muddy rooms. We could then, of course, create a second muddy room with much greater ease, or transplant these rules to other works and have muddy rooms in those too. +Sometimes we can choose our own answer to this question, and go either way. Suppose we want a certain place to be muddy-floored, affecting things that happen there. One way would be to write exceptional rules applying to that one room. But we could alternatively create a general definition of muddiness (`A room can be clean or muddy. A room is usually clean.`) and then regard the new behaviour as being a set of generic rules applying in muddy rooms. We could then, of course, create a second muddy room with much greater ease, or transplant these rules to other works and have muddy rooms in those too. **3. Particular situations: use Instead or After (or sometimes Before).** @@ -7747,7 +7782,7 @@ Such a relation exists only in the current phrase, and is destroyed when the phr It is easy to say what verbs are for: they are to express relations. But what are relations for? -Inform 7's focus on relations between objects is unusual as an approach to interactive fiction; the concept does not exist in most design systems, or rather, it does but is submerged. Traditional design systems do, after all, have the spatial relations of being inside, on top of, and so on. It could well be said that these are the only relationships that inanimate objects ever have. A stone can be on top of a table, and if so then that expresses their entire association. +The ones we've seen so far are mostly about how things are arranged in space: things being inside or on top of each other, or one room being mapped north of another. In some ways these are the only relationships that inanimate objects ever have. A stone can be on top of a table, and if so then that expresses their entire association. This is because the stone, and the table, have no opinions, emotions, knowledge or memory. If the stone is taken away and then put back, nothing has changed. People, on the other hand, tend to remember having met each other before; they like being in some places, but not others; their behaviour depends on who, or what, is nearby. Being conscious, they have internal states, unlike the stone. Relations are a simple but powerful way to express and talk about such connections, and although they have numerous uses in physical contexts too, they are at their most powerful when helping to make the characters of interactive fiction come alive. @@ -9015,7 +9050,7 @@ Fortunately the whole set is indeed available in a presentation box, and at no e ^^{units of measure: with multiple numeric components} ^^{units of measure: defining} ^^{defining: units of measure with parts} ^^{limits: of numeric values of units} ^^{numbers: limits of numeric values of units} ^^{Z-machine: numeric limits} ^^{Glulx: numeric limits} ^^{virtual machine: numeric limits} ^^{real numbers: limits of numeric values of units} ^^{punctuation: quotation marks: not usable in unit notations} ^^{|": not usable in unit notations} -We've seen quite enough scientific notation for the time being. There are plenty of other notations used in natural language, for everyday concepts, where people don't use a tidy spread of powers of 10. Instead they use mixtures, with some sort of punctuation or text to divide them. For instance, the running time of a piece of music is easier to follow in minutes and seconds than in seconds alone: old-fashioned LP sleeves used to quote running times in the form 4'33. +We've seen quite enough scientific notation for the time being. There are plenty of other notations used in natural language, for everyday talk, where people don't use a tidy spread of powers of 10. Instead they use mixtures, with some sort of punctuation or text to divide them. For instance, the running time of a piece of music is easier to follow in minutes and seconds than in seconds alone: old-fashioned LP sleeves used to quote running times in the form 4'33. A running time is a kind of value. 3'59 specifies a running time. @@ -10201,7 +10236,7 @@ We then supply lines of grammar (as they are called) for Inform to recognise, li Understand "photograph [an open door]" as photographing. -The part in quotation marks after the word `Understand` looks like text — something which Inform can say, or can manipulate in various letter-by-letter ways. The square brackets even look like text substitutions. In fact, though, `"photograph [an open door]"` is _not_ a text value. It is a pattern used to match the words in a command. It will match the word ``PHOTOGRAPH`` followed by the name of an open door which is currently "in scope" (a concept we will come back to, but which roughly means nearby). It will not match any other wording. +The part in quotation marks after the word `Understand` looks like text — something which Inform can say, or can manipulate in various letter-by-letter ways. The square brackets even look like text substitutions. In fact, though, `"photograph [an open door]"` is _not_ a text value. It is a pattern used to match the words in a command. It will match the word ``PHOTOGRAPH`` followed by the name of an open door which is currently "in scope" (an idea we will come back to, but which roughly means nearby). It will not match any other wording. For obvious reasons, this pattern of words needs to match the expectations of the action. Photographing applies to `one thing`, so these instructions are both a little odd: one supplies no things, and the other supplies two. @@ -10346,7 +10381,7 @@ then we can define an action `applying to one state`, say, and then the token `" which would enable `"[a weight]"` to match ``27KG``, for example. -The issue of "scope" does not arise for values which are not objects. Scope is all about where things are in the physical world, but the number 17, or for that matter the concept of being a gas, makes equal sense everywhere. So although it's quite legal to write `"[any number]"`, using the `any` to mean anywhere, the effect is exactly the same as writing just `"[a number]"`. +The issue of "scope" does not arise for values which are not objects. Scope is all about where things are in the physical world, but the number 17, or for that matter the possibility of being a gas, makes equal sense everywhere. So although it's quite legal to write `"[any number]"`, using the `any` to mean anywhere, the effect is exactly the same as writing just `"[a number]"`. ## The text token {text_token} @@ -10435,7 +10470,7 @@ This section can safely be skipped by most Inform authors, but for experts it pr ### When scope is used by Inform -As we have seen, scope is a concept of nearby-ness which is used by the command parser to see which names to recognise in commands. The command ``TAKE HOLY GRAIL`` will be understood only if the Holy Grail is in scope, and so on. Scope roughly means "within sight or touch", but only roughly. It's a concept used in Inform in other places too: +As we have seen, scope is an idea of nearby-ness which is used by the command parser to see which names to recognise in commands. The command ``TAKE HOLY GRAIL`` will be understood only if the Holy Grail is in scope, and so on. Scope roughly means "within sight or touch", but only roughly. It's used in Inform in other places too: * To define the `visibility relation`. `A` can see `B` if: - there is light where `A` is, _and_ @@ -15588,7 +15623,7 @@ Provided we declare the files in the right way, it is easy for one project to re But if we want more rapid communication, between two projects which are each playing at the same time, we need to be more careful. What if project A tries to read the file at the same moment that project B is writing it? -To avoid this, we have a concept of files being "ready". A file is ready if it exists, and is completely written, and not in use elsewhere. We have already seen: +To avoid this, we have a condition of files as _ready to read_ or not. A file is ready to read if it exists, and is completely written, and not in use elsewhere. We have already seen: if the file of Invariants exists...