diff --git a/docs/arch-module/1-am.html b/docs/arch-module/1-am.html index eb045f9a96..241e8ceb52 100644 --- a/docs/arch-module/1-am.html +++ b/docs/arch-module/1-am.html @@ -51,7 +51,7 @@

Setting up the use of this module.

-

§1. This section simoly sets up the module in ways expected by foundation, and +

§1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

diff --git a/docs/assertions-module/1-am.html b/docs/assertions-module/1-am.html index d53b090a89..50e33df1fd 100644 --- a/docs/assertions-module/1-am.html +++ b/docs/assertions-module/1-am.html @@ -51,7 +51,7 @@

Setting up the use of this module.

-

§1. This section simoly sets up the module in ways expected by foundation, and +

§1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

diff --git a/docs/assertions-module/2-bv.html b/docs/assertions-module/2-bv.html index 85bda73d3b..189842fa25 100644 --- a/docs/assertions-module/2-bv.html +++ b/docs/assertions-module/2-bv.html @@ -230,25 +230,26 @@

define EQUALITY_RELATION_NAME 0
 define UNIVERSAL_RELATION_NAME 1
 define MEANING_RELATION_NAME 2
-define PROVISION_RELATION_NAME 3
-define GE_RELATION_NAME 4
-define GT_RELATION_NAME 5
-define LE_RELATION_NAME 6
-define LT_RELATION_NAME 7
-define ADJACENCY_RELATION_NAME 8
-define REGIONAL_CONTAINMENT_RELATION_NAME 9
-define CONTAINMENT_RELATION_NAME 10
-define SUPPORT_RELATION_NAME 11
-define INCORPORATION_RELATION_NAME 12
-define CARRYING_RELATION_NAME 13
-define HOLDING_RELATION_NAME 14
-define WEARING_RELATION_NAME 15
-define POSSESSION_RELATION_NAME 16
-define VISIBILITY_RELATION_NAME 17
-define TOUCHABILITY_RELATION_NAME 18
-define CONCEALMENT_RELATION_NAME 19
-define ENCLOSURE_RELATION_NAME 20
-define ROOM_CONTAINMENT_RELATION_NAME 21
+define EMPTY_RELATION_NAME 3
+define PROVISION_RELATION_NAME 4
+define GE_RELATION_NAME 5
+define GT_RELATION_NAME 6
+define LE_RELATION_NAME 7
+define LT_RELATION_NAME 8
+define ADJACENCY_RELATION_NAME 9
+define REGIONAL_CONTAINMENT_RELATION_NAME 10
+define CONTAINMENT_RELATION_NAME 11
+define SUPPORT_RELATION_NAME 12
+define INCORPORATION_RELATION_NAME 13
+define CARRYING_RELATION_NAME 14
+define HOLDING_RELATION_NAME 15
+define WEARING_RELATION_NAME 16
+define POSSESSION_RELATION_NAME 17
+define VISIBILITY_RELATION_NAME 18
+define TOUCHABILITY_RELATION_NAME 19
+define CONCEALMENT_RELATION_NAME 20
+define ENCLOSURE_RELATION_NAME 21
+define ROOM_CONTAINMENT_RELATION_NAME 22
 

§3. These are the English names of the built-in relations. The use of hyphenation here is a fossil from the times when Inform allowed only single-word relation @@ -262,6 +263,7 @@

equality | universal | meaning | + never-holding | provision | numerically-greater-than-or-equal-to | numerically-greater-than | diff --git a/docs/assertions-module/8-terr.html b/docs/assertions-module/8-terr.html index 17ce440012..c26c246636 100644 --- a/docs/assertions-module/8-terr.html +++ b/docs/assertions-module/8-terr.html @@ -73,15 +73,19 @@

To define how equality behaves in the Inform language.

-
+

§1. Additional details.

 void EqualityDetails::start(void) {
     METHOD_ADD(equality_bp_family, TYPECHECK_BPF_MTID, EqualityDetails::typecheck);
-    METHOD_ADD(equality_bp_family, ASSERT_BPF_MTID, EqualityDetails::assert);
-    METHOD_ADD(equality_bp_family, SCHEMA_BPF_MTID, EqualityDetails::schema);
+    METHOD_ADD(equality_bp_family, ASSERT_BPF_MTID, EqualityDetails::assert);
+    METHOD_ADD(equality_bp_family, SCHEMA_BPF_MTID, EqualityDetails::schema);
+
+    METHOD_ADD(empty_bp_family, TYPECHECK_BPF_MTID, EqualityDetails::typecheck_empty);
+    METHOD_ADD(empty_bp_family, ASSERT_BPF_MTID, EqualityDetails::assert_empty);
+    METHOD_ADD(empty_bp_family, SCHEMA_BPF_MTID, EqualityDetails::schema_empty);
 }
 

§2. Typechecking. This is a very polymorphic relation, in that it can accept terms of almost @@ -102,7 +106,6 @@

return NEVER_MATCH; } - if (PluginCalls::typecheck_equality(kinds_of_terms[0], kinds_of_terms[1])) return ALWAYS_MATCH; if ((Kinds::Behaviour::is_object(kinds_of_terms[0])) && @@ -179,12 +182,22 @@

return FALSE; } -

§4. Assertion. In general values differ, and cannot be equated by fiat. But an exception is +

§4. The never-holding relation is simpler: anything can be hypothetically related to +anything else (except of course that it always is not). +

+ +
+int EqualityDetails::typecheck_empty(bp_family *self, binary_predicate *bp,
+        kind **kinds_of_terms, kind **kinds_required, tc_problem_kit *tck) {
+    return ALWAYS_MATCH;
+}
+
+

§5. Assertion. In general values differ, and cannot be equated by fiat. But an exception is setting a global variable.

-int EqualityDetails::assert(bp_family *self, binary_predicate *bp,
+int EqualityDetails::assert(bp_family *self, binary_predicate *bp,
         inference_subject *infs0, parse_node *spec0,
         inference_subject *infs1, parse_node *spec1) {
     if (Lvalues::is_actual_NONLOCAL_VARIABLE(spec0)) {
@@ -206,7 +219,17 @@ 

return FALSE; }

-

§5. Compilation. Since we are compiling to I6, which is itself a C-level programming +

§6. The never-holding relation cannot be asserted true: +

+ +
+int EqualityDetails::assert_empty(bp_family *self, binary_predicate *bp,
+        inference_subject *infs0, parse_node *spec0,
+        inference_subject *infs1, parse_node *spec1) {
+    return FALSE;
+}
+
+

§7. Compilation. Since we are compiling to I6, which is itself a C-level programming language, it looks at first as if we can compile is into == when testing equality and = when asserting it: thus

@@ -246,17 +269,17 @@

-int EqualityDetails::schema(bp_family *self, int task, binary_predicate *bp, annotated_i6_schema *asch) {
+int EqualityDetails::schema(bp_family *self, int task, binary_predicate *bp, annotated_i6_schema *asch) {
     kind *st[2];
     st[0] = Cinders::kind_of_term(asch->pt0);
     st[1] = Cinders::kind_of_term(asch->pt1);
 
     if ((Kinds::Behaviour::is_object(st[0])) &&
         (Properties::can_name_coincide_with_kind(st[1])) && (Properties::property_with_same_name_as(st[1])))
-        Handle the case of setting a property of A separately5.1;
+        Handle the case of setting a property of A separately7.1;
 
     if ((Kinds::eq(st[0], K_response)) && (Kinds::eq(st[1], K_text)))
-        Handle the case of setting a response separately5.2;
+        Handle the case of setting a response separately7.2;
 
     switch (task) {
         case TEST_ATOM_TASK:
@@ -278,15 +301,15 @@ 

if ((storage_class == UNKNOWN_NT) && (Kinds::get_construct(st[0]) == CON_property)) storage_class = PROPERTY_VALUE_NT; - Make a further check that kinds permit this assignment5.4; + Make a further check that kinds permit this assignment7.4; if (storage_class == UNKNOWN_NT) { - Issue problem message for being unable to set equal5.5 + Issue problem message for being unable to set equal7.5 asch->schema = NULL; } else { - Exceptional case of setting the "player" global variable5.3; + Exceptional case of setting the "player" global variable7.3; Calculus::Schemas::modify(asch->schema, "%s", CompileLvalues::interpret_store(storage_class, st[0], st[1], 0)); - Add kind-checking code for run-time checking5.6; + Add kind-checking code for run-time checking7.6; } return TRUE; } @@ -294,7 +317,7 @@

return FALSE; }

-

§5.1. So here is the exceptional case (a) mentioned above. Suppose we have: +

§7.1. So here is the exceptional case (a) mentioned above. Suppose we have:

@@ -307,7 +330,7 @@

lantern is bright".

-

Handle the case of setting a property of A separately5.1 = +

Handle the case of setting a property of A separately7.1 =

@@ -324,8 +347,8 @@ 

} return FALSE;

- -

§5.2. Handle the case of setting a response separately5.2 = +

  • This code is used in §7.
+

§7.2. Handle the case of setting a response separately7.2 =

@@ -344,11 +367,11 @@ 

} return FALSE;

- -

§5.3. A little bit of support within Inform to help the template layer. +

  • This code is used in §7.
+

§7.3. A little bit of support within Inform to help the template layer.

-

Exceptional case of setting the "player" global variable5.3 = +

Exceptional case of setting the "player" global variable7.3 =

@@ -365,8 +388,8 @@ 

return TRUE; }

- -

§5.4. Make a further check that kinds permit this assignment5.4 = +

  • This code is used in §7.
+

§7.4. Make a further check that kinds permit this assignment7.4 =

@@ -388,12 +411,12 @@ 

} }

- -

§5.5. Rather than just returning FALSE for a generic problem message, we issue +

  • This code is used in §7.
+

§7.5. Rather than just returning FALSE for a generic problem message, we issue one that's more helpfully specific and return TRUE.

-

Issue problem message for being unable to set equal5.5 = +

Issue problem message for being unable to set equal7.5 =

@@ -414,8 +437,8 @@ 

"just as the number '7' is fixed."); }

- -

§5.6. Add kind-checking code for run-time checking5.6 = +

  • This code is used in §7.
+

§7.6. Add kind-checking code for run-time checking7.6 =

@@ -431,7 +454,16 @@ 

DISCARD_TEXT(TEMP) }

- +
  • This code is used in §7.
+

§8. This never holds and there is nothing to compile: +

+ +
+int EqualityDetails::schema_empty(bp_family *self, int task, binary_predicate *bp,
+    annotated_i6_schema *asch) {
+    return FALSE;
+}
+
diff --git a/docs/basic_inform/S-pd.html b/docs/basic_inform/S-pd.html index e1a3515c38..d02d44c017 100644 --- a/docs/basic_inform/S-pd.html +++ b/docs/basic_inform/S-pd.html @@ -427,7 +427,7 @@

hopes: that's partly up to the virtual machine, unfortunately.

-

See test case BIP-SayOneOf, though since intest runs on plain text only, +

See test case BIP-SayFonts, though since intest runs on plain text only, you may need to run this in the Inform application to be convinced.

@@ -1061,7 +1061,7 @@

(documented at ph_seed): (- VM_Seed_RNG({N}); -). -

§31. A novel feature of Inform is that there is a default value of any kind: fpr +

§31. A novel feature of Inform is that there is a default value of any kind: for example, it is 0 for a number, or the empty text for text. When Inform compiles a value of a given kind but isn't told what value to compile, it always chooses the default, which is why the following definition works. diff --git a/docs/basic_inform/S-prm.html b/docs/basic_inform/S-prm.html index ddc5221946..d2c3073b6c 100644 --- a/docs/basic_inform/S-prm.html +++ b/docs/basic_inform/S-prm.html @@ -54,7 +54,7 @@


§1. Title. Every Inform 7 extension begins with a standard titling line and a -rubric text, and this are no exception: +rubric text, and this is no exception:

diff --git a/docs/bytecode-module/1-bm.html b/docs/bytecode-module/1-bm.html
index c211a43b0c..933bb82e2a 100644
--- a/docs/bytecode-module/1-bm.html
+++ b/docs/bytecode-module/1-bm.html
@@ -51,7 +51,7 @@ 

Setting up the use of this module.

-

§1. This section simoly sets up the module in ways expected by foundation, and +

§1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

diff --git a/docs/calculus-module/1-cm.html b/docs/calculus-module/1-cm.html index 0f679e099a..20c54bf5f7 100644 --- a/docs/calculus-module/1-cm.html +++ b/docs/calculus-module/1-cm.html @@ -59,7 +59,7 @@

Setting up the use of this module.

-

§1. This section simoly sets up the module in ways expected by foundation, and +

§1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

diff --git a/docs/calculus-module/3-bp.html b/docs/calculus-module/3-bp.html index 3efd7b3174..0986ed882c 100644 --- a/docs/calculus-module/3-bp.html +++ b/docs/calculus-module/3-bp.html @@ -195,6 +195,7 @@

 kind *BinaryPredicates::kind(binary_predicate *bp) {
     if (bp == R_equality) return Kinds::binary_con(CON_relation, K_value, K_value);
+    if (bp == R_empty) return Kinds::binary_con(CON_relation, K_value, K_value);
     kind *K0 = BinaryPredicates::term_kind(bp, 0);
     kind *K1 = BinaryPredicates::term_kind(bp, 1);
     if (K0 == NULL) K0 = K_object;
diff --git a/docs/calculus-module/3-ter.html b/docs/calculus-module/3-ter.html
index 71ad793bd9..ba0660819c 100644
--- a/docs/calculus-module/3-ter.html
+++ b/docs/calculus-module/3-ter.html
@@ -68,9 +68,11 @@ 

 bp_family *equality_bp_family = NULL;
 bp_family *spatial_bp_family = NULL;
+bp_family *empty_bp_family = NULL;
 
 binary_predicate *R_equality = NULL;
 binary_predicate *a_has_b_predicate = NULL;
+binary_predicate *R_empty = NULL;
 

§2. Family. This is a minimal representation only, for when the calculus module is used in a non-Inform context: whereas Inform adds other methods to the equality @@ -92,6 +94,14 @@

METHOD_ADD(spatial_bp_family, STOCK_BPF_MTID, Calculus::Equality::stock_spatial); #endif + + empty_bp_family = BinaryPredicateFamilies::new(); + METHOD_ADD(empty_bp_family, STOCK_BPF_MTID, + Calculus::Equality::stock_empty); + METHOD_ADD(empty_bp_family, DESCRIBE_FOR_PROBLEMS_BPF_MTID, + Calculus::Equality::describe_empty_for_problems); + METHOD_ADD(empty_bp_family, DESCRIBE_FOR_INDEX_BPF_MTID, + Calculus::Equality::describe_empty_for_index); }

§3. Initial stock. Note the unique one-off way in which equality is made. @@ -117,18 +127,34 @@

PreformUtilities::wording(<relation-names>, POSSESSION_RELATION_NAME)); } } + +void Calculus::Equality::stock_empty(bp_family *self, int n) { + if (n == 1) { + R_empty = BinaryPredicates::make_equality(empty_bp_family, + PreformUtilities::wording(<relation-names>, EMPTY_RELATION_NAME)); + BinaryPredicates::set_index_details(R_equality, "value", "value"); + } +}

§4. Problem message text.

