1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-01 06:24:58 +03:00

Fix for Mantis bug 1851

This commit is contained in:
Graham Nelson 2022-04-13 13:10:45 +01:00
parent 79afffa399
commit d87f28fbbb
6 changed files with 95 additions and 59 deletions

View file

@ -237,7 +237,7 @@ Total memory consumption was 126311K = 123 MB
100.0% was used for memory not allocated for objects:
59.2% text stream storage 76619304 bytes in 452741 claims
59.2% text stream storage 76619312 bytes in 452741 claims
3.5% dictionary storage 4550144 bytes in 6627 claims
---- sorting 744 bytes in 3 claims
5.5% source text 7200000 bytes in 3 claims

View file

@ -1,6 +1,6 @@
100.0% in inform7 run
68.1% in compilation to Inter
47.8% in //Sequence::undertake_queued_tasks//
68.4% in compilation to Inter
48.1% in //Sequence::undertake_queued_tasks//
4.5% in //MajorNodes::pre_pass//
3.2% in //MajorNodes::pass_1//
2.4% in //RTPhrasebook::compile_entries//
@ -18,20 +18,20 @@
0.1% in //Task::make_built_in_kind_constructors//
0.1% in //Understand::traverse//
0.1% in //World::stages_II_and_III//
2.0% not specifically accounted for
29.2% 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
2.1% not specifically accounted for
29.0% in running Inter pipeline
10.2% in step 14/15: generate inform6 -> auto.inf
7.5% in step 5/15: load-binary-kits
6.6% in step 6/15: make-synoptic-module
1.6% in step 9/15: make-identifiers-unique
0.5% in step 4/15: compile-splats
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.3% in step 8/15: detect-indirect-calls
0.2% in step 11/15: eliminate-redundant-labels
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.5% not specifically accounted for
2.2% in supervisor
0.4% not specifically accounted for
0.3% not specifically accounted for

View file

@ -49450,6 +49450,30 @@ package main _plain
inv !lookup
val right_txt
val 1
inv !if
inv !and
inv !ofclass
inv !lookup
val left_txt
val 1
val /main/architectural/Routine
inv !ofclass
inv !lookup
val right_txt
val 1
val /main/architectural/Routine
code
inv !if
inv !eq
inv !lookup
val left_txt
val 1
inv !lookup
val right_txt
val 1
code
inv !return
val 0
inv !store
reference
val cpl
@ -50090,7 +50114,6 @@ package main _plain
local ch
local i
local dsize
local csize
local blobcount
local gp
local cl
@ -50101,23 +50124,18 @@ package main _plain
val dsize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val txt
inv !ifelse
val ctxt
inv !if
inv !and
val rtxt
inv !eq
val ctxt
val 0
code
inv !store
reference
val csize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
code
inv !if
val rtxt
code
inv !print
val "*** rtxt without ctxt ***"
inv !printnl
inv !return
val 1
inv !print
val "*** rtxt without ctxt ***"
inv !printnl
inv !return
val 1
inv !store
reference
val brm
@ -50523,6 +50541,24 @@ package main _plain
inv !ifelse
val rtxt
code
inv !if
inv !ge
inv !plus
val cl
val 1
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
code
inv !if
inv !eq
inv /main/BasicInformKit/functions/BlkValueSetLBCapacity_fn/BlkValueSetLBCapacity
val ctxt
inv !times
val 2
val cl
val 0
code
inv !break
inv /main/BasicInformKit/functions/BlkValueWrite_fn/BlkValueWrite
val ctxt
val cl
@ -50531,11 +50567,6 @@ package main _plain
val ctxt
val rtxt
val /main/BasicInformKit/constants/CHR_BLOB_con/CHR_BLOB
inv !store
reference
val csize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
inv !store
reference
val cl
@ -50565,7 +50596,8 @@ package main _plain
inv !plus
val cl
val 1
val csize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
code
inv !if
inv !eq
@ -50577,11 +50609,6 @@ package main _plain
val 0
code
inv !break
inv !store
reference
val csize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
inv /main/BasicInformKit/functions/BlkValueWrite_fn/BlkValueWrite
val ctxt
inv !postincrement
@ -50597,7 +50624,8 @@ package main _plain
inv !plus
val cl
val 1
val csize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
code
inv !if
inv !eq
@ -50609,11 +50637,6 @@ package main _plain
val 0
code
inv !break
inv !store
reference
val csize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
inv /main/BasicInformKit/functions/BlkValueWrite_fn/BlkValueWrite
val ctxt
inv !postincrement
@ -50635,7 +50658,8 @@ package main _plain
inv !plus
val cl
val 1
val csize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
code
inv !if
inv !eq
@ -50647,11 +50671,6 @@ package main _plain
val 0
code
inv !break
inv !store
reference
val csize
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
inv /main/BasicInformKit/functions/BlkValueWrite_fn/BlkValueWrite
val ctxt
inv !postincrement
@ -50661,6 +50680,19 @@ package main _plain
inv !if
val ctxt
code
inv !if
inv !ge
inv !plus
val cl
val 1
inv /main/BasicInformKit/functions/BlkValueLBCapacity_fn/BlkValueLBCapacity
val ctxt
code
inv /main/BasicInformKit/functions/BlkValueSetLBCapacity_fn/BlkValueSetLBCapacity
val ctxt
inv !times
val 2
val cl
inv /main/BasicInformKit/functions/BlkValueWrite_fn/BlkValueWrite
val ctxt
inv !postincrement

