Skip to content

Commit

Permalink
Fixed Jira bug I7-2376
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Nov 17, 2024
1 parent 408f937 commit 918f9c3
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 63 deletions.
46 changes: 24 additions & 22 deletions docs/BasicInformKit/S-rlt2.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions inform7/Figures/memory-diagnostics.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Total memory consumption was 153343K = 150 MB
Total memory consumption was 153418K = 150 MB

---- was used for 2279554 objects, in 402632 frames in 0 x 800K = 0K = 0 MB:
---- was used for 2279777 objects, in 402657 frames in 0 x 800K = 0K = 0 MB:

28.9% inter_tree_node_array 63 x 8192 = 516096 objects, 45418464 bytes
19.9% text_stream_array 5554 x 100 = 555400 objects, 31280128 bytes
19.9% text_stream_array 5555 x 100 = 555500 objects, 31285760 bytes
18.2% linked_list 51083 objects, 28606480 bytes
10.2% scan_directory 3900 objects, 16099200 bytes
9.6% inter_symbol_array 142 x 1024 = 145408 objects, 15126976 bytes
Expand All @@ -18,7 +18,7 @@ Total memory consumption was 153343K = 150 MB
1.4% inter_name_generator_array 55 x 1000 = 55000 objects, 2201760 bytes
1.2% package_request 22153 objects, 1949464 bytes
1.2% vocabulary_entry_array 168 x 100 = 16800 objects, 1886976 bytes
1.1% dict_entry_array 560 x 100 = 56000 objects, 1809920 bytes
1.1% dict_entry_array 561 x 100 = 56100 objects, 1813152 bytes
0.9% inter_symbols_table 27946 objects, 1564976 bytes
0.9% i6_schema_array 25 x 100 = 2500 objects, 1500800 bytes
0.9% match_trie_array 11 x 1000 = 11000 objects, 1496352 bytes
Expand Down Expand Up @@ -119,7 +119,7 @@ Total memory consumption was 153343K = 150 MB
---- adjective_iname_holder 337 objects, 13480 bytes
---- booking_list 417 objects, 13344 bytes
---- web_bibliographic_datum 203 objects, 12992 bytes
---- uniqueness_count 486 objects, 11664 bytes
---- uniqueness_count 509 objects, 12216 bytes
---- inter_construct 32 objects, 11008 bytes
---- md_doc_state 2 objects, 10480 bytes
---- heading_tree 33 objects, 10296 bytes
Expand Down Expand Up @@ -271,7 +271,7 @@ Total memory consumption was 153343K = 150 MB

100.0% was used for memory not allocated for objects:

64.4% text stream storage 101232096 bytes in 579699 claims
64.4% text stream storage 101241456 bytes in 579725 claims
3.9% dictionary storage 6168192 bytes in 8263 claims
---- sorting 20984 bytes in 2656 claims
4.5% source text 7200000 bytes in 3 claims
Expand All @@ -280,7 +280,7 @@ Total memory consumption was 153343K = 150 MB
---- linguistic stock array 81920 bytes in 2 claims
---- small word set array 105600 bytes in 22 claims
3.1% inter symbols storage 4905872 bytes in 29425 claims
10.6% inter bytecode storage 16773620 bytes in 15 claims
10.7% inter bytecode storage 16841636 bytes in 15 claims
3.9% inter links storage 6222976 bytes in 11 claims
0.1% inter tree location list storage 191232 bytes in 32 claims
1.7% instance-of-kind counting 2715904 bytes in 1 claim
Expand All @@ -289,5 +289,5 @@ Total memory consumption was 153343K = 150 MB
---- code generation workspace for objects 3616 bytes in 19 claims
0.1% emitter array storage 295200 bytes in 2112 claims

-140.-2% was overhead - -220258432 bytes = -215096K = -210 MB
-140.-2% was overhead - -220267848 bytes = -215105K = -210 MB

22 changes: 11 additions & 11 deletions inform7/Figures/timings-diagnostics.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
100.0% in inform7 run
66.4% in compilation to Inter
43.7% in //Sequence::undertake_queued_tasks//
4.0% in //MajorNodes::pre_pass//
3.7% in //MajorNodes::pass_1//
66.2% in compilation to Inter
43.8% in //Sequence::undertake_queued_tasks//
4.3% in //MajorNodes::pre_pass//
3.6% in //MajorNodes::pass_1//
2.0% in //RTKindConstructors::compile//
1.6% in //ImperativeDefinitions::assess_all//
1.6% in //RTPhrasebook::compile_entries//
Expand All @@ -15,17 +15,17 @@
0.3% in //Sequence::undertake_queued_tasks//
0.3% in //Sequence::undertake_queued_tasks//
0.3% in //Task::make_built_in_kind_constructors//
4.8% not specifically accounted for
26.4% in running Inter pipeline
8.8% in step 14/15: generate inform6 -> auto.inf
6.7% in step 5/15: load-binary-kits
5.4% in step 6/15: make-synoptic-module
4.4% not specifically accounted for
26.7% in running Inter pipeline
9.0% in step 14/15: generate inform6 -> auto.inf
7.0% in step 5/15: load-binary-kits
5.3% in step 6/15: make-synoptic-module
2.0% in step 9/15: make-identifiers-unique
0.3% in step 11/15: eliminate-redundant-labels
0.3% in step 12/15: eliminate-redundant-operations
0.3% in step 4/15: compile-splats
0.3% in step 7/15: shorten-wiring
0.3% in step 8/15: detect-indirect-calls
1.7% not specifically accounted for
6.4% in supervisor
0.7% not specifically accounted for
6.0% in supervisor
1.1% not specifically accounted for
Original file line number Diff line number Diff line change
Expand Up @@ -633,41 +633,43 @@ whether the relation is empty at the end of the call. For relations in groups,
"empty" is understood to mean that each object relates only to itself.