-int Calculus::Equality::describe_for_problems(bp_family *self, OUTPUT_STREAM,
+int Calculus::Equality::describe_for_problems(bp_family *self, OUTPUT_STREAM,
     binary_predicate *bp) {
     return FALSE;
 }
-void Calculus::Equality::describe_for_index(bp_family *self, OUTPUT_STREAM,
+void Calculus::Equality::describe_for_index(bp_family *self, OUTPUT_STREAM,
     binary_predicate *bp) {
     WRITE("equality");
 }
+int Calculus::Equality::describe_empty_for_problems(bp_family *self, OUTPUT_STREAM,
+    binary_predicate *bp) {
+    return FALSE;
+}
+void Calculus::Equality::describe_empty_for_index(bp_family *self, OUTPUT_STREAM,
+    binary_predicate *bp) {
+    WRITE("never-holding");
+}
 
@@ -163,7 +163,7 @@

text_stream *test_err = NULL; void Declarations::load_from_file(text_stream *arg) { - filename *F = Filenames::from_text(arg); + filename *F = Filenames::from_text(arg); feed_t FD = Feeds::begin(); source_file *sf = TextFromFiles::feed_into_lexer(F, NULL_GENERAL_POINTER); wording W = Feeds::end(FD); @@ -171,7 +171,7 @@

syntax_tree = SyntaxTree::new(); Sentences::break(syntax_tree, W); BinaryPredicateFamilies::first_stock(); - test_err = Str::new(); + test_err = Str::new(); SyntaxTree::traverse(syntax_tree, Declarations::parse); } @@ -405,9 +405,9 @@

PRINT("'%<W': ", W); if (R[1]) PRINT("true"); else { PRINT("false"); - if (Str::len(test_err) > 0) PRINT(" - %S", test_err); + if (Str::len(test_err) > 0) PRINT(" - %S", test_err); } - Str::clear(test_err); + Str::clear(test_err); PRINT("\n");
  • This code is used in §4.
@@ -465,7 +465,7 @@

BPTerms::new(TERM_DOMAIN_FROM_KIND_FUNCTION(k0)); bp_term_details t1 = BPTerms::new(TERM_DOMAIN_FROM_KIND_FUNCTION(k1)); - text_stream *S = Str::new(); + text_stream *S = Str::new(); WRITE_TO(S, "%W", W); binary_predicate *bp = BinaryPredicates::make_pair(test_bp_family, t0, t1, S, NULL, NULL, @@ -475,7 +475,7 @@

TEMPORARY_TEXT(f1n) WRITE_TO(f0n, "%W", f0); WRITE_TO(f1n, "%W", f1); - if (Str::ne(f0n, I"none")) { + if (Str::ne(f0n, I"none")) { named_function *nf = CREATE(named_function); nf->bp = bp; nf->name = f0; @@ -483,7 +483,7 @@

BPTerms::set_function(&(bp->term_details[0]), Calculus::Schemas::new("%S(*1)", f0n)); } - if (Str::ne(f1n, I"none")) { + if (Str::ne(f1n, I"none")) { named_function *nf = CREATE(named_function); nf->bp = bp; nf->name = f1; diff --git a/docs/calculus-test/1-pc.html b/docs/calculus-test/1-pc.html index d7aa5c6844..31fdd41fdc 100644 --- a/docs/calculus-test/1-pc.html +++ b/docs/calculus-test/1-pc.html @@ -49,8 +49,8 @@

Repository

Related Projects

@@ -69,7 +69,7 @@

 int main(int argc, char **argv) {
-    Foundation::start(argc, argv);
+    Foundation::start(argc, argv);
     WordsModule::start();
     SyntaxModule::start();
     LexiconModule::start();
@@ -78,21 +78,21 @@ 

KindsModule::start(); CalculusModule::start(); - pathname *P = Pathnames::from_text(I"services"); - P = Pathnames::down(P, I"calculus-test"); - P = Pathnames::down(P, I"Tangled"); - filename *S = Filenames::in(P, I"Syntax.preform"); + pathname *P = Pathnames::from_text(I"services"); + P = Pathnames::down(P, I"calculus-test"); + P = Pathnames::down(P, I"Tangled"); + filename *S = Filenames::in(P, I"Syntax.preform"); LoadPreform::load(S, NULL); - CommandLine::declare_heading( + CommandLine::declare_heading( L"calculus-test: a tool for testing the calculus module\n"); - CommandLine::declare_switch(LOAD_CLSW, L"load", 2, + CommandLine::declare_switch(LOAD_CLSW, L"load", 2, L"load kind definitions from file X"); - CommandLine::declare_switch(INTERPRET_CLSW, L"interpret", 2, + CommandLine::declare_switch(INTERPRET_CLSW, L"interpret", 2, L"interpret REPL commands in file X"); - CommandLine::read(argc, argv, NULL, &Main::respond, &Main::ignore); + CommandLine::read(argc, argv, NULL, &Main::respond, &Main::ignore); WordsModule::end(); SyntaxModule::end(); @@ -101,7 +101,7 @@

LinguisticsModule::end(); KindsModule::end(); CalculusModule::end(); - Foundation::end(); + Foundation::end(); return 0; }

@@ -111,16 +111,16 @@

void Main::respond(int id, int val, text_stream *arg, void *state) { text_stream *save_DL = DL; DL = STDOUT; - Streams::enable_debugging(DL); + Streams::enable_debugging(DL); switch (id) { - case LOAD_CLSW: NeptuneFiles::load(Filenames::from_text(arg)); break; + case LOAD_CLSW: NeptuneFiles::load(Filenames::from_text(arg)); break; case INTERPRET_CLSW: Declarations::load_from_file(arg); break; } DL = save_DL; } void Main::ignore(int id, text_stream *arg, void *state) { - Errors::fatal("only switches may be used at the command line"); + Errors::fatal("only switches may be used at the command line"); }

§3.

@@ -168,12 +168,14 @@

define EQUALITY_RELATION_NAME 0
 define UNIVERSAL_RELATION_NAME 1
 define POSSESSION_RELATION_NAME 2
+define EMPTY_RELATION_NAME 3
 
 <relation-names> ::=
     equality |
     universal |
-    possession
+    possession |
+    never-holding
 
@@ -106,7 +106,7 @@

  • - inweb/foundation + inweb/foundation - A library of utility functions for command-line tools.

  • diff --git a/docs/final-module/1-fm.html b/docs/final-module/1-fm.html index 8aa187a5e4..cba7493ad0 100644 --- a/docs/final-module/1-fm.html +++ b/docs/final-module/1-fm.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/html-module/1-hm.html b/docs/html-module/1-hm.html index ebd1c131e6..8bdaf138fa 100644 --- a/docs/html-module/1-hm.html +++ b/docs/html-module/1-hm.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/imperative-module/5-cii.html b/docs/imperative-module/5-cii.html index 4f2008ea38..00bf4c43a6 100644 --- a/docs/imperative-module/5-cii.html +++ b/docs/imperative-module/5-cii.html @@ -1697,7 +1697,7 @@

    EmitCode::inv(STORE_BIP); EmitCode::down(); EmitCode::ref_iname(K_number, Hierarchy::find(SAY__N_HL)); - CompileValues::to_code_val_of_kind(to_say, K); + CompileValues::to_code_val_of_kind(to_say, NULL); EmitCode::up(); EmitCode::up(); return; @@ -1718,7 +1718,7 @@

    EmitCode::inv(STORE_BIP); EmitCode::down(); EmitCode::ref_iname(K_number, Hierarchy::find(UNICODE_TEMP_HL)); - CompileValues::to_code_val_of_kind(to_say, K); + CompileValues::to_code_val_of_kind(to_say, NULL); EmitCode::up(); if (TargetVMs::is_16_bit(Task::vm())) { Produce::inv_assembly(Emit::tree(), I"@print_unicode"); diff --git a/docs/inblorb/3-sd.html b/docs/inblorb/3-sd.html index 3f4dc61134..555312e636 100644 --- a/docs/inblorb/3-sd.html +++ b/docs/inblorb/3-sd.html @@ -251,7 +251,7 @@

     void Solution::find_node_ID_in_tag(OUTPUT_STREAM, text_stream *line, char *tag) {
         TEMPORARY_TEXT(prototype)
    -    WRITE_TO(prototype, "%c*?<%s nodeId=\"(%c*?)\"%c*", tag);
    +    WRITE_TO(prototype, "%%c*?<%s nodeId=\"(%%c*?)\"%%c*", tag);
         wchar_t prototype_Cs[128];
         Str::copy_to_wide_string(prototype_Cs, prototype, 128);
         match_results mr = Regexp::create_mr();
    @@ -267,7 +267,7 @@ 

     int Solution::find_text_of_tag(OUTPUT_STREAM, text_stream *line, char *tag) {
         TEMPORARY_TEXT(prototype)
    -    WRITE_TO(prototype, "%c*?>(%c*?)</%s%c*", tag);
    +    WRITE_TO(prototype, "%%c*?>(%%c*?)</%s%%c*", tag);
         match_results mr = Regexp::create_mr();
         wchar_t prototype_Cs[128];
         Str::copy_to_wide_string(prototype_Cs, prototype, 128);
    diff --git a/docs/index-module/1-im.html b/docs/index-module/1-im.html
    index 656fb11298..394884b3db 100644
    --- a/docs/index-module/1-im.html
    +++ b/docs/index-module/1-im.html
    @@ -51,7 +51,7 @@ 

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/inflections-module/1-im.html b/docs/inflections-module/1-im.html index b1a0f71332..99b48fbdb9 100644 --- a/docs/inflections-module/1-im.html +++ b/docs/inflections-module/1-im.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/kinds-module/1-km.html b/docs/kinds-module/1-km.html index 4a20be4f62..2f3d976658 100644 --- a/docs/kinds-module/1-km.html +++ b/docs/kinds-module/1-km.html @@ -59,7 +59,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/knowledge-module/1-km.html b/docs/knowledge-module/1-km.html index 2056bb34e7..b6b1ef892f 100644 --- a/docs/knowledge-module/1-km.html +++ b/docs/knowledge-module/1-km.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/lexicon-module/1-lm.html b/docs/lexicon-module/1-lm.html index 6dd8472f04..9d78638aae 100644 --- a/docs/lexicon-module/1-lm.html +++ b/docs/lexicon-module/1-lm.html @@ -59,7 +59,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/lexicon-module/P-wtmd.html b/docs/lexicon-module/P-wtmd.html index e1db608cfd..5acb9c56e6 100644 --- a/docs/lexicon-module/P-wtmd.html +++ b/docs/lexicon-module/P-wtmd.html @@ -181,9 +181,9 @@

    number of successes.
    -Size of lexicon: 3101 excerpt meanings
    -  Stored among 839 words out of total vocabulary of 10568
    -  709 words have a start list: longest belongs to report (with 293 meanings)
    +Size of lexicon: 3102 excerpt meanings
    +  Stored among 840 words out of total vocabulary of 10569
    +  710 words have a start list: longest belongs to report (with 293 meanings)
       15 words have an end list: longest belongs to case (with 6 meanings)
       29 words have a middle list: longest belongs to to (with 4 meanings)
       108 words have a subset list: longest belongs to street (with 4 meanings)
    diff --git a/docs/linguistics-module/1-lm.html b/docs/linguistics-module/1-lm.html
    index ffb6adc2af..8abb737bd6 100644
    --- a/docs/linguistics-module/1-lm.html
    +++ b/docs/linguistics-module/1-lm.html
    @@ -51,7 +51,7 @@ 

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/linguistics-module/P-wtmd.html b/docs/linguistics-module/P-wtmd.html index 88b5285038..d8a7066e79 100644 --- a/docs/linguistics-module/P-wtmd.html +++ b/docs/linguistics-module/P-wtmd.html @@ -293,13 +293,13 @@

     adjective: 137 items
     article: 2 items
    -noun: 2381 items
    +noun: 2382 items
     pronoun: 8 items
     preposition: 273 items
     determiner: 22 items
     verb: 108 items
     verb_form: 386 items
    -total in all categories: 3317
    +total in all categories: 3318
     
     adjective: 'even'
     adjective: 'odd'
    @@ -496,6 +496,7 @@ 

    noun: proper: 'enclosure relation' noun: proper: 'adjacency relation' noun: proper: 'regional-containment relation' +noun: proper: 'never-holding relation' noun: proper: 'numerically-greater-than relation' noun: proper: 'numerically-less-than relation' noun: proper: 'numerically-greater-than-or-equal-to relation' @@ -1313,8 +1314,8 @@

    noun: proper: 'didn't understand the way that finished error' noun: proper: 'not enough of those available error' noun: proper: 'nothing to do error' -noun: proper: 'noun did not make sense in that context error' noun: proper: 'referred to a determination of scope error' +noun: proper: 'noun did not make sense in that context error' noun: proper: 'i beg your pardon error' noun: proper: 'can't again the addressee error' noun: proper: 'comma can't begin error' diff --git a/docs/multimedia-module/1-mm.html b/docs/multimedia-module/1-mm.html index ea440da1cb..c32893a3f4 100644 --- a/docs/multimedia-module/1-mm.html +++ b/docs/multimedia-module/1-mm.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/pipeline-module/1-pm.html b/docs/pipeline-module/1-pm.html index 9e1a6bfb69..cb0b7d4a22 100644 --- a/docs/pipeline-module/1-pm.html +++ b/docs/pipeline-module/1-pm.html @@ -59,7 +59,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/problems-module/1-pm.html b/docs/problems-module/1-pm.html index 691ddd09b1..5956d1c467 100644 --- a/docs/problems-module/1-pm.html +++ b/docs/problems-module/1-pm.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/runtime-module/1-rm.html b/docs/runtime-module/1-rm.html index 43e85ad40f..717e84a19f 100644 --- a/docs/runtime-module/1-rm.html +++ b/docs/runtime-module/1-rm.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/runtime-module/2-ea.html b/docs/runtime-module/2-ea.html index 3373f8e052..db944ff51f 100644 --- a/docs/runtime-module/2-ea.html +++ b/docs/runtime-module/2-ea.html @@ -79,19 +79,19 @@

    -packaging_state EmitArrays::begin_word(inter_name *name, kind *K) {
    +packaging_state EmitArrays::begin_word(inter_name *name, kind *K) {
         packaging_state save = Packaging::enter_home_of(name);
         EmitArrays::begin_inner(name, K, FALSE, CONST_LIST_FORMAT_WORDS);
         return save;
     }
     
    -packaging_state EmitArrays::begin_word_by_extent(inter_name *name, kind *K) {
    +packaging_state EmitArrays::begin_word_by_extent(inter_name *name, kind *K) {
         packaging_state save = Packaging::enter_home_of(name);
         EmitArrays::begin_inner(name, K, FALSE, CONST_LIST_FORMAT_WORDS_BY_EXTENT);
         return save;
     }
     
    -packaging_state EmitArrays::begin_unchecked(inter_name *name) {
    +packaging_state EmitArrays::begin_unchecked(inter_name *name) {
         packaging_state save = Packaging::enter_home_of(name);
         EmitArrays::begin_inner(name, NULL, TRUE, CONST_LIST_FORMAT_WORDS);
         return save;
    @@ -103,7 +103,7 @@ 

    return save; } -packaging_state EmitArrays::begin_byte_by_extent(inter_name *name, kind *K) { +packaging_state EmitArrays::begin_byte_by_extent(inter_name *name, kind *K) { packaging_state save = Packaging::enter_home_of(name); EmitArrays::begin_inner(name, K, FALSE, CONST_LIST_FORMAT_BYTES_BY_EXTENT); return save; @@ -139,7 +139,7 @@

    -packaging_state EmitArrays::begin_sum_constant(inter_name *name, kind *K) {
    +packaging_state EmitArrays::begin_sum_constant(inter_name *name, kind *K) {
         packaging_state save = Packaging::enter_home_of(name);
         EmitArrays::begin_inner(name, K, FALSE, CONST_LIST_FORMAT_SUM);
         return save;
    @@ -151,22 +151,22 @@ 

    -void EmitArrays::numeric_entry(inter_ti N) {
    +void EmitArrays::numeric_entry(inter_ti N) {
         EmitArrays::entry_inner(InterValuePairs::number(N));
     }
     
    -void EmitArrays::iname_entry(inter_name *iname) {
    +void EmitArrays::iname_entry(inter_name *iname) {
         inter_symbol *alias;
         if (iname == NULL) alias = InterNames::to_symbol(Hierarchy::find(NOTHING_HL));
         else alias = InterNames::to_symbol(iname);
         EmitArrays::entry_inner(Emit::symbol_to_value_pair(alias));
     }
     
    -void EmitArrays::null_entry(void) {
    +void EmitArrays::null_entry(void) {
         EmitArrays::iname_entry(Hierarchy::find(NULL_HL));
     }
     
    -void EmitArrays::text_entry(text_stream *content) {
    +void EmitArrays::text_entry(text_stream *content) {
         inter_pair val = InterValuePairs::from_text(Emit::at(), content);
         EmitArrays::entry_inner(val);
     }
    @@ -189,7 +189,7 @@ 

    -void EmitArrays::end(packaging_state save) {
    +void EmitArrays::end(packaging_state save) {
         EmitArrays::end_inner();
         Packaging::exit(Emit::tree(), save);
     }
    diff --git a/docs/runtime-module/2-ec.html b/docs/runtime-module/2-ec.html
    index dccd91eed0..fcf90f6a80 100644
    --- a/docs/runtime-module/2-ec.html
    +++ b/docs/runtime-module/2-ec.html
    @@ -95,10 +95,10 @@ 

  • EmitCode::up then returns us back to where we were.
  • -void EmitCode::up(void) {
    +void EmitCode::up(void) {
         Produce::up(Emit::tree());
     }
    -void EmitCode::down(void) {
    +void EmitCode::down(void) {
         Produce::down(Emit::tree());
     }
     
    @@ -114,7 +114,7 @@

    §5. Structural.

    -void EmitCode::code(void) {
    +void EmitCode::code(void) {
         Produce::code(Emit::tree());
     }
     
    @@ -138,23 +138,23 @@ 

    -void EmitCode::val_number(inter_ti N) {
    +void EmitCode::val_number(inter_ti N) {
         Produce::val(Emit::tree(), K_number, InterValuePairs::number(N));
     }
     
    -void EmitCode::val_true(void) {
    +void EmitCode::val_true(void) {
         Produce::val(Emit::tree(), K_truth_state, InterValuePairs::number(1));
     }
     
    -void EmitCode::val_false(void) {
    +void EmitCode::val_false(void) {
         Produce::val(Emit::tree(), K_truth_state, InterValuePairs::number(0));
     }
     
    -void EmitCode::val_iname(kind *K, inter_name *iname) {
    +void EmitCode::val_iname(kind *K, inter_name *iname) {
         Produce::val_iname(Emit::tree(), K, iname);
     }
     
    -void EmitCode::val_text(text_stream *text) {
    +void EmitCode::val_text(text_stream *text) {
         Produce::val_text(Emit::tree(), text);
     }
     
    @@ -166,11 +166,11 @@ 

    Produce::val_real(Emit::tree(), g); } -void EmitCode::val_nothing(void) { +void EmitCode::val_nothing(void) { Produce::val_nothing(Emit::tree()); } -void EmitCode::val_symbol(kind *K, inter_symbol *S) { +void EmitCode::val_symbol(kind *K, inter_symbol *S) { Produce::val_symbol(Emit::tree(), K, S); }

    @@ -277,11 +277,11 @@

    -void EmitCode::inv(inter_ti bip) {
    +void EmitCode::inv(inter_ti bip) {
         Produce::inv_primitive(Emit::tree(), bip);
     }
     
    -void EmitCode::call(inter_name *fn_iname) {
    +void EmitCode::call(inter_name *fn_iname) {
         Produce::inv_call_iname(Emit::tree(), fn_iname);
     }
     
    @@ -295,11 +295,11 @@ 

    -void EmitCode::rtrue(void) {
    +void EmitCode::rtrue(void) {
         Produce::rtrue(Emit::tree());
     }
     
    -void EmitCode::rfalse(void) {
    +void EmitCode::rfalse(void) {
         Produce::rfalse(Emit::tree());
     }
     
    diff --git a/docs/runtime-module/2-emt.html b/docs/runtime-module/2-emt.html index 0ef9a4712f..c1e64ec8e5 100644 --- a/docs/runtime-module/2-emt.html +++ b/docs/runtime-module/2-emt.html @@ -193,7 +193,7 @@

    -inter_name *Emit::numeric_constant(inter_name *con_iname, inter_ti val) {
    +inter_name *Emit::numeric_constant(inter_name *con_iname, inter_ti val) {
         return Emit::numeric_constant_inner(con_iname,
             InterValuePairs::number_in_base(val, 10), INT32_ITCONC);
     }
    @@ -255,7 +255,7 @@ 

    -inter_name *Emit::iname_constant(inter_name *con_iname, kind *K, inter_name *val_iname) {
    +inter_name *Emit::iname_constant(inter_name *con_iname, kind *K, inter_name *val_iname) {
         packaging_state save = Packaging::enter_home_of(con_iname);
         inter_symbol *con_s = InterNames::to_symbol(con_iname);
         inter_symbol *val_s = (val_iname)?InterNames::to_symbol(val_iname):NULL;
    diff --git a/docs/runtime-module/2-hrr.html b/docs/runtime-module/2-hrr.html
    index a4d0d2f954..3989e42e59 100644
    --- a/docs/runtime-module/2-hrr.html
    +++ b/docs/runtime-module/2-hrr.html
    @@ -2234,7 +2234,7 @@ 

    -inter_name *Hierarchy::find(int id) {
    +inter_name *Hierarchy::find(int id) {
         return HierarchyLocations::iname(Emit::tree(), id);
     }
     
    @@ -2257,7 +2257,7 @@

    -inter_name *Hierarchy::make_iname_in(int id, package_request *P) {
    +inter_name *Hierarchy::make_iname_in(int id, package_request *P) {
         return HierarchyLocations::make_iname_in(Emit::tree(), id, P);
     }
     
    @@ -2319,7 +2319,7 @@

    -void Hierarchy::make_available(inter_name *iname) {
    +void Hierarchy::make_available(inter_name *iname) {
         text_stream *ma_as = InterNames::get_translation(iname);
         if (Str::len(ma_as) == 0) ma_as = InterNames::to_text(iname);
         LargeScale::package_type(Emit::tree(), I"_linkage");
    @@ -2425,12 +2425,12 @@ 

    -void Hierarchy::apply_metadata(package_request *P, int id, text_stream *value) {
    +void Hierarchy::apply_metadata(package_request *P, int id, text_stream *value) {
         inter_name *iname = Hierarchy::make_iname_in(id, P);
         Emit::text_constant(iname, value);
     }
     
    -void Hierarchy::apply_metadata_from_number(package_request *P, int id, inter_ti N) {
    +void Hierarchy::apply_metadata_from_number(package_request *P, int id, inter_ti N) {
         inter_name *iname = Hierarchy::make_iname_in(id, P);
         Emit::numeric_constant(iname, N);
     }
    diff --git a/docs/runtime-module/2-ic.html b/docs/runtime-module/2-ic.html
    index eebd912c15..152fe9ad66 100644
    --- a/docs/runtime-module/2-ic.html
    +++ b/docs/runtime-module/2-ic.html
    @@ -118,7 +118,7 @@ 

    §4.

    -inter_name *InstanceCounting::IK_count_property(kind *K) {
    +inter_name *InstanceCounting::IK_count_property(kind *K) {
         if (Kinds::Behaviour::is_subkind_of_object(K)) {
             inference_subject *subj = KindSubjects::from_kind(K);
             property *P = COUNTING_DATA(subj)->IK_count_prop;
    diff --git a/docs/runtime-module/2-kd.html b/docs/runtime-module/2-kd.html
    index 434bf44f58..5e88cf1f8f 100644
    --- a/docs/runtime-module/2-kd.html
    +++ b/docs/runtime-module/2-kd.html
    @@ -130,7 +130,7 @@ 

    -inter_name *RTKindDeclarations::iname(kind *K) {
    +inter_name *RTKindDeclarations::iname(kind *K) {
         if (RTKindDeclarations::base_represented_in_Inter(K)) {
             noun *nt = Kinds::Behaviour::get_noun(K);
             if ((nt) && (NounIdentifiers::iname_set(nt) == FALSE))
    diff --git a/docs/runtime-module/2-th.html b/docs/runtime-module/2-th.html
    index 89e6a13df3..72e82506bf 100644
    --- a/docs/runtime-module/2-th.html
    +++ b/docs/runtime-module/2-th.html
    @@ -185,7 +185,7 @@ 

    define BLK_FLAG_TRUNCMULT 0x00000010

    -void TheHeap::emit_block_value_header(kind *K, int individual, int size) {
    +void TheHeap::emit_block_value_header(kind *K, int individual, int size) {
         if (individual == FALSE) EmitArrays::numeric_entry(0);
         int n = 0, c = 1, w = 4;
         if (TargetVMs::is_16_bit(Task::vm())) w = 2;
    diff --git a/docs/runtime-module/5-cnj.html b/docs/runtime-module/5-cnj.html
    index 637dcfb05e..bc3f1670d9 100644
    --- a/docs/runtime-module/5-cnj.html
    +++ b/docs/runtime-module/5-cnj.html
    @@ -317,8 +317,10 @@ 

    verb_meaning *vm = (vi)?Verbs::first_unspecial_meaning_of_verb_form(Verbs::base_form(vi)):NULL; binary_predicate *meaning = VerbMeanings::get_regular_meaning(vm); - inter_name *rel_iname = RTRelations::default_iname(); - if (meaning) rel_iname = RTRelations::iname(meaning); + inter_name *rel_iname = Hierarchy::find(MEANINGLESS_RR_HL); + if ((copular_verb) && (vc == copular_verb->conjugation)) + rel_iname = RTRelations::iname(R_equality); + else if (meaning) rel_iname = RTRelations::iname(meaning); EmitCode::inv(CASE_BIP); EmitCode::down(); @@ -547,9 +549,11 @@

    EmitCode::up(); verb_meaning *vm = &(vf->list_of_senses->vm); - inter_name *rel_iname = RTRelations::default_iname(); + inter_name *rel_iname = Hierarchy::find(MEANINGLESS_RR_HL); binary_predicate *meaning = VerbMeanings::get_regular_meaning(vm); - if (meaning) rel_iname = RTRelations::iname(meaning); + if ((copular_verb) && (vc == copular_verb->conjugation)) + rel_iname = RTRelations::iname(R_equality); + else if (meaning) rel_iname = RTRelations::iname(meaning); EmitCode::inv(IF_BIP); EmitCode::down(); diff --git a/docs/runtime-module/5-kc.html b/docs/runtime-module/5-kc.html index f3b4c0acea..de02cb4090 100644 --- a/docs/runtime-module/5-kc.html +++ b/docs/runtime-module/5-kc.html @@ -261,7 +261,7 @@

    §4.

    -inter_name *RTKindConstructors::get_iname(kind *K) {
    +inter_name *RTKindConstructors::get_iname(kind *K) {
         if (K == NULL) {
             if (K_number) return RTKindConstructors::get_iname(K_number);
             internal_error("null kind has no printing routine");
    diff --git a/docs/runtime-module/5-ki.html b/docs/runtime-module/5-ki.html
    index 0758ecf840..f75d68fbae 100644
    --- a/docs/runtime-module/5-ki.html
    +++ b/docs/runtime-module/5-ki.html
    @@ -217,7 +217,7 @@ 

    -void RTKindIDs::strong_ID_array_entry(kind *K) {
    +void RTKindIDs::strong_ID_array_entry(kind *K) {
         runtime_kind_structure *rks = RTKindIDs::get_rks(K);
         if (rks) {
             EmitArrays::iname_entry(rks->rks_iname);
    @@ -226,7 +226,7 @@ 

    } } -void RTKindIDs::emit_strong_ID_as_val(kind *K) { +void RTKindIDs::emit_strong_ID_as_val(kind *K) { runtime_kind_structure *rks = RTKindIDs::get_rks(K); if (rks) { EmitCode::val_iname(K_value, rks->rks_iname); diff --git a/docs/runtime-module/5-prp.html b/docs/runtime-module/5-prp.html index d68259c37d..00a270c7a8 100644 --- a/docs/runtime-module/5-prp.html +++ b/docs/runtime-module/5-prp.html @@ -112,7 +112,7 @@

    return prn->compilation_data.prop_package; } -inter_name *RTProperties::iname(property *prn) { +inter_name *RTProperties::iname(property *prn) { if (prn == NULL) internal_error("tried to find iname for null property"); if ((Properties::is_either_or(prn)) && (prn->compilation_data.store_in_negation)) return RTProperties::iname(EitherOrProperties::get_negation(prn)); diff --git a/docs/runtime-module/5-rlt.html b/docs/runtime-module/5-rlt.html index d8fcf56574..f3ae9984c7 100644 --- a/docs/runtime-module/5-rlt.html +++ b/docs/runtime-module/5-rlt.html @@ -73,7 +73,7 @@

    To compile the relations submodule for a compilation unit, which contains _relation packages.

    -
    +

    §1. The generic/relations package. A few constants before we get under way. These are permission bits intended to form a bitmap in arbitrary combinations. @@ -152,7 +152,7 @@

    return bpcd; } -package_request *RTRelations::package(binary_predicate *bp) { +package_request *RTRelations::package(binary_predicate *bp) { if (bp == NULL) internal_error("null bp"); if (bp->compilation_data.bp_package == NULL) bp->compilation_data.bp_package = @@ -165,37 +165,25 @@

    reversals of relations used only one way around. It would be wasteful to compile arrays or functions for those, so we keep track of which have actually been requested — it will be just those for which the runtime representation, -i.e., the result of RTRelations::iname, has been called for. This can +i.e., the result of RTRelations::iname, has been called for. This can therefore be forced with:

     void RTRelations::mark_as_needed(binary_predicate *bp) {
    -    RTRelations::iname(bp);
    -}
    -
    -

    §4. The default relation is the first one made: -

    - -
    -inter_name *default_rr = NULL;
    -inter_name *RTRelations::default_iname(void) {
    -    return default_rr;
    +    RTRelations::iname(bp);
     }
     
    -inter_name *RTRelations::iname(binary_predicate *bp) {
    +inter_name *RTRelations::iname(binary_predicate *bp) {
         bp->compilation_data.record_needed = TRUE;
    -    if (bp->compilation_data.data_iname == NULL) {
    +    if (bp->compilation_data.data_iname == NULL)
             bp->compilation_data.data_iname =
                 Hierarchy::make_iname_in(RELATION_RECORD_HL,
                     RTRelations::package(bp));
    -        if (default_rr == NULL)
    -            default_rr = bp->compilation_data.data_iname;
    -    }
         return bp->compilation_data.data_iname;
     }
     
    -inter_name *RTRelations::initialiser_iname(binary_predicate *bp) {
    +inter_name *RTRelations::initialiser_iname(binary_predicate *bp) {
         if (bp->compilation_data.initialiser_iname == NULL)
             bp->compilation_data.initialiser_iname =
                 Hierarchy::make_iname_in(RELATION_INITIALISER_FN_HL,
    @@ -203,7 +191,7 @@ 

    return bp->compilation_data.initialiser_iname; } -inter_name *RTRelations::handler_iname(binary_predicate *bp) { +inter_name *RTRelations::handler_iname(binary_predicate *bp) { if (bp->compilation_data.handler_iname == NULL) bp->compilation_data.handler_iname = Hierarchy::make_iname_in(HANDLER_FN_HL, @@ -220,11 +208,11 @@

    bp->compilation_data.guarding = rg; }

    -

    §5. Compilation. A few built-in relations will have only a minimal presence at runtime: these. +

    §4. Compilation. A few built-in relations will have only a minimal presence at runtime: these.

    -int RTRelations::minimal(binary_predicate *bp) {
    +int RTRelations::minimal(binary_predicate *bp) {
         if (bp == NULL) return FALSE;
         if ((bp == R_equality) || (bp->reversal == R_equality)) return TRUE;
         if ((bp == R_meaning) || (bp->reversal == R_meaning)) return TRUE;
    @@ -234,9 +222,9 @@ 

    } void RTRelations::compile(void) { - if (RTRelations::default_iname()) { + if (R_empty) { inter_name *iname = Hierarchy::find(MEANINGLESS_RR_HL); - Emit::iname_constant(iname, K_value, RTRelations::default_iname()); + Emit::iname_constant(iname, K_value, RTRelations::iname(R_empty)); Hierarchy::make_available(iname); } @@ -245,12 +233,12 @@

    if (bp->compilation_data.record_needed) { text_stream *desc = Str::new(); WRITE_TO(desc, "relation %A", &(bp->relation_name)); - Sequence::queue_at(&RTRelations::compilation_agent, + Sequence::queue_at(&RTRelations::compilation_agent, STORE_POINTER_binary_predicate(bp), desc, bp->bp_created_at); if (bp->compilation_data.guarding) { text_stream *desc = Str::new(); WRITE_TO(desc, "relation guard for %A", &(bp->relation_name)); - Sequence::queue_at(&RTRelations::guard_compilation_agent, + Sequence::queue_at(&RTRelations::guard_compilation_agent, STORE_POINTER_relation_guard(bp->compilation_data.guarding), desc, bp->bp_created_at); } @@ -258,25 +246,25 @@

    if ((bp->compilation_data.record_needed) || (bp->right_way_round)) { text_stream *mdesc = Str::new(); WRITE_TO(mdesc, "relation metadata for %A", &(bp->relation_name)); - Sequence::queue_at(&RTRelations::metadata_agent, + Sequence::queue_at(&RTRelations::metadata_agent, STORE_POINTER_binary_predicate(bp), mdesc, bp->bp_created_at); } } }

    -

    §6. Metadata packages need to be made even when a relation has no array-like +

    §5. Metadata packages need to be made even when a relation has no array-like existence at runtime, for the sake of the index.

    -void RTRelations::metadata_agent(compilation_subtask *t) {
    +void RTRelations::metadata_agent(compilation_subtask *t) {
         binary_predicate *bp = RETRIEVE_POINTER_binary_predicate(t->data);
         package_request *pack = RTRelations::package(bp);
         inter_name *id_iname = Hierarchy::make_iname_in(RELATION_ID_HL, pack);
         Emit::numeric_constant(id_iname, 0);
         if (bp->compilation_data.record_needed) {
             inter_name *md_iname = Hierarchy::make_iname_in(RELATION_VALUE_MD_HL, pack);
    -        Emit::iname_constant(md_iname, K_value, RTRelations::iname(bp));
    +        Emit::iname_constant(md_iname, K_value, RTRelations::iname(bp));
         }
         TEMPORARY_TEXT(desc)
         BinaryPredicateFamilies::describe_for_index(desc, bp);
    @@ -300,7 +288,7 @@ 

    (inter_ti) Wordings::first_wn(Node::get_text(bp->bp_created_at))); }

    -

    §7. So the following makes a single _relation package. +

    §6. So the following makes a single _relation package.

    It might seem that this can never be called on a relation which is the wrong @@ -312,36 +300,36 @@

    -void RTRelations::compilation_agent(compilation_subtask *t) {
    +void RTRelations::compilation_agent(compilation_subtask *t) {
         binary_predicate *bp = RETRIEVE_POINTER_binary_predicate(t->data);
         package_request *pack = RTRelations::package(bp);
         inter_name *handler = NULL;
     
         if (ExplicitRelations::stored_dynamically(bp) == FALSE)
    -        Compile the relation handler function7.4;
    +        Compile the relation handler function6.4;
         if (bp->right_way_round) {
             if (ExplicitRelations::stored_dynamically(bp)) {
    -            Compile the initialiser function7.1;
    -            Compile the creator function and its associated metadata7.2;
    +            Compile the initialiser function6.1;
    +            Compile the creator function and its associated metadata6.2;
             } else {
                 int f = ExplicitRelations::get_form_of_relation(bp);
                 if ((f == Relation_VtoV) || (f == Relation_Sym_VtoV))
    -                RTRelations::compile_vtov_storage(bp);
    +                RTRelations::compile_vtov_storage(bp);
             }
             if (bp->relation_family == by_function_bp_family) {
                 by_function_bp_data *D = RETRIEVE_POINTER_by_function_bp_data(bp->family_specific);
    -            RTRelations::compile_function_to_decide(D->bp_by_routine_iname,
    +            RTRelations::compile_function_to_decide(D->bp_by_routine_iname,
                     D->condition_defn_text, bp->term_details[0], bp->term_details[1]);
             }
         }
    -    Compile the metadata array7.3;
    +    Compile the metadata array6.3;
     }
     
    -

    §7.1. Compile the initialiser function7.1 = +

    §6.1. Compile the initialiser function6.1 =

    -    packaging_state save = Functions::begin(RTRelations::initialiser_iname(bp));
    +    packaging_state save = Functions::begin(RTRelations::initialiser_iname(bp));
         inference *i;
         inter_name *rtiname = Hierarchy::find(RELATIONTEST_HL);
         POSITIVE_KNOWLEDGE_LOOP(i, RelationSubjects::from_bp(bp), relation_inf) {
    @@ -349,7 +337,7 @@ 

    RelationInferences::get_term_specs(i, &spec0, &spec1); EmitCode::call(rtiname); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::val_iname(K_value, Hierarchy::find(RELS_ASSERT_TRUE_HL)); CompileValues::to_code_val(spec0); CompileValues::to_code_val(spec1); @@ -357,8 +345,8 @@

    } Functions::end(save);

    - -

    §7.2. Compile the creator function and its associated metadata7.2 = +

    • This code is used in §6.
    +

    §6.2. Compile the creator function and its associated metadata6.2 =

    @@ -370,12 +358,12 @@ 

    EmitCode::call(Hierarchy::find(BLKVALUECREATE_HL)); EmitCode::down(); RTKindIDs::emit_strong_ID_as_val(BinaryPredicates::kind(bp)); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::up(); EmitCode::call(Hierarchy::find(RELATION_TY_NAME_HL)); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); TEMPORARY_TEXT(A) WRITE_TO(A, "%A", &(bp->relation_name)); EmitCode::val_text(A); @@ -386,40 +374,40 @@

    case Relation_OtoO: EmitCode::call(Hierarchy::find(RELATION_TY_OTOOADJECTIVE_HL)); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::val_true(); EmitCode::up(); break; case Relation_OtoV: EmitCode::call(Hierarchy::find(RELATION_TY_OTOVADJECTIVE_HL)); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::val_true(); EmitCode::up(); break; case Relation_VtoO: EmitCode::call(Hierarchy::find(RELATION_TY_VTOOADJECTIVE_HL)); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::val_true(); EmitCode::up(); break; case Relation_Sym_OtoO: EmitCode::call(Hierarchy::find(RELATION_TY_OTOOADJECTIVE_HL)); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::val_true(); EmitCode::up(); EmitCode::call(Hierarchy::find(RELATION_TY_SYMMETRICADJECTIVE_HL)); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::val_true(); EmitCode::up(); break; case Relation_Equiv: EmitCode::call(Hierarchy::find(RELATION_TY_EQUIVALENCEADJECTIVE_HL)); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::val_true(); EmitCode::up(); break; @@ -427,42 +415,42 @@

    case Relation_Sym_VtoV: EmitCode::call(Hierarchy::find(RELATION_TY_SYMMETRICADJECTIVE_HL)); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::val_true(); EmitCode::up(); break; } EmitCode::inv(INDIRECT0V_BIP); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::initialiser_iname(bp)); + EmitCode::val_iname(K_value, RTRelations::initialiser_iname(bp)); EmitCode::up(); Functions::end(save); inter_name *md_iname = Hierarchy::make_iname_in(RELATION_CREATOR_MD_HL, pack); Emit::iname_constant(md_iname, K_value, iname);

    -
    • This code is used in §7.
    -

    §7.3. Compile the metadata array7.3 = +

    • This code is used in §6.
    +

    §6.3. Compile the metadata array6.3 =

    -    packaging_state save = EmitArrays::begin_unchecked(RTRelations::iname(bp));
    +    packaging_state save = EmitArrays::begin_unchecked(RTRelations::iname(bp));
         if (ExplicitRelations::stored_dynamically(bp)) {
             EmitArrays::numeric_entry((inter_ti) 1);
         } else {
             TheHeap::emit_block_value_header(BinaryPredicates::kind(bp), FALSE, 8);
             EmitArrays::null_entry();
             EmitArrays::null_entry();
    -        Write the name field of the relation record7.3.1;
    -        Write the permissions field of the relation record7.3.2;
    -        Write the storage field of the relation metadata array7.3.3;
    -        Write the kind field of the relation record7.3.4;
    -        Write the handler field of the relation record7.3.6;
    -        Write the description field of the relation record7.3.5;
    +        Write the name field of the relation record6.3.1;
    +        Write the permissions field of the relation record6.3.2;
    +        Write the storage field of the relation metadata array6.3.3;
    +        Write the kind field of the relation record6.3.4;
    +        Write the handler field of the relation record6.3.6;
    +        Write the description field of the relation record6.3.5;
         }
         EmitArrays::end(save);
     
    -
    • This code is used in §7.
    -

    §7.3.1. Write the name field of the relation record7.3.1 = +

    • This code is used in §6.
    +

    §6.3.1. Write the name field of the relation record6.3.1 =

    @@ -471,8 +459,8 @@ 

    EmitArrays::text_entry(NF); DISCARD_TEXT(NF)

    -
    • This code is used in §7.3.
    -

    §7.3.2. Write the permissions field of the relation record7.3.2 = +

    • This code is used in §6.3.
    +

    §6.3.2. Write the permissions field of the relation record6.3.2 =

    @@ -482,7 +470,7 @@ 

    packaging_state save_sum = EmitArrays::begin_sum_constant(bm_symb, K_value); if (Hierarchy::find(RELS_TEST_HL) == NULL) internal_error("no RELS symbols yet"); EmitArrays::iname_entry(Hierarchy::find(RELS_TEST_HL)); - if (RTRelations::minimal(bp) == FALSE) { + if (RTRelations::minimal(bp) == FALSE) { EmitArrays::iname_entry(Hierarchy::find(RELS_LOOKUP_ANY_HL)); EmitArrays::iname_entry(Hierarchy::find(RELS_LOOKUP_ALL_X_HL)); EmitArrays::iname_entry(Hierarchy::find(RELS_LOOKUP_ALL_X_HL)); @@ -490,7 +478,7 @@

    } switch(ExplicitRelations::get_form_of_relation(dbp)) { case Relation_Implicit: - if ((RTRelations::minimal(bp) == FALSE) && + if ((RTRelations::minimal(bp) == FALSE) && (BinaryPredicates::can_be_made_true_at_runtime(dbp))) { EmitArrays::iname_entry(Hierarchy::find(RELS_ASSERT_TRUE_HL)); EmitArrays::iname_entry(Hierarchy::find(RELS_ASSERT_FALSE_HL)); @@ -500,32 +488,32 @@

    case Relation_OtoO: EmitArrays::iname_entry(Hierarchy::find(RELS_X_UNIQUE_HL)); EmitArrays::iname_entry(Hierarchy::find(RELS_Y_UNIQUE_HL)); - Throw in the full suite7.3.2.1; break; + Throw in the full suite6.3.2.1; break; case Relation_OtoV: EmitArrays::iname_entry(Hierarchy::find(RELS_X_UNIQUE_HL)); - Throw in the full suite7.3.2.1; break; + Throw in the full suite6.3.2.1; break; case Relation_VtoO: EmitArrays::iname_entry(Hierarchy::find(RELS_Y_UNIQUE_HL)); - Throw in the full suite7.3.2.1; break; + Throw in the full suite6.3.2.1; break; case Relation_Sym_OtoO: EmitArrays::iname_entry(Hierarchy::find(RELS_SYMMETRIC_HL)); EmitArrays::iname_entry(Hierarchy::find(RELS_X_UNIQUE_HL)); EmitArrays::iname_entry(Hierarchy::find(RELS_Y_UNIQUE_HL)); - Throw in the full suite7.3.2.1; break; + Throw in the full suite6.3.2.1; break; case Relation_Equiv: EmitArrays::iname_entry(Hierarchy::find(RELS_EQUIVALENCE_HL)); - Throw in the full suite7.3.2.1; break; + Throw in the full suite6.3.2.1; break; case Relation_VtoV: - Throw in the full suite7.3.2.1; break; + Throw in the full suite6.3.2.1; break; case Relation_Sym_VtoV: EmitArrays::iname_entry(Hierarchy::find(RELS_SYMMETRIC_HL)); - Throw in the full suite7.3.2.1; break; + Throw in the full suite6.3.2.1; break; default: internal_error("Binary predicate with unknown structural type"); } EmitArrays::end(save_sum); of the summation, that is EmitArrays::iname_entry(bm_symb);

    -
    • This code is used in §7.3.
    -

    §7.3.2.1. Throw in the full suite7.3.2.1 = +

    • This code is used in §6.3.
    +

    §6.3.2.1. Throw in the full suite6.3.2.1 =

    @@ -534,11 +522,11 @@ 

    EmitArrays::iname_entry(Hierarchy::find(RELS_SHOW_HL)); EmitArrays::iname_entry(Hierarchy::find(RELS_ROUTE_FIND_HL));

    -
    • This code is used in §7.3.2 (7 times).
    -

    §7.3.3. The storage field has different meanings for different families of BPs: +

    • This code is used in §6.3.2 (7 times).
    +

    §6.3.3. The storage field has different meanings for different families of BPs:

    -

    Write the storage field of the relation metadata array7.3.3 = +

    Write the storage field of the relation metadata array6.3.3 =

    @@ -572,15 +560,15 @@ 

    } }

    - -

    §7.3.4. Write the kind field of the relation record7.3.4 = +

    • This code is used in §6.3.
    +

    §6.3.4. Write the kind field of the relation record6.3.4 =

         RTKindIDs::strong_ID_array_entry(BinaryPredicates::kind(bp));
     
    -
    • This code is used in §7.3.
    -

    §7.3.5. Write the description field of the relation record7.3.5 = +

    • This code is used in §6.3.
    +

    §6.3.5. Write the description field of the relation record6.3.5 =

    @@ -591,15 +579,15 @@ 

    EmitArrays::text_entry(DF); DISCARD_TEXT(DF)

    -
    • This code is used in §7.3.
    -

    §7.3.6. Write the handler field of the relation record7.3.6 = +

    • This code is used in §6.3.
    +

    §6.3.6. Write the handler field of the relation record6.3.6 =

         EmitArrays::iname_entry(handler);
     
    -
    • This code is used in §7.3.
    -

    §7.4. Compile the relation handler function7.4 = +

    • This code is used in §6.3.
    +

    §6.4. Compile the relation handler function6.4 =

    @@ -607,7 +595,7 @@ 

    binary_predicate *dbp = bp; if (bp->right_way_round == FALSE) { X = I"Y"; Y = I"X"; dbp = bp->reversal; } - handler = RTRelations::handler_iname(bp); + handler = RTRelations::handler_iname(bp); packaging_state save = Functions::begin(handler); inter_symbol *rr_s = LocalVariables::new_other_as_symbol(I"rr"); inter_symbol *task_s = LocalVariables::new_other_as_symbol(I"task"); @@ -635,15 +623,15 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_TEST_HL)); EmitCode::code(); EmitCode::down(); - The TEST task7.4.4; + The TEST task6.4.4; EmitCode::up(); EmitCode::up(); - if (RTRelations::minimal(bp)) { + if (RTRelations::minimal(bp)) { EmitCode::inv(DEFAULT_BIP); EmitCode::down(); EmitCode::code(); EmitCode::down(); - The default case for minimal relations only7.4.1; + The default case for minimal relations only6.4.1; EmitCode::up(); EmitCode::up(); } else { @@ -652,7 +640,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_LOOKUP_ANY_HL)); EmitCode::code(); EmitCode::down(); - The LOOKUP ANY task7.4.9; + The LOOKUP ANY task6.4.9; EmitCode::up(); EmitCode::up(); EmitCode::inv(CASE_BIP); @@ -660,7 +648,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_LOOKUP_ALL_X_HL)); EmitCode::code(); EmitCode::down(); - The LOOKUP ALL X task7.4.10; + The LOOKUP ALL X task6.4.10; EmitCode::up(); EmitCode::up(); EmitCode::inv(CASE_BIP); @@ -668,7 +656,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_LOOKUP_ALL_Y_HL)); EmitCode::code(); EmitCode::down(); - The LOOKUP ALL Y task7.4.11; + The LOOKUP ALL Y task6.4.11; EmitCode::up(); EmitCode::up(); EmitCode::inv(CASE_BIP); @@ -676,7 +664,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_LIST_HL)); EmitCode::code(); EmitCode::down(); - The LIST task7.4.12; + The LIST task6.4.12; EmitCode::up(); EmitCode::up(); if (BinaryPredicates::can_be_made_true_at_runtime(bp)) { @@ -685,7 +673,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_ASSERT_TRUE_HL)); EmitCode::code(); EmitCode::down(); - The ASSERT TRUE task7.4.2; + The ASSERT TRUE task6.4.2; EmitCode::up(); EmitCode::up(); EmitCode::inv(CASE_BIP); @@ -693,7 +681,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_ASSERT_FALSE_HL)); EmitCode::code(); EmitCode::down(); - The ASSERT FALSE task7.4.3; + The ASSERT FALSE task6.4.3; EmitCode::up(); EmitCode::up(); } @@ -714,7 +702,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_SHOW_HL)); EmitCode::code(); EmitCode::down(); - The SHOW task7.4.7; + The SHOW task6.4.7; EmitCode::up(); EmitCode::up(); } @@ -735,7 +723,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_EMPTY_HL)); EmitCode::code(); EmitCode::down(); - The EMPTY task7.4.8; + The EMPTY task6.4.8; EmitCode::up(); EmitCode::up(); } @@ -758,7 +746,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_ROUTE_FIND_HL)); EmitCode::code(); EmitCode::down(); - The ROUTE FIND task7.4.5; + The ROUTE FIND task6.4.5; EmitCode::up(); EmitCode::up(); EmitCode::inv(CASE_BIP); @@ -766,7 +754,7 @@

    EmitCode::val_iname(K_value, Hierarchy::find(RELS_ROUTE_FIND_COUNT_HL)); EmitCode::code(); EmitCode::down(); - The ROUTE FIND COUNT task7.4.6; + The ROUTE FIND COUNT task6.4.6; EmitCode::up(); EmitCode::up(); } @@ -777,8 +765,8 @@

    EmitCode::rfalse(); Functions::end(save);

    -
    • This code is used in §7.
    -

    §7.4.1. The default case for minimal relations only7.4.1 = +

    • This code is used in §6.
    +

    §6.4.1. The default case for minimal relations only6.4.1 =

    @@ -787,11 +775,11 @@ 

    EmitCode::val_iname(K_value, Hierarchy::find(RTP_RELMINIMAL_HL)); EmitCode::val_symbol(K_value, task_s); EmitCode::val_number(0); - EmitCode::val_iname(K_value, RTRelations::iname(bp)); + EmitCode::val_iname(K_value, RTRelations::iname(bp)); EmitCode::up();

    -
    • This code is used in §7.4.
    -

    §7.4.2. The ASSERT TRUE task7.4.2 = +

    • This code is used in §6.4.
    +

    §6.4.2. The ASSERT TRUE task6.4.2 =

    @@ -803,8 +791,8 @@ 

    EmitCode::rtrue(); }

    -
    • This code is used in §7.4.
    -

    §7.4.3. The ASSERT FALSE task7.4.3 = +

    • This code is used in §6.4.
    +

    §6.4.3. The ASSERT FALSE task6.4.3 =

    @@ -816,8 +804,8 @@ 

    EmitCode::rtrue(); }

    -
    • This code is used in §7.4.
    -

    §7.4.4. The TEST task7.4.4 = +

    • This code is used in §6.4.
    +

    §6.4.4. The TEST task6.4.4 =

    @@ -857,8 +845,8 @@ 

    EmitCode::up(); EmitCode::rfalse();

    -
    • This code is used in §7.4.
    -

    §7.4.5. The ROUTE FIND task7.4.5 = +

    • This code is used in §6.4.
    +

    §6.4.5. The ROUTE FIND task6.4.5 =

    @@ -867,14 +855,14 @@ 

    EmitCode::inv(INDIRECT3_BIP); EmitCode::down(); EmitCode::val_iname(K_value, router); - Expand the ID operand7.4.5.1; + Expand the ID operand6.4.5.1; EmitCode::val_symbol(K_value, X_s); EmitCode::val_symbol(K_value, Y_s); EmitCode::up(); EmitCode::up();

    -
    • This code is used in §7.4.
    -

    §7.4.5.1. Expand the ID operand7.4.5.1 = +

    • This code is used in §6.4.
    +

    §6.4.5.1. Expand the ID operand6.4.5.1 =

    @@ -888,8 +876,8 @@ 

    EmitCode::val_symbol(K_value, rr_s); }

    - -

    §7.4.6. The ROUTE FIND COUNT task7.4.6 = +

    +

    §6.4.6. The ROUTE FIND COUNT task6.4.6 =

    @@ -901,7 +889,7 @@ 

    EmitCode::inv(INDIRECT3_BIP); EmitCode::down(); EmitCode::val_iname(K_value, router); - Expand the ID operand7.4.5.1; + Expand the ID operand6.4.5.1; EmitCode::val_symbol(K_value, X_s); EmitCode::val_symbol(K_value, Y_s); EmitCode::up(); @@ -912,7 +900,7 @@

    EmitCode::inv(INDIRECT4_BIP); EmitCode::down(); EmitCode::val_iname(K_value, router); - Expand the ID operand7.4.5.1; + Expand the ID operand6.4.5.1; EmitCode::val_symbol(K_value, X_s); EmitCode::val_symbol(K_value, Y_s); EmitCode::val_true(); @@ -920,8 +908,8 @@

    } EmitCode::up();

    -
    • This code is used in §7.4.
    -

    §7.4.7. The SHOW task7.4.7 = +

    • This code is used in §6.4.
    +

    §6.4.7. The SHOW task6.4.7 =

    @@ -933,8 +921,8 @@ 

    EmitCode::up(); EmitCode::rtrue();

    -
    • This code is used in §7.4.
    -

    §7.4.8. The EMPTY task7.4.8 = +

    • This code is used in §6.4.
    +

    §6.4.8. The EMPTY task6.4.8 =

    @@ -953,8 +941,8 @@ 

    EmitCode::up(); EmitCode::up();

    -
    • This code is used in §7.4.
    -

    §7.4.9. The LOOKUP ANY task7.4.9 = +

    • This code is used in §6.4.
    +

    §6.4.9. The LOOKUP ANY task6.4.9 =

    @@ -976,17 +964,17 @@ 

    EmitCode::code(); EmitCode::down(); int t = 0; - Write rels lookup7.4.9.1; + Write rels lookup6.4.9.1; EmitCode::up(); EmitCode::code(); EmitCode::down(); t = 1; - Write rels lookup7.4.9.1; + Write rels lookup6.4.9.1; EmitCode::up(); EmitCode::up();

    -
    • This code is used in §7.4.
    -

    §7.4.10. The LOOKUP ALL X task7.4.10 = +

    • This code is used in §6.4.
    +

    §6.4.10. The LOOKUP ALL X task6.4.10 =

    @@ -997,15 +985,15 @@ 

    EmitCode::up(); int t = 0; - Write rels lookup list7.4.10.1; + Write rels lookup list6.4.10.1; EmitCode::inv(RETURN_BIP); EmitCode::down(); EmitCode::val_symbol(K_value, Y_s); EmitCode::up();

    -
    • This code is used in §7.4.
    -

    §7.4.11. The LOOKUP ALL Y task7.4.11 = +

    • This code is used in §6.4.
    +

    §6.4.11. The LOOKUP ALL Y task6.4.11 =

    @@ -1016,15 +1004,15 @@ 

    EmitCode::up(); int t = 1; - Write rels lookup list7.4.10.1; + Write rels lookup list6.4.10.1; EmitCode::inv(RETURN_BIP); EmitCode::down(); EmitCode::val_symbol(K_value, Y_s); EmitCode::up();

    -
    • This code is used in §7.4.
    -

    §7.4.12. The LIST task7.4.12 = +

    • This code is used in §6.4.
    +

    §6.4.12. The LIST task6.4.12 =

    @@ -1044,7 +1032,7 @@ 

    EmitCode::code(); EmitCode::down(); int t = 0; - Write rels lookup list all7.4.12.1; + Write rels lookup list all6.4.12.1; EmitCode::up(); EmitCode::code(); EmitCode::down(); @@ -1058,7 +1046,7 @@

    EmitCode::code(); EmitCode::down(); t = 1; - Write rels lookup list all7.4.12.1; + Write rels lookup list all6.4.12.1; EmitCode::up(); EmitCode::up(); EmitCode::up(); @@ -1069,8 +1057,8 @@

    EmitCode::val_symbol(K_value, X_s); EmitCode::up();

    -
    • This code is used in §7.4.
    -

    §7.4.9.1. Write rels lookup7.4.9.1 = +

    • This code is used in §6.4.
    +

    §6.4.9.1. Write rels lookup6.4.9.1 =

    @@ -1086,7 +1074,7 @@ 

    EmitCode::down(); EmitCode::inv(INDIRECT4_BIP); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::handler_iname(dbp)); + EmitCode::val_iname(K_value, RTRelations::handler_iname(dbp)); EmitCode::val_symbol(K_value, rr_s); EmitCode::val_iname(K_value, Hierarchy::find(RELS_TEST_HL)); if (t == 0) { @@ -1173,8 +1161,8 @@

    EmitCode::up(); }

    -
    • This code is used in §7.4.9 (twice).
    -

    §7.4.10.1. Write rels lookup list7.4.10.1 = +

    • This code is used in §6.4.9 (twice).
    +

    §6.4.10.1. Write rels lookup list6.4.10.1 =

    @@ -1190,7 +1178,7 @@ 

    EmitCode::down(); EmitCode::inv(INDIRECT4_BIP); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::handler_iname(dbp)); + EmitCode::val_iname(K_value, RTRelations::handler_iname(dbp)); EmitCode::val_symbol(K_value, rr_s); EmitCode::val_iname(K_value, Hierarchy::find(RELS_TEST_HL)); if (t == 0) { @@ -1215,8 +1203,8 @@

    } }

    - -

    §7.4.12.1. Write rels lookup list all7.4.12.1 = +

    +

    §6.4.12.1. Write rels lookup list all6.4.12.1 =

    @@ -1237,7 +1225,7 @@ 

    EmitCode::down(); EmitCode::inv(INDIRECT4_BIP); EmitCode::down(); - EmitCode::val_iname(K_value, RTRelations::handler_iname(dbp)); + EmitCode::val_iname(K_value, RTRelations::handler_iname(dbp)); EmitCode::val_symbol(K_value, rr_s); EmitCode::val_iname(K_value, Hierarchy::find(RELS_TEST_HL)); EmitCode::val_symbol(K_value, Z1_s); @@ -1270,8 +1258,8 @@

    } }

    - -

    §8. Default values of relation kinds. The following will be called just once for each different relation kind needing +

    +

    §7. Default values of relation kinds. The following will be called just once for each different relation kind needing a default value; for example, K might be "relation of texts to numbers". We need to compile an array at iname which will have the meaning of an empty relation of the right kind. @@ -1295,7 +1283,7 @@

    EmitArrays::end(save); }

    -

    §9. The bitmap for various-to-various relations. It is unavoidable that a general V-to-V relation will take at least \(LR\) bits +

    §8. The bitmap for various-to-various relations. It is unavoidable that a general V-to-V relation will take at least \(LR\) bits of storage, where \(L\) is the size of the left domain and \(R\) the size of the right domain. (A symmetric V-to-V relation needs only a little over \(LR/2\) bits, though in practice we don't want the nuisance of this memory saving.) Cheaper @@ -1305,7 +1293,7 @@

    direct way possible, with as little overhead as possible: in a bitmap.

    -

    §10. The following code compiles a stream of bits into a sequence of 16-bit +

    §9. The following code compiles a stream of bits into a sequence of 16-bit I6 constants written in hexadecimal, padding out with 0s to fill any incomplete word left at the end. The first bit of the stream becomes the least significant bit of the first word of the output. @@ -1314,11 +1302,11 @@

     int word_compiled = 0, bit_counter = 0, words_compiled;
     
    -void RTRelations::begin_bit_stream(void) {
    +void RTRelations::begin_bit_stream(void) {
         word_compiled = 0; bit_counter = 0; words_compiled = 0;
     }
     
    -void RTRelations::compile_bit(int b) {
    +void RTRelations::compile_bit(int b) {
         word_compiled += (b << bit_counter);
         bit_counter++;
         if (bit_counter == 16) {
    @@ -1328,40 +1316,40 @@ 

    } } -void RTRelations::end_bit_stream(void) { - while (bit_counter != 0) RTRelations::compile_bit(0); +void RTRelations::end_bit_stream(void) { + while (bit_counter != 0) RTRelations::compile_bit(0); }

    -

    §11. As was implied above, the run-time storage for a various to various relation +

    §10. As was implied above, the run-time storage for a various to various relation whose BP has allocation ID number X is an I6 word array called V2V_Bitmap_X. This begins with a header of 8 words and is then followed by a bitmap.

    -void RTRelations::compile_vtov_storage(binary_predicate *bp) {
    +void RTRelations::compile_vtov_storage(binary_predicate *bp) {
         int left_count = 0, right_count = 0, words_used = 0, bytes_used = 0;
    -    RTRelations::allocate_index_storage();
    -    Index the left and right domains and calculate their sizes11.1;
    +    RTRelations::allocate_index_storage();
    +    Index the left and right domains and calculate their sizes10.1;
     
         inter_name *v2v_iname = NULL;
         if ((left_count > 0) && (right_count > 0))
    -        Allocate a zeroed-out memory cache for relations with fast route-finding11.3;
    +        Allocate a zeroed-out memory cache for relations with fast route-finding10.3;
     
         package_request *P = RTRelations::package(bp);
         explicit_bp_data *ED = RETRIEVE_POINTER_explicit_bp_data(bp->family_specific);
         ED->v2v_bitmap_iname = Hierarchy::make_iname_in(BITMAP_HL, P);
         packaging_state save = EmitArrays::begin_word(ED->v2v_bitmap_iname, K_value);
    -    Compile header information in the V-to-V structure11.2;
    +    Compile header information in the V-to-V structure10.2;
     
         if ((left_count > 0) && (right_count > 0))
    -        Compile bitmap pre-initialised to the V-to-V relation at start of play11.5;
    +        Compile bitmap pre-initialised to the V-to-V relation at start of play10.5;
     
         EmitArrays::end(save);
     
    -    RTRelations::free_index_storage();
    +    RTRelations::free_index_storage();
     }
     
    -

    §11.1. We calculate numbers \(L\) and \(R\), and index the items being related, so that +

    §10.1. We calculate numbers \(L\) and \(R\), and index the items being related, so that the possible left values are indexed \(0, 1, 2, ..., L-1\) and the possible right values \(0, 1, 2, ..., R-1\). Note that in a relation such as

    @@ -1383,18 +1371,18 @@

    this is done by the function RTRelations::relation_range (below).

    -

    Index the left and right domains and calculate their sizes11.1 = +

    Index the left and right domains and calculate their sizes10.1 =

    -    left_count = RTRelations::relation_range(bp, 0);
    -    right_count = RTRelations::relation_range(bp, 1);
    +    left_count = RTRelations::relation_range(bp, 0);
    +    right_count = RTRelations::relation_range(bp, 1);
     
    -
    • This code is used in §11.
    -

    §11.2. See "Relations.i6t" in the template layer for details. +

    • This code is used in §10.
    +

    §10.2. See "Relations.i6t" in the template layer for details.

    -

    Compile header information in the V-to-V structure11.2 = +

    Compile header information in the V-to-V structure10.2 =

    @@ -1420,8 +1408,8 @@ 

    EmitArrays::numeric_entry(0); words_used += 8;

    -
    • This code is used in §11.
    -

    §11.3. Fast route finding is available only where the left and right domains are +

    • This code is used in §10.
    +

    §10.3. Fast route finding is available only where the left and right domains are equal, and even then, only when the user asked for it. If so, we allocate \(LR\) bytes as a cache if \(L=R<256\), and \(LR\) words otherwise. The cache is initialised to all-zeros, which saves an inordinate amount of nuisance, @@ -1429,7 +1417,7 @@

    above: it forces the template layer to generate the cache when first used.

    -

    Allocate a zeroed-out memory cache for relations with fast route-finding11.3 = +

    Allocate a zeroed-out memory cache for relations with fast route-finding10.3 =

    @@ -1458,8 +1446,8 @@ 

    v2v_iname = Emit::numeric_constant(iname, 0); }

    -
    • This code is used in §11.
    -

    §11.4. The following function conveniently determines whether a given INFS is +

    • This code is used in §10.
    +

    §10.4. The following function conveniently determines whether a given INFS is within the domain of one of the terms of a relation; the rule is that it mustn't itself express a domain (otherwise, e.g., the kind "woman" would show up as within the domain of "person" — we want only instances here, @@ -1467,7 +1455,7 @@

    -int RTRelations::infs_in_domain(inference_subject *infs, binary_predicate *bp, int index) {
    +int RTRelations::infs_in_domain(inference_subject *infs, binary_predicate *bp, int index) {
         if (KindSubjects::to_kind(infs) != NULL) return FALSE;
         kind *K = BinaryPredicates::term_kind(bp, index);
         if (K == NULL) return FALSE;
    @@ -1476,7 +1464,7 @@ 

    return FALSE; }

    -

    §11.5. Now to assemble the bitmap. We do this by looking at inferences in the world-model +

    §10.5. Now to assemble the bitmap. We do this by looking at inferences in the world-model to find out what pairs \((x, y)\) are such that assertions have declared that \(B(x, y)\) is true.

    @@ -1490,30 +1478,30 @@

    to send the pairs in that row in any order.

    -

    Compile bitmap pre-initialised to the V-to-V relation at start of play11.5 = +

    Compile bitmap pre-initialised to the V-to-V relation at start of play10.5 =

         char *row_flags = Memory::malloc(right_count, RELATION_CONSTRUCTION_MREASON);
         if (row_flags) {
    -        RTRelations::begin_bit_stream();
    +        RTRelations::begin_bit_stream();
     
             inference_subject *infs;
             LOOP_OVER(infs, inference_subject)
    -            if (RTRelations::infs_in_domain(infs, bp, 0)) {
    +            if (RTRelations::infs_in_domain(infs, bp, 0)) {
                     int j;
                     for (j=0; j<right_count; j++) row_flags[j] = 0;
    -                Find all pairs belonging to this row, and set the relevant flags11.5.1;
    -                for (j=0; j<right_count; j++) RTRelations::compile_bit(row_flags[j]);
    +                Find all pairs belonging to this row, and set the relevant flags10.5.1;
    +                for (j=0; j<right_count; j++) RTRelations::compile_bit(row_flags[j]);
                 }
     
    -        RTRelations::end_bit_stream();
    +        RTRelations::end_bit_stream();
             words_used += words_compiled;
             Memory::I7_free(row_flags, RELATION_CONSTRUCTION_MREASON, right_count);
         }
     
    -
    • This code is used in §11.
    -

    §11.5.1. Find all pairs belonging to this row, and set the relevant flags11.5.1 = +

    • This code is used in §10.
    +

    §10.5.1. Find all pairs belonging to this row, and set the relevant flags10.5.1 =

    @@ -1521,53 +1509,53 @@ 

    POSITIVE_KNOWLEDGE_LOOP(inf, RelationSubjects::from_bp(bp), relation_inf) { inference_subject *left_infs, *right_infs; RelationInferences::get_term_subjects(inf, &left_infs, &right_infs); - if (infs == left_infs) row_flags[RTRelations::get_relation_index(right_infs, 1)] = 1; + if (infs == left_infs) row_flags[RTRelations::get_relation_index(right_infs, 1)] = 1; }

    - -

    §12. Lastly on this: the way we count and index the left (index=0) or right (1) +

    +

    §11. Lastly on this: the way we count and index the left (index=0) or right (1) domain. We count upwards from 0 (in order of creation).

    -int RTRelations::relation_range(binary_predicate *bp, int index) {
    +int RTRelations::relation_range(binary_predicate *bp, int index) {
         int t = 0;
         inference_subject *infs;
         LOOP_OVER(infs, inference_subject) {
    -        if (RTRelations::infs_in_domain(infs, bp, index)) RTRelations::set_relation_index(infs, index, t++);
    -        else RTRelations::set_relation_index(infs, index, -1);
    +        if (RTRelations::infs_in_domain(infs, bp, index)) RTRelations::set_relation_index(infs, index, t++);
    +        else RTRelations::set_relation_index(infs, index, -1);
         }
         return t;
     }
     
    -

    §13. Tiresomely, we have to store these indices for a little while, so: +

    §12. Tiresomely, we have to store these indices for a little while, so:

     int *relation_indices = NULL;
    -void RTRelations::allocate_index_storage(void) {
    +void RTRelations::allocate_index_storage(void) {
         int nc = NUMBER_CREATED(inference_subject);
         relation_indices = (int *) (Memory::calloc(nc, 2*sizeof(int), OBJECT_COMPILATION_MREASON));
     }
     
    -void RTRelations::set_relation_index(inference_subject *infs, int i, int v) {
    +void RTRelations::set_relation_index(inference_subject *infs, int i, int v) {
         if (relation_indices == NULL) internal_error("relation index unallocated");
         relation_indices[2*(infs->allocation_id) + i] = v;
     }
     
    -int RTRelations::get_relation_index(inference_subject *infs, int i) {
    +int RTRelations::get_relation_index(inference_subject *infs, int i) {
         if (relation_indices == NULL) internal_error("relation index unallocated");
         return relation_indices[2*(infs->allocation_id) + i];
     }
     
    -void RTRelations::free_index_storage(void) {
    +void RTRelations::free_index_storage(void) {
         if (relation_indices == NULL) internal_error("relation index unallocated");
         int nc = NUMBER_CREATED(inference_subject);
         Memory::I7_array_free(relation_indices, OBJECT_COMPILATION_MREASON, nc, 2*sizeof(int));
         relation_indices = NULL;
     }
     
    -

    §14. The partition for an equivalence relation. An equivalence relation \(E\) is such that \(E(x, x)\) for all \(x\), such that +

    §13. The partition for an equivalence relation. An equivalence relation \(E\) is such that \(E(x, x)\) for all \(x\), such that \(E(x, y)\) if and only if \(E(y, x)\), and such that \(E(x, y)\) and \(E(y, z)\) together imply \(E(x, z)\): the properties of being reflexive, symmetric and transitive. The relation constructed by a sentence like @@ -1626,7 +1614,7 @@

    keeping it always a valid partition function for the relation.

    -

    §15. We calculate the initial partition by starting with the sparsest possible +

    §14. We calculate the initial partition by starting with the sparsest possible equivalence relation, \(E(x, y)\) if and only if \(x=y\), where each member is related only to itself. (This is the equality relation.) The partition function here is given by \(p(x)\) equals the allocation ID number for object @@ -1653,7 +1641,7 @@

    D->equiv_data->equivalence_partition = partition_array; }

    -

    §16. The A-parser has meanwhile been reading in facts about the helping relation: +

    §15. The A-parser has meanwhile been reading in facts about the helping relation:

    @@ -1710,7 +1698,7 @@

    partition_array[i] = little; }

    -

    §17. Once that process has completed, the code which compiles the +

    §16. Once that process has completed, the code which compiles the initial state of the I6 object tree calls the following function to ask it to fill in the (let's say) p63_helping property for each person in turn. @@ -1723,32 +1711,32 @@

    instance *I; LOOP_OVER_INSTANCES(I, k) { inference_subject *infs = Instances::as_subject(I); - Set the partition number property17.1; + Set the partition number property16.1; } } else { instance *nc; LOOP_OVER_INSTANCES(nc, k) { inference_subject *infs = Instances::as_subject(nc); - Set the partition number property17.1; + Set the partition number property16.1; } } }

    -

    §17.1. Set the partition number property17.1 = +

    §16.1. Set the partition number property16.1 =

         parse_node *val = Rvalues::from_int(
    -        RTRelations::equivalence_relation_get_class(bp, infs->allocation_id), EMPTY_WORDING);
    +        RTRelations::equivalence_relation_get_class(bp, infs->allocation_id), EMPTY_WORDING);
         ValueProperties::assert(ExplicitRelations::get_i6_storage_property(bp),
             infs, val, CERTAIN_CE);
     
    -
    • This code is used in §17 (twice).
    -

    §18. Where: +

    • This code is used in §16 (twice).
    +

    §17. Where:

    -int RTRelations::equivalence_relation_get_class(binary_predicate *bp, int ix) {
    +int RTRelations::equivalence_relation_get_class(binary_predicate *bp, int ix) {
         if (ExplicitRelations::get_form_of_relation(bp) != Relation_Equiv)
             internal_error("attempt to merge classes for a non-equivalence relation");
         if (bp->right_way_round == FALSE) bp = bp->reversal;
    @@ -1759,7 +1747,7 @@ 

    return partition_array[ix]; }

    -

    §19. Relation guards. The following provides for run-time checking to make sure relations are +

    §18. Relation guards. The following provides for run-time checking to make sure relations are not used with the wrong kinds of object. (Compile-time checking excludes other cases.)

    @@ -1783,19 +1771,19 @@

    } relation_guard;

    • The structure relation_guard is private to this section.
    -

    §20.

    +

    §19.

    -void RTRelations::guard_compilation_agent(compilation_subtask *t) {
    +void RTRelations::guard_compilation_agent(compilation_subtask *t) {
         relation_guard *rg = RETRIEVE_POINTER_relation_guard(t->data);
    -    Compile RGuard f0 function20.1;
    -    Compile RGuard f1 function20.2;
    -    Compile RGuard T function20.3;
    -    Compile RGuard MT function20.4;
    -    Compile RGuard MF function20.5;
    +    Compile RGuard f0 function19.1;
    +    Compile RGuard f1 function19.2;
    +    Compile RGuard T function19.3;
    +    Compile RGuard MT function19.4;
    +    Compile RGuard MF function19.5;
     }
     
    -

    §20.1. Compile RGuard f0 function20.1 = +

    §19.1. Compile RGuard f0 function19.1 =

    @@ -1837,8 +1825,8 @@ 

    Functions::end(save); }

    - -

    §20.2. Compile RGuard f1 function20.2 = +

    • This code is used in §19.
    +

    §19.2. Compile RGuard f1 function19.2 =

    @@ -1880,8 +1868,8 @@ 

    Functions::end(save); }

    - -

    §20.3. Compile RGuard T function20.3 = +

    • This code is used in §19.
    +

    §19.3. Compile RGuard T function19.3 =

    @@ -1930,8 +1918,8 @@ 

    Functions::end(save); }

    - -

    §20.4. Compile RGuard MT function20.4 = +

    • This code is used in §19.
    +

    §19.4. Compile RGuard MT function19.4 =

    @@ -1984,14 +1972,14 @@ 

    EmitCode::val_iname(K_value, Hierarchy::find(RTP_RELKINDVIOLATION_HL)); EmitCode::val_symbol(K_value, L_s); EmitCode::val_symbol(K_value, R_s); - EmitCode::val_iname(K_value, RTRelations::iname(rg->guarding)); + EmitCode::val_iname(K_value, RTRelations::iname(rg->guarding)); EmitCode::up(); } Functions::end(save); }

    -
    • This code is used in §20.
    -

    §20.5. Compile RGuard MF function20.5 = +

    • This code is used in §19.
    +

    §19.5. Compile RGuard MF function19.5 =

    @@ -2044,14 +2032,14 @@ 

    EmitCode::val_iname(K_value, Hierarchy::find(RTP_RELKINDVIOLATION_HL)); EmitCode::val_symbol(K_value, L_s); EmitCode::val_symbol(K_value, R_s); - EmitCode::val_iname(K_value, RTRelations::iname(rg->guarding)); + EmitCode::val_iname(K_value, RTRelations::iname(rg->guarding)); EmitCode::up(); } Functions::end(save); }

    -
    • This code is used in §20.
    -

    §21. Relations tested by an I7 condition. When a relation has to be tested as a condition (in the wording W), we can't +

    • This code is used in §19.
    +

    §20. Relations tested by an I7 condition. When a relation has to be tested as a condition (in the wording W), we can't simply embed that condition as the Inter schema for "test relation": it might very well need local variables, the table row-choosing variables, etc., to evaluate. It has to be tested in its own context. So we generate a function @@ -2063,14 +2051,14 @@

    -void RTRelations::compile_function_to_decide(inter_name *rname,
    +void RTRelations::compile_function_to_decide(inter_name *rname,
         wording W, bp_term_details par1, bp_term_details par2) {
     
         packaging_state save = Functions::begin(rname);
     
         stack_frame *phsf = Frames::current_stack_frame();
    -    RTRelations::add_term_as_call_parameter(phsf, par1);
    -    RTRelations::add_term_as_call_parameter(phsf, par2);
    +    RTRelations::add_term_as_call_parameter(phsf, par1);
    +    RTRelations::add_term_as_call_parameter(phsf, par2);
     
         Frames::enable_its(phsf);
     
    @@ -2091,14 +2079,14 @@ 

    Functions::end(save); }

    -

    §22. And that needs this, which adds the given BP term as a call parameter to the +

    §21. And that needs this, which adds the given BP term as a call parameter to the function currently being compiled, deciding that something is an object if its kind indications are all blank, but verifying that the value supplied matches the specific necessary kind of object if there is one.

    -void RTRelations::add_term_as_call_parameter(stack_frame *phsf,
    +void RTRelations::add_term_as_call_parameter(stack_frame *phsf,
         bp_term_details bptd) {
         kind *K = BPTerms::kind(&bptd);
         kind *PK = K;
    diff --git a/docs/standard_rules/S-pd.html b/docs/standard_rules/S-pd.html
    index ae859f38d3..c2c1b34689 100644
    --- a/docs/standard_rules/S-pd.html
    +++ b/docs/standard_rules/S-pd.html
    @@ -139,7 +139,7 @@ 

    carry out the issuing the response text activity with R.

    §5. Using the list-writer. One of the most powerful features of Inform 6 was its list-writer, a lengthy -piece of I6 code wbich now lives on as Inter code, in the srules template: +piece of I6 code which now lives on as Inter code, in the srules template: see "ListWriter.i6t". The following phrases control it:

    diff --git a/docs/standard_rules/S-pwm.html b/docs/standard_rules/S-pwm.html index d417ac8d36..9f69034998 100644 --- a/docs/standard_rules/S-pwm.html +++ b/docs/standard_rules/S-pwm.html @@ -174,13 +174,13 @@

    Definition: a scene is happening if I6 condition "scene_status-->(*1-1)==1" says so (it is currently taking place).

    -

    §9. Kinds. Basic Imform provides the kind "object", but no specialisations of it. We +

    §9. Kinds. Basic Inform provides the kind "object", but no specialisations of it. We will use objects to represent physical objects and locations, with the hierarchy given below. (The template code assumes these kinds will be declared in this order, so be careful rearranging them.)

    -

    Note the two alterative plural definitions for the word "person", with +

    Note the two alternative plural definitions for the word "person", with "people" being defined earlier to make it the default: "persons" is correct, but "people" is more idiomatically usual.

    diff --git a/docs/standard_rules/S-var.html b/docs/standard_rules/S-var.html index f44ad529d7..97880b2b97 100644 --- a/docs/standard_rules/S-var.html +++ b/docs/standard_rules/S-var.html @@ -1222,8 +1222,8 @@

    didn't understand the way that finished error, not enough of those available error, nothing to do error, - noun did not make sense in that context error, referred to a determination of scope error, + noun did not make sense in that context error, I beg your pardon error, can't again the addressee error, comma can't begin error, diff --git a/docs/supervisor-module/1-sm.html b/docs/supervisor-module/1-sm.html index 0d6165ae04..67851b97f3 100644 --- a/docs/supervisor-module/1-sm.html +++ b/docs/supervisor-module/1-sm.html @@ -59,7 +59,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/syntax-module/1-sm.html b/docs/syntax-module/1-sm.html index 546b7dd501..e2f5b13b2f 100644 --- a/docs/syntax-module/1-sm.html +++ b/docs/syntax-module/1-sm.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/docs/values-module/1-vm.html b/docs/values-module/1-vm.html index d00efa227d..4b52e042ca 100644 --- a/docs/values-module/1-vm.html +++ b/docs/values-module/1-vm.html @@ -51,7 +51,7 @@

    Setting up the use of this module.

    -

    §1. This section simoly sets up the module in ways expected by foundation, and +

    §1. This section simply sets up the module in ways expected by foundation, and contains no code of interest. The following constant exists only in tools which use this module:

    diff --git a/inform7/Downloads/preform-diagnostics.txt b/inform7/Downloads/preform-diagnostics.txt index 5dbfa60897..4bb78bacb7 100644 --- a/inform7/Downloads/preform-diagnostics.txt +++ b/inform7/Downloads/preform-diagnostics.txt @@ -5185,16 +5185,16 @@ (hits 431/431) (matched long text) constraint (none) extremes [1, infinity) - hits 0/10192 nti 30 constraint DS = {30} extremes [2, infinity) + hits 0/10196 nti 30 constraint DS = {30} extremes [2, infinity) English: it with action {***} - (hits 0/3874) constraint DS = {30} extremes [3, infinity) + (hits 0/3876) constraint DS = {30} extremes [3, infinity) {with/having} (/) {***} - (hits 0/4067) constraint DS = {30} extremes [2, infinity) + (hits 0/4069) constraint DS = {30} extremes [2, infinity) {with/having} {...} ( ) - (hits 0/3482) constraint DS = {30} extremes [5, infinity) + (hits 0/3484) constraint DS = {30} extremes [5, infinity) {with/having} - (hits 0/4067) constraint DS = {30} extremes [2, infinity) + (hits 0/4069) constraint DS = {30} extremes [2, infinity) nti 19 constraint (none) extremes [1, infinity) English: @@ -5267,10 +5267,10 @@ {...} called {...} constraint DS = {12} extremes [3, infinity) - hits 196/9056 nti 13 constraint DS = {13} extremes [2, infinity) + hits 194/9064 nti 13 constraint DS = {13} extremes [2, infinity) English: of {...} - (hits 196/2552) (matched: 'of day -- documented at var_time --') constraint DS = {13} extremes [2, infinity) + (hits 194/2554) (matched: 'of day -- documented at var_time --') constraint DS = {13} extremes [2, infinity) hits 5/60 nti 14 constraint CS = {14} extremes [2, 2] English: @@ -5823,6 +5823,8 @@ constraint CS = {20} extremes [1, 1] meaning constraint CS = {20} extremes [1, 1] + never-holding + constraint CS = {20} extremes [1, 1] provision constraint CS = {20} extremes [1, 1] numerically-greater-than-or-equal-to @@ -5888,12 +5890,12 @@ {...} constraint FS = {10} extremes [2, infinity) - hits 104/392 nti 22 constraint (none) extremes [1, infinity) + hits 104/388 nti 22 constraint (none) extremes [1, infinity) English: in the presence constraint CS = {22} extremes [3, 3] - (hits 104/196) (matched: 'adaptive text viewpoint') constraint (none) extremes [1, infinity) + (hits 104/194) (matched: 'adaptive text viewpoint') constraint (none) extremes [1, infinity) hits 104/208 nti 23 constraint (none) extremes [1, infinity) English: @@ -8477,7 +8479,7 @@ internal hits 127/2212 nti 30 constraint (none) extremes [1, infinity) - internal hits 104/392 nti 6 constraint (none) extremes [1, infinity) + internal hits 104/388 nti 6 constraint (none) extremes [1, infinity) hits 0/292 nti 12 constraint DS = {12} extremes [1, infinity) English: diff --git a/inform7/Figures/memory-diagnostics.txt b/inform7/Figures/memory-diagnostics.txt index 69580ec83c..d1369ab28c 100644 --- a/inform7/Figures/memory-diagnostics.txt +++ b/inform7/Figures/memory-diagnostics.txt @@ -1,13 +1,13 @@ -Total memory consumption was 123346K = 120 MB +Total memory consumption was 123374K = 120 MB - ---- was used for 2044504 objects, in 362823 frames in 0 x 800K = 0K = 0 MB: + ---- was used for 2044963 objects, in 362886 frames in 0 x 800K = 0K = 0 MB: - 33.1% inter_tree_node_array 58 x 8192 = 475136 objects, 41813824 bytes - 20.5% text_stream_array 4603 x 100 = 460300 objects, 25924096 bytes - 19.2% linked_list 43446 objects, 24329760 bytes + 33.0% inter_tree_node_array 58 x 8192 = 475136 objects, 41813824 bytes + 20.5% text_stream_array 4605 x 100 = 460500 objects, 25935360 bytes + 19.2% linked_list 43461 objects, 24338160 bytes 11.1% inter_symbol_array 132 x 1024 = 135168 objects, 14061696 bytes 10.4% inter_error_stash_array 101 x 1024 = 103424 objects, 13241504 bytes - 8.2% parse_node 129720 objects, 10377600 bytes + 8.2% parse_node 129722 objects, 10377760 bytes 5.8% verb_conjugation 160 objects, 7425280 bytes 4.3% parse_node_annotation_array 346 x 500 = 173000 objects, 5547072 bytes 2.6% pcalc_prop_array 25 x 1000 = 25000 objects, 3400800 bytes @@ -15,54 +15,54 @@ Total memory consumption was 123346K = 120 MB 2.0% kind_array 66 x 1000 = 66000 objects, 2642112 bytes 1.6% inter_name_generator_array 51 x 1000 = 51000 objects, 2041632 bytes 1.5% inter_schema_token 13969 objects, 2011536 bytes - 1.4% package_request 21151 objects, 1861288 bytes + 1.4% package_request 21153 objects, 1861464 bytes 1.4% vocabulary_entry_array 161 x 100 = 16100 objects, 1808352 bytes - 1.1% dict_entry_array 468 x 100 = 46800 objects, 1512576 bytes + 1.2% dict_entry_array 470 x 100 = 47000 objects, 1519040 bytes 1.1% match_trie_array 11 x 1000 = 11000 objects, 1496352 bytes - 1.1% inter_symbols_table 26588 objects, 1488928 bytes + 1.1% inter_symbols_table 26591 objects, 1489096 bytes 1.0% i6_schema_array 23 x 100 = 2300 objects, 1380736 bytes 1.0% scan_directory 314 objects, 1296192 bytes - 1.0% inter_package 26588 objects, 1276224 bytes - 0.8% map_data 670 objects, 1125600 bytes + 1.0% inter_package 26591 objects, 1276368 bytes + 0.8% map_data 671 objects, 1127280 bytes 0.8% id_body 942 objects, 1077648 bytes 0.7% adjective_meaning 202 objects, 1000304 bytes - 0.7% excerpt_meaning 3101 objects, 967512 bytes - 0.7% production 3877 objects, 899464 bytes - 0.6% ptoken 8396 objects, 873184 bytes - 0.6% grammatical_usage 3612 objects, 866880 bytes - 0.6% individual_form 2562 objects, 860832 bytes + 0.7% excerpt_meaning 3102 objects, 967824 bytes + 0.7% production 3878 objects, 899696 bytes + 0.6% ptoken 8397 objects, 873288 bytes + 0.6% grammatical_usage 3613 objects, 867120 bytes + 0.6% individual_form 2563 objects, 861168 bytes 0.6% inter_schema_node 8920 objects, 856320 bytes 0.5% unary_predicate_array 16 x 1000 = 16000 objects, 640512 bytes 0.3% local_variable_array 47 x 100 = 4700 objects, 452704 bytes 0.3% verb_usage 1128 objects, 388032 bytes 0.2% rule 470 objects, 368480 bytes - 0.2% dictionary 7517 objects, 360816 bytes + 0.2% dictionary 7521 objects, 361008 bytes 0.2% verb_form 386 objects, 348944 bytes - 0.2% noun 2381 objects, 285720 bytes - 0.2% compilation_subtask 3353 objects, 268240 bytes + 0.2% noun 2382 objects, 285840 bytes + 0.2% compilation_subtask 3355 objects, 268400 bytes 0.2% inter_annotation_array 2 x 8192 = 16384 objects, 262208 bytes - 0.2% inference_subject 665 objects, 260680 bytes - 0.1% vanilla_function 3682 objects, 235648 bytes - 0.1% binary_predicate 321 objects, 169488 bytes + 0.2% inference_subject 666 objects, 261072 bytes + 0.1% vanilla_function 3683 objects, 235712 bytes + 0.1% binary_predicate 322 objects, 170016 bytes 0.1% hierarchy_location 1122 objects, 161568 bytes - 0.1% linguistic_stock_item 3317 objects, 159216 bytes + 0.1% linguistic_stock_item 3318 objects, 159264 bytes 0.1% rule_family_data 401 objects, 147568 bytes 0.1% nonterminal 760 objects, 139840 bytes - 0.1% nascent_array 2125 objects, 136000 bytes + 0.1% nascent_array 2127 objects, 136128 bytes ---- documentation_ref 1273 objects, 112024 bytes ---- inference 1703 objects, 108992 bytes ---- imperative_defn 1379 objects, 99288 bytes - ---- noun_usage 2403 objects, 96120 bytes + ---- noun_usage 2404 objects, 96160 bytes ---- anl_entry_array 2 x 1000 = 2000 objects, 96064 bytes ---- preposition 273 objects, 87360 bytes ---- inter_schema 1512 objects, 84672 bytes - ---- lexical_cluster 2518 objects, 80576 bytes + ---- lexical_cluster 2519 objects, 80608 bytes ---- pcalc_term_array 2 x 1000 = 2000 objects, 80064 bytes ---- kind_variable_declaration 1655 objects, 79440 bytes ---- inter_tree 6 objects, 79248 bytes ---- label_namespace 1472 objects, 70656 bytes ---- rulebook 407 objects, 68376 bytes - ---- spatial_data 670 objects, 64320 bytes + ---- spatial_data 671 objects, 64416 bytes ---- linked_list_item_array 4 x 1000 = 4000 objects, 64128 bytes ---- kind_macro_definition 9 objects, 62280 bytes ---- booking 861 objects, 61992 bytes @@ -83,24 +83,24 @@ Total memory consumption was 123346K = 120 MB ---- activity_list_array 1 x 1000 objects, 40032 bytes ---- to_family_data 497 objects, 39760 bytes ---- shared_variable_access_list_array 12 x 100 = 1200 objects, 38784 bytes - ---- parsing_data 670 objects, 37520 bytes + ---- parsing_data 671 objects, 37576 bytes ---- heading 198 objects, 36432 bytes ---- production_list 617 objects, 34552 bytes - ---- regions_data 670 objects, 32160 bytes - ---- counting_data 670 objects, 32160 bytes + ---- regions_data 671 objects, 32208 bytes + ---- counting_data 671 objects, 32208 bytes ---- property_permission 96 objects, 31488 bytes ---- stack_frame_box 305 objects, 29280 bytes ---- verb_sense 403 objects, 29016 bytes ---- action_pattern_array 7 x 100 = 700 objects, 28224 bytes ---- shared_variable_set_array 6 x 100 = 600 objects, 24192 bytes - ---- backdrops_data 670 objects, 21440 bytes + ---- backdrops_data 671 objects, 21472 bytes ---- inter_node_list 654 objects, 20928 bytes ---- pipeline_step 15 objects, 20280 bytes ---- action_name 90 objects, 20160 bytes ---- nonlocal_variable 93 objects, 20088 bytes ---- property 146 objects, 19856 bytes ---- timed_rules_rfd_data 401 objects, 19248 bytes - ---- method 374 objects, 17952 bytes + ---- method 380 objects, 18240 bytes ---- pcalc_prop_deferral 86 objects, 17888 bytes ---- instance 167 objects, 17368 bytes ---- parse_node_tree 20 objects, 17280 bytes @@ -138,7 +138,7 @@ Total memory consumption was 123346K = 120 MB ---- submodule_request 94 objects, 3760 bytes ---- parse_node_annotation_type 114 objects, 3648 bytes ---- property_setting_bp_data 84 objects, 3360 bytes - ---- method_set 103 objects, 3296 bytes + ---- method_set 104 objects, 3328 bytes ---- kind_constructor_comparison_schema_array 1 x 100 objects, 3232 bytes ---- inform_extension 19 objects, 3192 bytes ---- definition 44 objects, 3168 bytes @@ -187,9 +187,9 @@ Total memory consumption was 123346K = 120 MB ---- equation 4 objects, 480 bytes ---- i6_memory_setting 14 objects, 448 bytes ---- inference_family 11 objects, 440 bytes + ---- bp_family 13 objects, 416 bytes ---- inter_annotation_form 10 objects, 400 bytes ---- article_usage 8 objects, 384 bytes - ---- bp_family 12 objects, 384 bytes ---- source_file 5 objects, 360 bytes ---- inbuild_genre 7 objects, 336 bytes ---- pronoun 8 objects, 320 bytes @@ -237,23 +237,23 @@ Total memory consumption was 123346K = 120 MB 100.0% was used for memory not allocated for objects: - 57.7% text stream storage 72913380 bytes in 477846 claims - 4.1% dictionary storage 5227008 bytes in 7517 claims + 57.7% text stream storage 72933584 bytes in 478006 claims + 4.1% dictionary storage 5229056 bytes in 7521 claims ---- sorting 1448 bytes in 149 claims - 5.7% source text 7200000 bytes in 3 claims + 5.6% source text 7200000 bytes in 3 claims 8.5% source text details 10800000 bytes in 2 claims 0.2% documentation fragments 262144 bytes in 1 claim ---- linguistic stock array 81920 bytes in 2 claims ---- small word set array 105600 bytes in 22 claims - 3.5% inter symbols storage 4518768 bytes in 27943 claims - 13.2% inter bytecode storage 16767648 bytes in 14 claims + 3.5% inter symbols storage 4520144 bytes in 27948 claims + 13.2% inter bytecode storage 16767680 bytes in 14 claims 4.9% inter links storage 6222976 bytes in 11 claims 0.1% inter tree location list storage 191232 bytes in 32 claims - 1.3% instance-of-kind counting 1695204 bytes in 1 claim - ---- compilation workspace for objects 21856 bytes in 25 claims + 1.3% instance-of-kind counting 1700416 bytes in 1 claim + ---- compilation workspace for objects 21896 bytes in 25 claims ---- lists for type-checking invocations 16000 bytes in 1 claim ---- code generation workspace for objects 1336 bytes in 4 claims - 0.2% emitter array storage 280032 bytes in 1997 claims + 0.2% emitter array storage 280288 bytes in 1999 claims --146.-1% was overhead - -184624848 bytes = -180297K = -176 MB +-146.-1% was overhead - -184656864 bytes = -180328K = -176 MB diff --git a/inform7/Figures/syntax-summary.txt b/inform7/Figures/syntax-summary.txt index 8a0a73c5ed..27a806c6b3 100644 --- a/inform7/Figures/syntax-summary.txt +++ b/inform7/Figures/syntax-summary.txt @@ -781,34 +781,34 @@ ROOT_NT PROPER_NOUN_NT'blank' {refined} {refers: infs'blank'} {eval: CONSTANT_NT'blank' {kind: room} {instance: I113'blank'} {enumeration: 0}} RELATIONSHIP_NT'contains' {meaning: is-in} {refined} AND_NT - PROPER_NOUN_NT {refers: infs411} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I114} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs412} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I114} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs412} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I115} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs413} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I115} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs413} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I116} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs414} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I116} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs414} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I117} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs415} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I117} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs415} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I118} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs416} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I118} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs416} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I119} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs417} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I119} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs417} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I120} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs418} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I120} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs418} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I121} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs419} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I121} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs419} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I122} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs420} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I122} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs420} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I123} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs421} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I123} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs421} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I124} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs422} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I124} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs422} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I125} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs423} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I125} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs423} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I126} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs424} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I126} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs424} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I127} {enumeration: 0}} {created here} - PROPER_NOUN_NT {refers: infs425} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I128} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs425} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I127} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs426} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I128} {enumeration: 0}} {created here} HEADING_NT'section 4 - other players' {heading 5} {under: H5'section 4 - other players'} {unit: 4} SENTENCE_NT'vanessa is a woman in cold comfort' {unit: 4} {classified} VERB_NT'is' {verb 'be' 3p s act IS_TENSE +ve} @@ -842,10 +842,10 @@ ROOT_NT PROPER_NOUN_NT'lewis' {refined} {refers: infs'lewis'} {eval: CONSTANT_NT'lewis' {kind: man} {instance: I133'lewis'} {enumeration: 0}} RELATIONSHIP_NT'carries' {meaning: is-carried-by} {refined} AND_NT - PROPER_NOUN_NT {refers: infs431} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I134} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs432} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I134} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs432} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I135} {enumeration: 0}} {created here} - PROPER_NOUN_NT {refers: infs433} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I136} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs433} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I135} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs434} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I136} {enumeration: 0}} {created here} SENTENCE_NT'lewis carries a book called idiot's guide to dating' {unit: 4} {classified} {interpretation of subject: infs'lewis'} VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'lewis' {refined} {refers: infs'lewis'} {eval: CONSTANT_NT'lewis' {kind: man} {instance: I133'lewis'} {enumeration: 0}} @@ -874,7 +874,7 @@ ROOT_NT VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'gene' {refined} {refers: infs'gene'} {eval: CONSTANT_NT'gene' {kind: man} {instance: I141'gene'} {enumeration: 0}} RELATIONSHIP_NT'carries' {meaning: is-carried-by} {refined} - PROPER_NOUN_NT {refers: infs439} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I142} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs440} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I142} {enumeration: 0}} {created here} SENTENCE_NT'gene carries a dvd called casablanca' {unit: 4} {classified} {interpretation of subject: infs'gene'} VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'gene' {refined} {refers: infs'gene'} {eval: CONSTANT_NT'gene' {kind: man} {instance: I141'gene'} {enumeration: 0}} @@ -884,7 +884,7 @@ ROOT_NT VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'gene' {refined} {refers: infs'gene'} {eval: CONSTANT_NT'gene' {kind: man} {instance: I141'gene'} {enumeration: 0}} RELATIONSHIP_NT'carries' {meaning: is-carried-by} {refined} - PROPER_NOUN_NT {refers: infs441} {eval: CONSTANT_NT {kind: coupon} {instance: I144} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs442} {eval: CONSTANT_NT {kind: coupon} {instance: I144} {enumeration: 0}} {created here} SENTENCE_NT'rhoda is a woman in marciony street' {unit: 4} {classified} {interpretation of subject: infs'gene'} VERB_NT'is' {verb 'be' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'rhoda' {refined} {refers: infs'rhoda'} {eval: CONSTANT_NT'rhoda' {kind: object} {instance: I145'rhoda'} {enumeration: 0}} {created here} @@ -917,7 +917,7 @@ ROOT_NT VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'martin' {refined} {refers: infs'martin'} {eval: CONSTANT_NT'martin' {kind: man} {instance: I149'martin'} {enumeration: 0}} RELATIONSHIP_NT'carries' {meaning: is-carried-by} {refined} - PROPER_NOUN_NT {refers: infs448} {eval: CONSTANT_NT {kind: coupon} {instance: I151} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs449} {eval: CONSTANT_NT {kind: coupon} {instance: I151} {enumeration: 0}} {created here} SENTENCE_NT'antony is a man in movie rental' {unit: 4} {classified} {interpretation of subject: infs'martin'} VERB_NT'is' {verb 'be' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'antony' {refined} {refers: infs'antony'} {eval: CONSTANT_NT'antony' {kind: object} {instance: I152'antony'} {enumeration: 0}} {created here} @@ -926,7 +926,7 @@ ROOT_NT VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'antony' {refined} {refers: infs'antony'} {eval: CONSTANT_NT'antony' {kind: man} {instance: I152'antony'} {enumeration: 0}} RELATIONSHIP_NT'carries' {meaning: is-carried-by} {refined} - PROPER_NOUN_NT {refers: infs450} {eval: CONSTANT_NT {kind: coupon} {instance: I153} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs451} {eval: CONSTANT_NT {kind: coupon} {instance: I153} {enumeration: 0}} {created here} SENTENCE_NT'antony carries a stamped envelope called a postcard' {unit: 4} {classified} {interpretation of subject: infs'antony'} VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'antony' {refined} {refers: infs'antony'} {eval: CONSTANT_NT'antony' {kind: man} {instance: I152'antony'} {enumeration: 0}} @@ -946,24 +946,24 @@ ROOT_NT PROPER_NOUN_NT'shelby' {refined} {refers: infs'shelby'} {eval: CONSTANT_NT'shelby' {kind: man} {instance: I155'shelby'} {enumeration: 0}} RELATIONSHIP_NT'carries' {meaning: is-carried-by} {refined} AND_NT - PROPER_NOUN_NT {refers: infs454} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I157} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs455} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I157} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs455} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I158} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs456} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I158} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs456} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I159} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs457} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I159} {enumeration: 0}} {created here} AND_NT - PROPER_NOUN_NT {refers: infs457} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I160} {enumeration: 0}} {created here} - PROPER_NOUN_NT {refers: infs458} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I161} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs458} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I160} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs459} {eval: CONSTANT_NT {kind: stamped envelope} {instance: I161} {enumeration: 0}} {created here} SENTENCE_NT'shelby carries an ice cream cone' {unit: 4} {classified} {interpretation of subject: infs'shelby'} VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'shelby' {refined} {refers: infs'shelby'} {eval: CONSTANT_NT'shelby' {kind: man} {instance: I155'shelby'} {enumeration: 0}} RELATIONSHIP_NT'carries' {meaning: is-carried-by} {refined} - PROPER_NOUN_NT {refers: infs459} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I162} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs460} {eval: CONSTANT_NT {kind: ice cream cone} {instance: I162} {enumeration: 0}} {created here} SENTENCE_NT'shelby carries a coupon' {unit: 4} {classified} {interpretation of subject: infs'shelby'} VERB_NT'carries' {verb 'carry' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'shelby' {refined} {refers: infs'shelby'} {eval: CONSTANT_NT'shelby' {kind: man} {instance: I155'shelby'} {enumeration: 0}} RELATIONSHIP_NT'carries' {meaning: is-carried-by} {refined} - PROPER_NOUN_NT {refers: infs460} {eval: CONSTANT_NT {kind: coupon} {instance: I163} {enumeration: 0}} {created here} + PROPER_NOUN_NT {refers: infs461} {eval: CONSTANT_NT {kind: coupon} {instance: I163} {enumeration: 0}} {created here} SENTENCE_NT'christopher is a man in the library' {unit: 4} {classified} {interpretation of subject: infs'shelby'} VERB_NT'is' {verb 'be' 3p s act IS_TENSE +ve} PROPER_NOUN_NT'christopher' {refined} {refers: infs'christopher'} {eval: CONSTANT_NT'christopher' {kind: object} {instance: I164'christopher'} {enumeration: 0}} {created here} diff --git a/inform7/Figures/timings-diagnostics.txt b/inform7/Figures/timings-diagnostics.txt index c6246a3fb1..914774a1cd 100644 --- a/inform7/Figures/timings-diagnostics.txt +++ b/inform7/Figures/timings-diagnostics.txt @@ -1,33 +1,32 @@ 100.0% in inform7 run - 71.7% in compilation to Inter - 51.1% in //Sequence::undertake_queued_tasks// + 71.1% in compilation to Inter + 50.4% in //Sequence::undertake_queued_tasks// 4.7% in //MajorNodes::pre_pass// - 3.3% in //MajorNodes::pass_1// + 3.4% in //MajorNodes::pass_1// 1.8% in //ImperativeDefinitions::assess_all// 1.8% in //RTPhrasebook::compile_entries// 1.4% in //RTKindConstructors::compile// 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.4% in //MajorNodes::pass_2// 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.7% not specifically accounted for - 25.5% in running Inter pipeline - 9.9% in step 14/15: generate inform6 -> auto.inf - 5.6% in step 5/15: load-binary-kits - 5.4% in step 6/15: make-synoptic-module + 3.1% not specifically accounted for + 26.2% in running Inter pipeline + 10.2% 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.4% 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.4% in step 8/15: detect-indirect-calls 0.2% in step 11/15: eliminate-redundant-labels - 0.2% in step 8/15: detect-indirect-calls - 1.4% not specifically accounted for + 1.5% not specifically accounted for 2.2% in supervisor 0.5% not specifically accounted for diff --git a/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText-C.txt b/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText-C.txt index 60df73d94a..e118edc100 100644 --- a/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText-C.txt +++ b/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText-C.txt @@ -433,4 +433,4 @@ future tense, second person plural: will have. future tense, second person plural: will not have. future tense, third person plural: will have. future tense, third person plural: will not have. -"meaning of the verb carry" = relation of objects: equality relation +"meaning of the verb carry" = relation of objects: never-holding relation diff --git a/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText-G.txt b/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText-G.txt index 60df73d94a..e118edc100 100644 --- a/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText-G.txt +++ b/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText-G.txt @@ -433,4 +433,4 @@ future tense, second person plural: will have. future tense, second person plural: will not have. future tense, third person plural: will have. future tense, third person plural: will not have. -"meaning of the verb carry" = relation of objects: equality relation +"meaning of the verb carry" = relation of objects: never-holding relation diff --git a/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText.txt b/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText.txt index c2ddb77e3f..0b305128c0 100644 --- a/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText.txt +++ b/inform7/Tests/Test Basic/_Results_Ideal/BIP-AdaptiveText.txt @@ -434,4 +434,4 @@ future tense, second person plural: will not have. future tense, third person plural: will have. future tense, third person plural: will not have. - "meaning of the verb carry" = relation of objects: equality relation + "meaning of the verb carry" = relation of objects: never-holding relation diff --git a/inform7/Tests/Test Internals/_Results_Ideal/Index-Relations.txt b/inform7/Tests/Test Internals/_Results_Ideal/Index-Relations.txt index edaa7529ef..c224fd3f08 100644 --- a/inform7/Tests/Test Internals/_Results_Ideal/Index-Relations.txt +++ b/inform7/Tests/Test Internals/_Results_Ideal/Index-Relations.txt @@ -406,6 +406,20 @@ thing + + + never-holding     + + + never-holding     + + + --     + + + -- + + room-containment     diff --git a/inform7/assertions-module/Chapter 2/Booting Verbs.w b/inform7/assertions-module/Chapter 2/Booting Verbs.w index e6ee81504e..bda6e10482 100644 --- a/inform7/assertions-module/Chapter 2/Booting Verbs.w +++ b/inform7/assertions-module/Chapter 2/Booting Verbs.w @@ -147,25 +147,26 @@ These have to be defined somewhere, and it may as well be here. @d EQUALITY_RELATION_NAME 0 @d UNIVERSAL_RELATION_NAME 1 @d MEANING_RELATION_NAME 2 -@d PROVISION_RELATION_NAME 3 -@d GE_RELATION_NAME 4 -@d GT_RELATION_NAME 5 -@d LE_RELATION_NAME 6 -@d LT_RELATION_NAME 7 -@d ADJACENCY_RELATION_NAME 8 -@d REGIONAL_CONTAINMENT_RELATION_NAME 9 -@d CONTAINMENT_RELATION_NAME 10 -@d SUPPORT_RELATION_NAME 11 -@d INCORPORATION_RELATION_NAME 12 -@d CARRYING_RELATION_NAME 13 -@d HOLDING_RELATION_NAME 14 -@d WEARING_RELATION_NAME 15 -@d POSSESSION_RELATION_NAME 16 -@d VISIBILITY_RELATION_NAME 17 -@d TOUCHABILITY_RELATION_NAME 18 -@d CONCEALMENT_RELATION_NAME 19 -@d ENCLOSURE_RELATION_NAME 20 -@d ROOM_CONTAINMENT_RELATION_NAME 21 +@d EMPTY_RELATION_NAME 3 +@d PROVISION_RELATION_NAME 4 +@d GE_RELATION_NAME 5 +@d GT_RELATION_NAME 6 +@d LE_RELATION_NAME 7 +@d LT_RELATION_NAME 8 +@d ADJACENCY_RELATION_NAME 9 +@d REGIONAL_CONTAINMENT_RELATION_NAME 10 +@d CONTAINMENT_RELATION_NAME 11 +@d SUPPORT_RELATION_NAME 12 +@d INCORPORATION_RELATION_NAME 13 +@d CARRYING_RELATION_NAME 14 +@d HOLDING_RELATION_NAME 15 +@d WEARING_RELATION_NAME 16 +@d POSSESSION_RELATION_NAME 17 +@d VISIBILITY_RELATION_NAME 18 +@d TOUCHABILITY_RELATION_NAME 19 +@d CONCEALMENT_RELATION_NAME 20 +@d ENCLOSURE_RELATION_NAME 21 +@d ROOM_CONTAINMENT_RELATION_NAME 22 @ These are the English names of the built-in relations. The use of hyphenation here is a fossil from the times when Inform allowed only single-word relation @@ -178,6 +179,7 @@ other languages may as well drop the hyphens. equality | universal | meaning | + never-holding | provision | numerically-greater-than-or-equal-to | numerically-greater-than | diff --git a/inform7/assertions-module/Chapter 8/The Equality Relation Revisited.w b/inform7/assertions-module/Chapter 8/The Equality Relation Revisited.w index 191b71fb1f..5570d94499 100644 --- a/inform7/assertions-module/Chapter 8/The Equality Relation Revisited.w +++ b/inform7/assertions-module/Chapter 8/The Equality Relation Revisited.w @@ -9,6 +9,10 @@ void EqualityDetails::start(void) { METHOD_ADD(equality_bp_family, TYPECHECK_BPF_MTID, EqualityDetails::typecheck); METHOD_ADD(equality_bp_family, ASSERT_BPF_MTID, EqualityDetails::assert); METHOD_ADD(equality_bp_family, SCHEMA_BPF_MTID, EqualityDetails::schema); + + METHOD_ADD(empty_bp_family, TYPECHECK_BPF_MTID, EqualityDetails::typecheck_empty); + METHOD_ADD(empty_bp_family, ASSERT_BPF_MTID, EqualityDetails::assert_empty); + METHOD_ADD(empty_bp_family, SCHEMA_BPF_MTID, EqualityDetails::schema_empty); } @h Typechecking. @@ -29,7 +33,6 @@ int EqualityDetails::typecheck(bp_family *self, binary_predicate *bp, return NEVER_MATCH; } - if (PluginCalls::typecheck_equality(kinds_of_terms[0], kinds_of_terms[1])) return ALWAYS_MATCH; if ((Kinds::Behaviour::is_object(kinds_of_terms[0])) && @@ -94,6 +97,15 @@ int EqualityDetails::both_terms_of_same_construction(kind *k0, kind *k1, kind_co return FALSE; } +@ The never-holding relation is simpler: anything can be hypothetically related to +anything else (except of course that it always is not). + += +int EqualityDetails::typecheck_empty(bp_family *self, binary_predicate *bp, + kind **kinds_of_terms, kind **kinds_required, tc_problem_kit *tck) { + return ALWAYS_MATCH; +} + @h Assertion. In general values differ, and cannot be equated by fiat. But an exception is setting a global variable. @@ -121,6 +133,15 @@ int EqualityDetails::assert(bp_family *self, binary_predicate *bp, return FALSE; } +@ The never-holding relation cannot be asserted true: + += +int EqualityDetails::assert_empty(bp_family *self, binary_predicate *bp, + inference_subject *infs0, parse_node *spec0, + inference_subject *infs1, parse_node *spec1) { + return FALSE; +} + @h Compilation. Since we are compiling to I6, which is itself a C-level programming language, it looks at first as if we can compile is into |==| when @@ -308,3 +329,11 @@ one that's more helpfully specific and return |TRUE|. Calculus::Schemas::append(asch->schema, "%S", TEMP); DISCARD_TEXT(TEMP) } + +@ This never holds and there is nothing to compile: + += +int EqualityDetails::schema_empty(bp_family *self, int task, binary_predicate *bp, + annotated_i6_schema *asch) { + return FALSE; +} diff --git a/inform7/runtime-module/Chapter 5/Conjugations.w b/inform7/runtime-module/Chapter 5/Conjugations.w index a6a538722d..72132c44b6 100644 --- a/inform7/runtime-module/Chapter 5/Conjugations.w +++ b/inform7/runtime-module/Chapter 5/Conjugations.w @@ -254,8 +254,10 @@ void RTVerbs::vc_compilation_agent(compilation_subtask *t) { verb_meaning *vm = (vi)?Verbs::first_unspecial_meaning_of_verb_form(Verbs::base_form(vi)):NULL; binary_predicate *meaning = VerbMeanings::get_regular_meaning(vm); - inter_name *rel_iname = RTRelations::default_iname(); - if (meaning) rel_iname = RTRelations::iname(meaning); + inter_name *rel_iname = Hierarchy::find(MEANINGLESS_RR_HL); + if ((copular_verb) && (vc == copular_verb->conjugation)) + rel_iname = RTRelations::iname(R_equality); + else if (meaning) rel_iname = RTRelations::iname(meaning); EmitCode::inv(CASE_BIP); EmitCode::down(); @@ -477,9 +479,11 @@ void RTVerbs::vf_compilation_agent(compilation_subtask *t) { EmitCode::up(); verb_meaning *vm = &(vf->list_of_senses->vm); - inter_name *rel_iname = RTRelations::default_iname(); + inter_name *rel_iname = Hierarchy::find(MEANINGLESS_RR_HL); binary_predicate *meaning = VerbMeanings::get_regular_meaning(vm); - if (meaning) rel_iname = RTRelations::iname(meaning); + if ((copular_verb) && (vc == copular_verb->conjugation)) + rel_iname = RTRelations::iname(R_equality); + else if (meaning) rel_iname = RTRelations::iname(meaning); EmitCode::inv(IF_BIP); EmitCode::down(); diff --git a/inform7/runtime-module/Chapter 5/Relations.w b/inform7/runtime-module/Chapter 5/Relations.w index 1025fe48e4..cb1e9d837f 100644 --- a/inform7/runtime-module/Chapter 5/Relations.w +++ b/inform7/runtime-module/Chapter 5/Relations.w @@ -94,23 +94,12 @@ void RTRelations::mark_as_needed(binary_predicate *bp) { RTRelations::iname(bp); } -@ The default relation is the first one made: - -= -inter_name *default_rr = NULL; -inter_name *RTRelations::default_iname(void) { - return default_rr; -} - inter_name *RTRelations::iname(binary_predicate *bp) { bp->compilation_data.record_needed = TRUE; - if (bp->compilation_data.data_iname == NULL) { + if (bp->compilation_data.data_iname == NULL) bp->compilation_data.data_iname = Hierarchy::make_iname_in(RELATION_RECORD_HL, RTRelations::package(bp)); - if (default_rr == NULL) - default_rr = bp->compilation_data.data_iname; - } return bp->compilation_data.data_iname; } @@ -153,9 +142,9 @@ int RTRelations::minimal(binary_predicate *bp) { } void RTRelations::compile(void) { - if (RTRelations::default_iname()) { + if (R_empty) { inter_name *iname = Hierarchy::find(MEANINGLESS_RR_HL); - Emit::iname_constant(iname, K_value, RTRelations::default_iname()); + Emit::iname_constant(iname, K_value, RTRelations::iname(R_empty)); Hierarchy::make_available(iname); } diff --git a/services/calculus-module/Chapter 3/Binary Predicates.w b/services/calculus-module/Chapter 3/Binary Predicates.w index db18c24771..1acfe1b6df 100644 --- a/services/calculus-module/Chapter 3/Binary Predicates.w +++ b/services/calculus-module/Chapter 3/Binary Predicates.w @@ -106,6 +106,7 @@ containment, i.e., "X is in Y". See the test cases |MetaRelations|, = kind *BinaryPredicates::kind(binary_predicate *bp) { if (bp == R_equality) return Kinds::binary_con(CON_relation, K_value, K_value); + if (bp == R_empty) return Kinds::binary_con(CON_relation, K_value, K_value); kind *K0 = BinaryPredicates::term_kind(bp, 0); kind *K1 = BinaryPredicates::term_kind(bp, 1); if (K0 == NULL) K0 = K_object; diff --git a/services/calculus-module/Chapter 3/The Equality Relation.w b/services/calculus-module/Chapter 3/The Equality Relation.w index dded8b4da8..4d316c1d4e 100644 --- a/services/calculus-module/Chapter 3/The Equality Relation.w +++ b/services/calculus-module/Chapter 3/The Equality Relation.w @@ -9,9 +9,11 @@ relations besides "has" in the spatial family. = (early code) bp_family *equality_bp_family = NULL; bp_family *spatial_bp_family = NULL; +bp_family *empty_bp_family = NULL; binary_predicate *R_equality = NULL; binary_predicate *a_has_b_predicate = NULL; +binary_predicate *R_empty = NULL; @h Family. This is a minimal representation only, for when the calculus module is used @@ -33,6 +35,14 @@ void Calculus::Equality::start(void) { METHOD_ADD(spatial_bp_family, STOCK_BPF_MTID, Calculus::Equality::stock_spatial); #endif + + empty_bp_family = BinaryPredicateFamilies::new(); + METHOD_ADD(empty_bp_family, STOCK_BPF_MTID, + Calculus::Equality::stock_empty); + METHOD_ADD(empty_bp_family, DESCRIBE_FOR_PROBLEMS_BPF_MTID, + Calculus::Equality::describe_empty_for_problems); + METHOD_ADD(empty_bp_family, DESCRIBE_FOR_INDEX_BPF_MTID, + Calculus::Equality::describe_empty_for_index); } @h Initial stock. @@ -59,6 +69,14 @@ void Calculus::Equality::stock_spatial(bp_family *self, int n) { } } +void Calculus::Equality::stock_empty(bp_family *self, int n) { + if (n == 1) { + R_empty = BinaryPredicates::make_equality(empty_bp_family, + PreformUtilities::wording(, EMPTY_RELATION_NAME)); + BinaryPredicates::set_index_details(R_equality, "value", "value"); + } +} + @h Problem message text. = @@ -70,3 +88,11 @@ void Calculus::Equality::describe_for_index(bp_family *self, OUTPUT_STREAM, binary_predicate *bp) { WRITE("equality"); } +int Calculus::Equality::describe_empty_for_problems(bp_family *self, OUTPUT_STREAM, + binary_predicate *bp) { + return FALSE; +} +void Calculus::Equality::describe_empty_for_index(bp_family *self, OUTPUT_STREAM, + binary_predicate *bp) { + WRITE("never-holding"); +} diff --git a/services/calculus-test/Chapter 1/Program Control.w b/services/calculus-test/Chapter 1/Program Control.w index 42d931a5dc..17a6a570a1 100644 --- a/services/calculus-test/Chapter 1/Program Control.w +++ b/services/calculus-test/Chapter 1/Program Control.w @@ -108,9 +108,11 @@ pcalc_prop *Main::to_proposition(parse_node *val) { @d EQUALITY_RELATION_NAME 0 @d UNIVERSAL_RELATION_NAME 1 @d POSSESSION_RELATION_NAME 2 +@d EMPTY_RELATION_NAME 3 = ::= equality | universal | - possession + possession | + never-holding diff --git a/services/lexicon-module/Figures/excerpts-diagnostics.txt b/services/lexicon-module/Figures/excerpts-diagnostics.txt index aee44281e0..878ddd95de 100644 --- a/services/lexicon-module/Figures/excerpts-diagnostics.txt +++ b/services/lexicon-module/Figures/excerpts-diagnostics.txt @@ -1,6 +1,6 @@ -Size of lexicon: 3101 excerpt meanings - Stored among 839 words out of total vocabulary of 10568 - 709 words have a start list: longest belongs to report (with 293 meanings) +Size of lexicon: 3102 excerpt meanings + Stored among 840 words out of total vocabulary of 10569 + 710 words have a start list: longest belongs to report (with 293 meanings) 15 words have an end list: longest belongs to case (with 6 meanings) 29 words have a middle list: longest belongs to to (with 4 meanings) 108 words have a subset list: longest belongs to street (with 4 meanings) diff --git a/services/linguistics-module/Figures/stock-diagnostics.txt b/services/linguistics-module/Figures/stock-diagnostics.txt index 7e3764cc97..b8d78514f8 100644 --- a/services/linguistics-module/Figures/stock-diagnostics.txt +++ b/services/linguistics-module/Figures/stock-diagnostics.txt @@ -1,12 +1,12 @@ adjective: 137 items article: 2 items -noun: 2381 items +noun: 2382 items pronoun: 8 items preposition: 273 items determiner: 22 items verb: 108 items verb_form: 386 items -total in all categories: 3317 +total in all categories: 3318 adjective: 'even' adjective: 'odd' @@ -203,6 +203,7 @@ noun: proper: 'concealment relation' noun: proper: 'enclosure relation' noun: proper: 'adjacency relation' noun: proper: 'regional-containment relation' +noun: proper: 'never-holding relation' noun: proper: 'numerically-greater-than relation' noun: proper: 'numerically-less-than relation' noun: proper: 'numerically-greater-than-or-equal-to relation' @@ -1020,8 +1021,8 @@ noun: proper: 'can't see it at the moment error' noun: proper: 'didn't understand the way that finished error' noun: proper: 'not enough of those available error' noun: proper: 'nothing to do error' -noun: proper: 'noun did not make sense in that context error' noun: proper: 'referred to a determination of scope error' +noun: proper: 'noun did not make sense in that context error' noun: proper: 'i beg your pardon error' noun: proper: 'can't again the addressee error' noun: proper: 'comma can't begin error'