Skip to content

Commit

Permalink
Fix for Mantis bug 1954
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Apr 11, 2022
1 parent aa42234 commit 420542d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 25 deletions.
26 changes: 13 additions & 13 deletions inform7/Figures/memory-diagnostics.txt
@@ -1,10 +1,10 @@
Total memory consumption was 126308K = 123 MB
Total memory consumption was 126309K = 123 MB

---- was used for 2008032 objects, in 360807 frames in 0 x 800K = 0K = 0 MB:
---- was used for 2008037 objects, in 360812 frames in 0 x 800K = 0K = 0 MB:

32.3% inter_tree_node_array 58 x 8192 = 475136 objects, 41813824 bytes
18.9% text_stream_array 4342 x 100 = 434200 objects, 24454144 bytes
18.7% linked_list 43279 objects, 24236240 bytes
18.7% linked_list 43280 objects, 24236800 bytes
10.8% inter_symbol_array 132 x 1024 = 135168 objects, 14061696 bytes
10.2% inter_error_stash_array 101 x 1024 = 103424 objects, 13241504 bytes
8.0% parse_node 129462 objects, 10356960 bytes
Expand All @@ -14,13 +14,13 @@ Total memory consumption was 126308K = 123 MB
2.4% inter_name_array 67 x 1000 = 67000 objects, 3218144 bytes
2.0% kind_array 66 x 1000 = 66000 objects, 2642112 bytes
1.5% inter_name_generator_array 51 x 1000 = 51000 objects, 2041632 bytes
1.5% inter_schema_token 13938 objects, 2007072 bytes
1.5% inter_schema_token 13937 objects, 2006928 bytes
1.4% package_request 21137 objects, 1860056 bytes
1.3% vocabulary_entry_array 161 x 100 = 16100 objects, 1808352 bytes
1.1% match_trie_array 11 x 1000 = 11000 objects, 1496352 bytes
1.1% inter_symbols_table 26569 objects, 1487864 bytes
1.1% inter_symbols_table 26571 objects, 1487976 bytes
1.0% i6_schema_array 23 x 100 = 2300 objects, 1380736 bytes
0.9% inter_package 26569 objects, 1275312 bytes
0.9% inter_package 26571 objects, 1275408 bytes
0.9% dict_entry_array 386 x 100 = 38600 objects, 1247552 bytes
0.8% map_data 670 objects, 1125600 bytes
0.8% id_body 941 objects, 1076504 bytes
Expand All @@ -30,7 +30,7 @@ Total memory consumption was 126308K = 123 MB
0.6% ptoken 8393 objects, 872872 bytes
0.6% grammatical_usage 3611 objects, 866640 bytes
0.6% individual_form 2561 objects, 860496 bytes
0.6% inter_schema_node 8897 objects, 854112 bytes
0.6% inter_schema_node 8896 objects, 854016 bytes
0.4% unary_predicate_array 16 x 1000 = 16000 objects, 640512 bytes
0.3% scan_directory 112 objects, 462336 bytes
0.3% local_variable_array 47 x 100 = 4700 objects, 452704 bytes
Expand All @@ -42,9 +42,9 @@ Total memory consumption was 126308K = 123 MB
0.2% compilation_subtask 3346 objects, 267680 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 3678 objects, 235392 bytes
0.1% vanilla_function 3679 objects, 235456 bytes
0.1% binary_predicate 321 objects, 169488 bytes
0.1% hierarchy_location 1121 objects, 161424 bytes
0.1% hierarchy_location 1122 objects, 161568 bytes
0.1% linguistic_stock_item 3316 objects, 159168 bytes
0.1% rule_family_data 400 objects, 147200 bytes
0.1% nonterminal 760 objects, 139840 bytes
Expand Down Expand Up @@ -237,16 +237,16 @@ Total memory consumption was 126308K = 123 MB

100.0% was used for memory not allocated for objects:

59.2% text stream storage 76626600 bytes in 452201 claims
59.2% text stream storage 76627344 bytes in 452212 claims
3.5% dictionary storage 4544512 bytes in 6619 claims
---- sorting 744 bytes in 3 claims
5.5% source text 7200000 bytes in 3 claims
8.3% 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.4% inter symbols storage 4522784 bytes in 27922 claims
12.9% inter bytecode storage 16767480 bytes in 14 claims
3.4% inter symbols storage 4523040 bytes in 27924 claims
12.9% inter bytecode storage 16767472 bytes in 14 claims
4.8% 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
Expand All @@ -255,5 +255,5 @@ Total memory consumption was 126308K = 123 MB
---- code generation workspace for objects 1336 bytes in 4 claims
0.2% emitter array storage 279776 bytes in 1995 claims

