Skip to content

Commit

Permalink
Fix for Mantis bug 2054
Browse files Browse the repository at this point in the history
  • Loading branch information
ganelson committed Apr 7, 2022
1 parent 9b87f3e commit 39a7ca6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 18 deletions.
32 changes: 16 additions & 16 deletions inform7/Figures/timings-diagnostics.txt
@@ -1,37 +1,37 @@
100.0% in inform7 run
68.2% in compilation to Inter
47.7% in //Sequence::undertake_queued_tasks//
4.5% in //MajorNodes::pre_pass//
68.6% in compilation to Inter
48.1% in //Sequence::undertake_queued_tasks//
4.4% in //MajorNodes::pre_pass//
3.2% in //MajorNodes::pass_1//
2.4% in //RTPhrasebook::compile_entries//
1.8% in //ImperativeDefinitions::assess_all//
1.5% in //RTKindConstructors::compile//
1.0% in //Sequence::lint_inter//
1.9% in //ImperativeDefinitions::assess_all//
1.4% in //RTKindConstructors::compile//
1.2% in //Sequence::lint_inter//
0.5% in //MajorNodes::pass_2//
0.5% in //Sequence::undertake_queued_tasks//
0.5% in //World::stage_V//
0.4% in //ImperativeDefinitions::compile_first_block//
0.4% in //Sequence::undertake_queued_tasks//
0.4% in //Sequence::undertake_queued_tasks//
0.2% in //CompletionModule::compile//
0.2% in //RTKindConstructors::compile_permissions//
0.1% in //InferenceSubjects::emit_all//
0.1% in //Task::make_built_in_kind_constructors//
0.1% in //Understand::traverse//
0.1% in //World::stages_II_and_III//
2.2% not specifically accounted for
29.0% in running Inter pipeline
10.2% in step 14/14: generate inform6 -> auto.inf
7.5% in step 5/14: load-binary-kits
6.6% in step 6/14: make-synoptic-module
2.1% not specifically accounted for
28.7% in running Inter pipeline
10.0% in step 14/14: generate inform6 -> auto.inf
7.4% in step 5/14: load-binary-kits
6.7% in step 6/14: make-synoptic-module
1.6% in step 9/14: make-identifiers-unique
0.5% in step 4/14: compile-splats
0.4% in step 12/14: eliminate-redundant-operations
0.4% in step 7/14: shorten-wiring
0.3% in step 11/14: eliminate-redundant-labels
0.3% in step 7/14: shorten-wiring
0.3% in step 8/14: detect-indirect-calls
0.2% in step 11/14: eliminate-redundant-labels
0.1% in step 10/14: reconcile-verbs
0.1% in step 2/14: parse-insertions
0.1% in step 3/14: resolve-conditional-compilation
0.3% not specifically accounted for
2.3% in supervisor
0.6% not specifically accounted for
2.1% in supervisor
0.4% not specifically accounted for
15 changes: 13 additions & 2 deletions inform7/assertions-module/Chapter 2/Passes through Major Nodes.w
Expand Up @@ -192,7 +192,11 @@ identifying unparsed noun phrases. //Refiner::refine_coupling//
returns |TRUE| if it succeeds in this.

After that, there are two cases: existential sentences (such as "there are
two cases") and all others (such as "regular meaning are more subtle").
two cases") and all others (such as "regular meanings are more subtle").

The trickiest form is "There is a container with carrying capacity 30", say,
which equates |DEFECTIVE_NOUN_NT| with |WITH_NT|. This is somehow both cases
at once, and we have to perform both an existential assertion and a coupling.

@<Act on regular meaning@> =
parse_node *px = p->down->next;
Expand All @@ -201,7 +205,14 @@ two cases") and all others (such as "regular meaning are more subtle").
(Refiner::refine_coupling(px, py, FALSE))) {
if (Node::get_type(px) == DEFECTIVE_NOUN_NT) {
Assertions::make_existential(py);
Anaphora::change_discussion_from_coupling(py, py);
if (Node::get_type(py) == WITH_NT) {
px = py->down;
py = py->down->next;
Assertions::make_coupling(px, py);
Anaphora::change_discussion_from_coupling(px, py);
} else {
Anaphora::change_discussion_from_coupling(py, py);
}
} else {
Assertions::make_coupling(px, py);
Anaphora::change_discussion_from_coupling(px, py);
Expand Down

0 comments on commit 39a7ca6

Please sign in to comment.