=
[ Relation_EmptyOtoO relation sym clear relation_property obj1 obj2 t1 t2 N1 N2;
[ Relation_EmptyOtoO relation sym clear relation_property kind1 kind2 N1 N2 pval ix;
relation_property = RlnGetF(relation, RR_STORAGE);
t1 = KindConstructorTerm(RlnGetF(relation, RR_KIND), 0); ! Kind of left term
t2 = KindConstructorTerm(RlnGetF(relation, RR_KIND), 1); ! Kind of right term
if (t2 == OBJECT_TY) {
objectloop (obj2 provides relation_property) {
obj1 = obj2.relation_property;
if (obj1) {
if (clear) obj2.relation_property = nothing;
kind1 = KindConstructorTerm(RlnGetF(relation, RR_KIND), 0); ! Kind of left term
kind2 = KindConstructorTerm(RlnGetF(relation, RR_KIND), 1); ! Kind of right term
if (kind2 == OBJECT_TY) {
objectloop ((ix ofclass K0_kind) && (ix provides relation_property)) {
pval = ix.relation_property;
if (pval) {
if (clear) ix.relation_property = nothing;
else rfalse;
}
}
} else {
for (obj2=1: obj2<=N2: obj2++) {
obj1 = GProperty(t2, obj2, relation_property);
if (obj1) {
if (clear) WriteGProperty(t2, obj2, relation_property, 0);
N2 = KindDomainSize(kind2);
for (ix=1: ix<=N2: ix++) {
pval = GProperty(kind2, ix, relation_property);
if (pval) {
if (clear) WriteGProperty(kind2, ix, relation_property, 0);
else rfalse;
}
}
}
if (t1 ~= t2) {
if (t1 == OBJECT_TY) {
objectloop (obj1 provides relation_property) {
obj2 = obj1.relation_property;
if (obj2) {
if (clear) obj1.relation_property = nothing;
if (kind1 ~= kind2) {
if (kind1 == OBJECT_TY) {
objectloop ((ix ofclass K0_kind) && (ix provides relation_property)) {
pval = ix.relation_property;
if (pval) {
if (clear) ix.relation_property = nothing;
else rfalse;
}
}
} else {
for (obj1=1: obj1<=N2: obj1++) {
obj2 = GProperty(t1, obj1, relation_property);
if (obj2) {
if (clear) WriteGProperty(t1, obj1, relation_property, 0);
N1 = KindDomainSize(kind1);
for (ix=1: ix<=N1: ix++) {
pval = GProperty(kind1, ix, relation_property);
if (pval) {
if (clear) WriteGProperty(kind1, ix, relation_property, 0);
else rfalse;
}
}
Expand Down
37 changes: 37 additions & 0 deletions inform7/Tests/Test Cases/EmptyOToORelations--I.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Place
relation of colors: counterpart relation
"whether or not the counterpart relation is empty" = truth state: true
relation of colors: counterpart relation
Counterpart relates one color to one color:
red >=> blue
orange >=> green
"whether or not the counterpart relation is empty" = truth state: false
relation of colors: counterpart relation
"whether or not the counterpart relation is empty" = truth state: true
relation of colors: counterpart relation
Counterpart relates one color to one color:
yellow >=> indigo
"whether or not the counterpart relation is empty" = truth state: false
relation of people to colors: pairing relation
"whether or not the pairing relation is empty" = truth state: true
relation of people to colors: pairing relation
Pairing relates one person to one color:
Alice >=> red
Bob >=> orange
"whether or not the pairing relation is empty" = truth state: false
relation of people to colors: pairing relation
"whether or not the pairing relation is empty" = truth state: true
relation of people to colors: pairing relation
Pairing relates one person to one color:
Carl >=> yellow
"whether or not the pairing relation is empty" = truth state: false

Welcome
An Interactive Fiction
Release 1 / Serial number 160428 / Inform 7 v10.2.0 / D

Place
You can see Alice, Bob and Carl here.

> > Place
> Are you sure you want to quit?
46 changes: 46 additions & 0 deletions inform7/Tests/Test Cases/EmptyOToORelations.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Test: EmptyOToORelations
For: Z-Machine

Place is a room.

A color is a kind of value. The colors are red, orange, yellow, green, blue, indigo and violet.

Counterpart relates one color to one color. The verb to counter means the counterpart relation.

When play begins:
show relation the counterpart relation;
showme whether or not the counterpart relation is empty;
now red counters blue;
now orange counters green;
show relation the counterpart relation;
showme whether or not the counterpart relation is empty;
now the counterpart relation is empty;
show relation the counterpart relation;
showme whether or not the counterpart relation is empty;
now yellow counters indigo;
show relation the counterpart relation;
showme whether or not the counterpart relation is empty;

Alice is a woman in Place.

Bob is a man in Place.

Carl is a man in Place.

A color is a kind of value. The colors are red, orange, yellow, green, blue, indigo and violet.

Pairing relates one person to one color. The verb to pair with means the pairing relation.

When play begins:
show relation the pairing relation;
showme whether or not the pairing relation is empty;
now Alice pairs with red;
now Bob pairs with orange;
show relation the pairing relation;
showme whether or not the pairing relation is empty;
now the pairing relation is empty;
show relation the pairing relation;
showme whether or not the pairing relation is empty;
now Carl pairs with yellow;
show relation the pairing relation;
showme whether or not the pairing relation is empty;

0 comments on commit 918f9c3

Please sign in to comment.