View file

@ -133,7 +133,7 @@ void Assertions::Assemblies::make_generalisation(parse_node *look_for, parse_nod
Annotations::write_int(current_sentence, you_can_ignore_ANNOT, TRUE);
LOGIF(ASSEMBLIES, "New generalisation made concerning $j:\nLook for: $T\nMake: $T\n",
LOGIF(ASSEMBLIES, "Assembly on $j:\n- - - -\nLook for: $T\nMake: $T- - - -\n\n",
k, g->look_for, g->what_to_make);
Assertions::Assemblies::ensure_all_generalisations_made(k);
@ -331,7 +331,7 @@ void Assertions::Assemblies::satisfies_generalisation(inference_subject *infs, g
global_pass_state.assembly_position = new_sentence;
LOGIF(ASSEMBLIES,
"Subject $j satisfies generalisation %d (from $j), making sentence:\n$T",
"Subject $j satisfies generalisation %d (from $j), making sentence:\n$T\n",
infs, g->allocation_id, infs_k, new_sentence);
}

View file

@ -253,12 +253,15 @@ void Assertions::make_assertion_recursive_inner(parse_node *px, parse_node *py)
((Node::get_type(py) == COMMON_NOUN_NT)
&& (Node::get_evaluation(py)) && (Annotations::read_int(py, multiplicity_ANNOT) > 1)
&& (Node::get_type(px) != RELATIONSHIP_NT))) {
StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_MultiplyVague),
"multiple objects can only be put into relationships",
"by saying something like 'In the Drawing Room are two women.', "
"and all other assertions with multiple objects are disallowed: "
"so 'Three doors are open.' is rejected - I can't tell which three.");
return;
if (Node::get_implicit_in_creation_of(current_sentence) == NULL) {
LOG("px = $T\npy=$T\n", px, py);
StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_MultiplyVague),
"multiple objects can only be put into relationships",
"by saying something like 'In the Drawing Room are two women.', "
"and all other assertions with multiple objects are disallowed: "
"so 'Three doors are open.' is rejected - I can't tell which three.");
return;
}
}
@ The case names here are systematic and were constructed from the above

View file

@ -535,6 +535,7 @@ void CoreSyntax::grant_L3_permissions(void) {
Annotations::allow_for_category(L3_NCAT, subject_ANNOT);
Annotations::allow_for_category(L3_NCAT, explicit_gender_marker_ANNOT);
Annotations::allow(ADJECTIVE_NT, predicate_ANNOT);
Annotations::allow(ADJECTIVE_NT, multiplicity_ANNOT);
Annotations::allow(VERB_NT, category_of_I6_translation_ANNOT);
Annotations::allow(VERB_NT, rule_placement_sense_ANNOT);
Annotations::allow(COMMON_NOUN_NT, creation_site_ANNOT);