-140.-5% was overhead - -181850688 bytes = -177588K = -173 MB
-140.-5% was overhead - -181851424 bytes = -177589K = -173 MB

18 changes: 9 additions & 9 deletions inform7/Figures/timings-diagnostics.txt
@@ -1,8 +1,8 @@
100.0% in inform7 run
68.1% in compilation to Inter
47.6% in //Sequence::undertake_queued_tasks//
4.6% in //MajorNodes::pre_pass//
3.3% in //MajorNodes::pass_1//
68.3% in compilation to Inter
47.9% in //Sequence::undertake_queued_tasks//
4.7% in //MajorNodes::pre_pass//
3.2% in //MajorNodes::pass_1//
2.3% in //RTPhrasebook::compile_entries//
1.8% in //ImperativeDefinitions::assess_all//
1.5% in //RTKindConstructors::compile//
Expand All @@ -19,10 +19,10 @@
0.1% in //Understand::traverse//
0.1% in //World::stages_II_and_III//
2.1% not specifically accounted for
29.1% in running Inter pipeline
10.1% in step 14/15: generate inform6 -> auto.inf
7.6% in step 5/15: load-binary-kits
6.7% in step 6/15: make-synoptic-module
28.9% in running Inter pipeline
9.9% in step 14/15: generate inform6 -> auto.inf
7.5% in step 5/15: load-binary-kits
6.8% in step 6/15: make-synoptic-module
1.5% in step 9/15: make-identifiers-unique
0.4% in step 12/15: eliminate-redundant-operations
0.4% in step 4/15: compile-splats
Expand All @@ -32,6 +32,6 @@
0.1% in step 10/15: reconcile-verbs
0.1% in step 2/15: parse-insertions
0.1% in step 3/15: resolve-conditional-compilation
0.6% not specifically accounted for
0.7% not specifically accounted for
2.2% in supervisor
0.5% not specifically accounted for
5 changes: 5 additions & 0 deletions inform7/Internal/Inter/WorldModelKit/Sections/WorldModel.i6t
Expand Up @@ -228,6 +228,11 @@ Note that |MakePart| removes the part-to-be from the object tree before
attaching it: it cannot, of course, be the core of the resulting object.

=
[ PartOf P;
if (P ofclass K2_thing) return P.component_parent;
return nothing;
];

[ MakePart P Of First;
if (P == player) return RunTimeProblem(RTP_CANTMAKEPART, Of);
if (parent(P)) remove P; give P ~worn;
Expand Down
2 changes: 1 addition & 1 deletion inform7/Tests/Test Internals/_Results_Ideal/Calculus.txt
Expand Up @@ -510,7 +510,7 @@ Scenery as a noun
<< scenery(<ContainerOf(*1) : 'the box'>) >>

2. all of the scenery parts of Peter are in the Laboratory
<< ForAll x IN< thing(x) & scenery(x) & ('peter' == <(*1.component_parent) : x>) IN> : ('the laboratory' == <ContainerOf(*1) : x>) >>
<< ForAll x IN< thing(x) & scenery(x) & ('peter' == <PartOf(*1) : x>) IN> : ('the laboratory' == <ContainerOf(*1) : x>) >>
x - object.


Expand Down
2 changes: 1 addition & 1 deletion inform7/Tests/Test Makes/Eg4-C/textual.txt
Expand Up @@ -27753,7 +27753,7 @@ package main _plain
constant (int32) KIT_CONFIGURATION_BITMAP = 0
constant (int32) KIT_CONFIGURATION_LOOKMODE = 2
constant (text) I7_VERSION_NUMBER = "10.1.0"
constant (text) I7_FULL_VERSION_NUMBER = "10.1.0-alpha.1+6U79"
constant (text) I7_FULL_VERSION_NUMBER = "10.1.0-alpha.1+6U80"
constant (text) ^virtual_machine = "C/32d/v1/no-main"
constant (text) ^virtual_machine_icon = "vm_glulx.png"
constant (text) ^language_elements_used = "core, naming, instance counting, glulx external files"
Expand Down
2 changes: 1 addition & 1 deletion inform7/if-module/Chapter 3/Spatial Relations.w
Expand Up @@ -73,7 +73,7 @@ a union of the others, and therefore includes incorporation.)
R_incorporation =
BinaryPredicates::make_pair(spatial_bp_family,
BPTerms::new_full(infs_thing, NULL, EMPTY_WORDING,
Calculus::Schemas::new("(*1.component_parent)")),
Calculus::Schemas::new("PartOf(*1)")),
BPTerms::new(infs_thing),
I"incorporates", I"is-part-of",
Calculus::Schemas::new("MakePart(*2,*1)"), NULL,
Expand Down

0 comments on commit 420542d

Please sign in to comment.