diff --git a/docs/core-module/1-wtc.html b/docs/core-module/1-wtc.html index 06962fe21..b8b28a46b 100644 --- a/docs/core-module/1-wtc.html +++ b/docs/core-module/1-wtc.html @@ -211,7 +211,7 @@ rough stages. Twenty is plenty. return inform7_task->project->as_copy->edition; } -parse_node_tree *Task::syntax_tree(void) { +parse_node_tree *Task::syntax_tree(void) { return latest_syntax_tree; } diff --git a/docs/core-module/13-kak.html b/docs/core-module/13-kak.html index 0e714bef5..080b261ce 100644 --- a/docs/core-module/13-kak.html +++ b/docs/core-module/13-kak.html @@ -87,7 +87,7 @@ are drawn about them.
-inference_subject *Kinds::Knowledge::as_subject(kind *K) { +inference_subject *Kinds::Knowledge::as_subject(kind *K) { if (K == NULL) return NULL; return K->construct->dt_knowledge; } diff --git a/docs/core-module/14-ds.html b/docs/core-module/14-ds.html index 054318bab..0fe0e676b 100644 --- a/docs/core-module/14-ds.html +++ b/docs/core-module/14-ds.html @@ -168,7 +168,7 @@ a named object or similar, so: return Descriptions::from_proposition(prop, W); } -instance *Descriptions::to_instance(parse_node *spec) { +instance *Descriptions::to_instance(parse_node *spec) { if (Specifications::is_description(spec)) { pcalc_prop *prop = Descriptions::to_proposition(spec); parse_node *val = Calculus::Propositions::describes_value(prop); @@ -230,7 +230,7 @@ during play. return FALSE; } -int Descriptions::is_complex(parse_node *spec) { +int Descriptions::is_complex(parse_node *spec) { if (Specifications::is_description(spec)) return Calculus::Propositions::is_complex( Descriptions::to_proposition(spec)); @@ -258,7 +258,7 @@ a list. It's sometimes convenient to loop through this list: au = Calculus::Propositions::next_unary_predicate(&au_prop))
-int Descriptions::number_of_adjectives_applied_to(parse_node *spec) { +int Descriptions::number_of_adjectives_applied_to(parse_node *spec) { return Calculus::Propositions::count_unary_predicates( Descriptions::to_proposition(spec)); } @@ -331,7 +331,7 @@ a list. It's sometimes convenient to loop through this list: return Calculus::Propositions::from_spec(spec); } -quantifier *Descriptions::get_quantifier(parse_node *spec) { +quantifier *Descriptions::get_quantifier(parse_node *spec) { if (Specifications::is_description(spec)) return Calculus::Atoms::get_quantifier(Descriptions::to_proposition(spec)); return NULL; diff --git a/docs/core-module/14-rv.html b/docs/core-module/14-rv.html index 39aa18f70..25e2b397b 100644 --- a/docs/core-module/14-rv.html +++ b/docs/core-module/14-rv.html @@ -105,7 +105,7 @@ pointers: parse_node *Rvalues::from_constant_phrase(constant_phrase *val) { CONV_FROM(constant_phrase, Kinds::base_construction(CON_phrase)) } parse_node *Rvalues::from_equation(equation *val) { CONV_FROM(equation, K_equation) } parse_node *Rvalues::from_named_rulebook_outcome(named_rulebook_outcome *val) { CONV_FROM(named_rulebook_outcome, K_rulebook_outcome) } -parse_node *Rvalues::from_property(property *val) { CONV_FROM(property, Properties::to_kind(val)) } +parse_node *Rvalues::from_property(property *val) { CONV_FROM(property, Properties::to_kind(val)) } parse_node *Rvalues::from_rule(rule *val) { CONV_FROM(rule, Rules::to_kind(val)) } parse_node *Rvalues::from_rulebook(rulebook *val) { CONV_FROM(rulebook, Rulebooks::to_kind(val)) } parse_node *Rvalues::from_table(table *val) { CONV_FROM(table, K_table) } diff --git a/docs/core-module/14-sp.html b/docs/core-module/14-sp.html index 2c5341759..505a128c9 100644 --- a/docs/core-module/14-sp.html +++ b/docs/core-module/14-sp.html @@ -95,7 +95,7 @@ for creating and using them. return Descriptions::from_kind(K, FALSE); } -kind *Specifications::to_kind(parse_node *spec) { +kind *Specifications::to_kind(parse_node *spec) { if (Node::is(spec, AMBIGUITY_NT)) spec = spec->down; if (Specifications::is_description(spec)) return Descriptions::to_kind(spec); @@ -143,13 +143,13 @@ but "12" is not. return g; } -int Specifications::is_description(parse_node *p) { +int Specifications::is_description(parse_node *p) { if ((Node::is(p, TEST_VALUE_NT)) && (Rvalues::is_CONSTANT_construction(p->down, CON_description))) return TRUE; return FALSE; } -pcalc_prop *Specifications::to_proposition(parse_node *p) { +pcalc_prop *Specifications::to_proposition(parse_node *p) { if (p == NULL) return NULL; if (Specifications::is_description(p)) return Descriptions::to_proposition(p); @@ -391,7 +391,7 @@ meaning could be found.diff --git a/docs/core-module/6-bp.html b/docs/core-module/6-bp.html index cc5893b76..4c75b66f8 100644 --- a/docs/core-module/6-bp.html +++ b/docs/core-module/6-bp.html @@ -918,7 +918,7 @@ so the fact that it runs relatively slowly does not matter.-parse_node *Specifications::new_UNKNOWN(wording W) { +parse_node *Specifications::new_UNKNOWN(wording W) { return Node::new_with_words(UNKNOWN_NT, W); }diff --git a/docs/core-module/15-pr.html b/docs/core-module/15-pr.html index 7bfde549b..bc6245235 100644 --- a/docs/core-module/15-pr.html +++ b/docs/core-module/15-pr.html @@ -540,7 +540,7 @@ of the other: int Properties::is_either_or(property *prn) { return prn->either_or; } -int Properties::is_value_property(property *prn) { +int Properties::is_value_property(property *prn) { if (prn->either_or == FALSE) return TRUE; return FALSE; } diff --git a/docs/core-module/15-vp.html b/docs/core-module/15-vp.html index 170a0ce1f..c7939d122 100644 --- a/docs/core-module/15-vp.html +++ b/docs/core-module/15-vp.html @@ -232,7 +232,7 @@ then say that a thing has a weight: that makes a property also called Instances::make_kind_coincident(K, prn); } -int Properties::Valued::coincides_with_kind(property *prn) { +int Properties::Valued::coincides_with_kind(property *prn) { if ((prn == NULL) || (prn->either_or)) internal_error("non-value property"); return prn->also_a_type; } diff --git a/docs/core-module/26-pc.html b/docs/core-module/26-pc.html index 2579c5c90..e99219997 100644 --- a/docs/core-module/26-pc.html +++ b/docs/core-module/26-pc.html @@ -220,12 +220,12 @@ function togglePopup(material_id) { PLUGINS_CALL(PLUGIN_PARSE_COMPOSITE_NQS, W, DW, quantifier_used, some_kind); } -int Plugins::Call::refine_implicit_noun(parse_node *p) { +int Plugins::Call::refine_implicit_noun(parse_node *p) { PLUGINS_CALL(PLUGIN_REFINE_IMPLICIT_NOUN, p); } -int Plugins::Call::act_on_special_NPs(parse_node *p) { +int Plugins::Call::act_on_special_NPs(parse_node *p) { PLUGINS_CALL(PLUGIN_ACT_ON_SPECIAL_NPS, p); } diff --git a/docs/core-module/26-pl.html b/docs/core-module/26-pl.html index f50810e7a..ef4325ed0 100644 --- a/docs/core-module/26-pl.html +++ b/docs/core-module/26-pl.html @@ -449,7 +449,7 @@ with the following. WRITE(".\n"); } -int Plugins::Manage::plugged_in(plugin *P) { +int Plugins::Manage::plugged_in(plugin *P) { return P->now_plugged_in; }
-text_stream *BinaryPredicates::get_log_name(binary_predicate *bp) { +text_stream *BinaryPredicates::get_log_name(binary_predicate *bp) { return bp->debugging_log_name; }@@ -970,7 +970,7 @@ so the fact that it runs relatively slowly does not matter.
-binary_predicate *BinaryPredicates::get_reversal(binary_predicate *bp) { +binary_predicate *BinaryPredicates::get_reversal(binary_predicate *bp) { if (bp == NULL) internal_error("tried to find reversal of null relation"); return bp->reversal; } diff --git a/docs/core-module/7-ns.html b/docs/core-module/7-ns.html index e9b24acac..f4d6ec3a1 100644 --- a/docs/core-module/7-ns.html +++ b/docs/core-module/7-ns.html @@ -684,64 +684,6 @@ Problem message than the one they will otherwise receive later on. } }- - -
-<np-relative-phrase-implicit> ::= - worn | ==> Act on the implicit RP worn21.1; player\_plugin - carried | ==> Act on the implicit RP carried21.2; player\_plugin - initially carried | ==> Act on the implicit RP initially carried21.3; player\_plugin - here ==> Act on the implicit RP here21.4; spatial\_plugin --
§21.1. Act on the implicit RP worn21.1 = -
- -- #ifndef IF_MODULE - return FALSE; - #endif - #ifdef IF_MODULE - *X = 0; *XP = NounPhrases::PN_rel(W, R_wearing, -1, NULL); - #endif --
§21.2. Act on the implicit RP carried21.2 = -
- -- #ifndef IF_MODULE - return FALSE; - #endif - #ifdef IF_MODULE - *X = 0; *XP = NounPhrases::PN_rel(W, R_carrying, -1, NULL); - #endif --
§21.3. Act on the implicit RP initially carried21.3 = -
- -- #ifndef IF_MODULE - return FALSE; - #endif - #ifdef IF_MODULE - *X = 0; *XP = NounPhrases::PN_rel(W, R_carrying, -1, NULL); - #endif --
§21.4. Act on the implicit RP here21.4 = -
- -- #ifndef IF_MODULE - return FALSE; - #endif - #ifdef IF_MODULE - *X = 0; *XP = NounPhrases::PN_rel(W, NULL, PARENTAGE_HERE_RELN, NULL); - #endif --
- if ((Annotations::read_int(px, relationship_node_type_ANNOT) == DIRECTION_RELN) && - (Annotations::read_int(py, relationship_node_type_ANNOT) == DIRECTION_RELN)) { - #ifdef IF_MODULE + #ifdef IF_MODULE + if ((PL::MapDirections::get_mapping_relationship(px)) && + (PL::MapDirections::get_mapping_relationship(py))) { PL::Map::enter_one_way_mode(); - #endif Assertions::Maker::make_assertion_recursive(px, py->down); Assertions::Maker::make_assertion_recursive(px->down, py); - #ifdef IF_MODULE PL::Map::exit_one_way_mode(); - #endif return; } + #endif + Problems::Using::assertion_problem(Task::syntax_tree(), _p_(PM_RelationsEquated), "this says that two different relations are the same", "like saying that 'in the box is on the table'. (Sometimes this " diff --git a/docs/core-module/9-rk.html b/docs/core-module/9-rk.html index aabbf3cff..4f5851ac2 100644 --- a/docs/core-module/9-rk.html +++ b/docs/core-module/9-rk.html @@ -100,15 +100,15 @@ objects or values, but there are two exceptional cases to take care of. Assertions::Relational::assert_subtree_in_relationship(value->down->next, relationship_subtree); return; } + #ifdef IF_MODULE + if (PL::MapDirections::get_mapping_relationship(relationship_subtree)) + Exceptional relationship nodes for map connections1.3; + pronoun_usage *pro = Node::get_pronoun(relationship_subtree->down); + if ((pro) && (pro->pronoun_used == here_pronoun)) + Exceptional relationship nodes for placing objects "here"1.2; + #endif - switch(Annotations::read_int(relationship_subtree, relationship_node_type_ANNOT)) { - case STANDARD_RELN: Standard relationship nodes (the vast majority)1.1; - #ifdef IF_MODULE - case PARENTAGE_HERE_RELN: Exceptional relationship nodes for placing objects "here"1.2; - case DIRECTION_RELN: Exceptional relationship nodes for map connections1.3; - #endif - default: internal_error("unknown RELATIONSHIP node type"); - } + Standard relationship nodes (the vast majority)1.1; }
§1.1. Standard relationship nodes (the vast majority)1.1 = @@ -119,7 +119,7 @@ objects or values, but there are two exceptional cases to take care of. if (bp == NULL) internal_error("asserted bp-less relationship subtree"); Properties::SettingRelations::fix_property_bp(bp); Assertions::Relational::assert_relation_between_subtrees(value, bp, relationship_subtree->down); - break; + return;
§1.2. Exceptional relationship nodes for placing objects "here"1.2 = @@ -137,7 +137,7 @@ objects or values, but there are two exceptional cases to take care of. Calculus::Propositions::Abstract::to_put_here(), Node::get_subject(value), prevailing_mood); } - break; + return;
§1.3. Exceptional relationship nodes for map connections1.3 = @@ -161,7 +161,7 @@ objects or values, but there are two exceptional cases to take care of. "the source of a map connection has to be a room or door", "so sentences like 'The pink door is south of 0.' are not " "allowed."); - break; + return; } if ((iy == NULL) || (id == NULL)) internal_error("malformed directional subtree"); @@ -176,7 +176,7 @@ objects or values, but there are two exceptional cases to take care of. "a door or 'nowhere'", "but here the destination doesn't even seem to be an object."); } - break; + return;
§1.3.1. Make some paranoid checks that the map subtree is valid1.3.1 = @@ -191,13 +191,13 @@ objects or values, but there are two exceptional cases to take care of. StandardProblems::sentence_problem(Task::syntax_tree(), _p_(BelievedImpossible), "this is not straightforward in saying which room (or door) leads away from", "and should just name the source."); - break; + return; } if (Node::get_type(relationship_subtree->down->next) != PROPER_NOUN_NT) { StandardProblems::sentence_problem(Task::syntax_tree(), _p_(BelievedImpossible), "this is not straightforward in saying which direction the room (or door) lies in", "and should just name the direction."); - break; + return; }
int forbid_nowhere = FALSE; -void Assertions::Refiner::refine(parse_node *p, int creation_rule) { +void Assertions::Refiner::refine(parse_node *p, int creation_rule) { if (p == NULL) internal_error("Refine parse tree on null pn"); if (Annotations::read_int(p, resolved_ANNOT)) return; @@ -378,12 +378,8 @@ has the marble and the box as its children, the relationship being containment. if (p->down) { Assertions::Refiner::refine(p->down, creation_rule); #ifdef IF_MODULE - binary_predicate *bp = Node::get_relationship(p); - if ((bp) && (Plugins::Manage::plugged_in(map_plugin))) { - instance *dir = PL::MapDirections::get_mapping_direction(BinaryPredicates::get_reversal(bp)); - if (dir == NULL) dir = PL::MapDirections::get_mapping_direction(bp); - if (dir) Make the relation one which refers to a map direction9.5.1; - } + instance *dir = PL::MapDirections::get_mapping_relationship(p); + if (dir) Make the relation one which refers to a map direction9.5.1; #endif if (p->down->next) Assertions::Refiner::refine(p->down->next, creation_rule); } @@ -399,9 +395,7 @@ direction object for "north".- LOGIF(NOUN_RESOLUTION, "Directional predicate with BP %S ($O)\n", - BinaryPredicates::get_log_name(bp), dir); - Annotations::write_int(p, relationship_node_type_ANNOT, DIRECTION_RELN); + LOGIF(NOUN_RESOLUTION, "Directional predicate with BP from $O\n", dir); wording DW = Instances::get_name(dir, FALSE); p->down->next = NounPhrases::new_raw(DW); Assertions::Refiner::noun_from_infs(p->down->next, Instances::as_subject(dir)); @@ -476,6 +470,15 @@ inference subject representing the domain to which any new kind would belong.pronoun_usage *pro = Node::get_pronoun(p); if (pro) { + if (pro->pronoun_used == here_pronoun) { + Node::set_type(p, RELATIONSHIP_NT); + p->down = NounPhrases::new_pronoun(Node::get_text(p), pro); + return; + } + if (pro->pronoun_used == implied_pronoun) { + Plugins::Call::refine_implicit_noun(p); + return; + } Node::set_type(p, PROPER_NOUN_NT); if ((Stock::usage_might_be_singular(pro->usage) == FALSE) && (Assertions::Traverse::get_current_subject_plurality())) { @@ -515,42 +518,17 @@ complicated description is as follows:Node::set_type(p, PROPER_NOUN_NT); - Act on the special no-words word range which implies the player9.8.1; - Act on a newly-discovered property of something9.8.3; - if (forbid_nowhere == FALSE) Act on any special noun phrases significant to plugins9.8.4; + Act on a newly-discovered property of something9.8.2; + if (forbid_nowhere == FALSE) Act on any special noun phrases significant to plugins9.8.3; if (creation_rule != MANDATE_CREATION) - Interpret this as an existing noun if possible9.8.5; + Interpret this as an existing noun if possible9.8.4; if (creation_rule != FORBID_CREATION) Node::set_type(p, CREATED_NT); else Node::set_subject(p, NULL);
§9.8.1. There's just one case where an empty word range can be used as a noun -phrase — when it represents an implicit noun, as here, where the person -doing the carrying is implicit: -
- --- -The black box is carried.
-
Act on the special no-words word range which implies the player9.8.1 = -
- -- if (Annotations::read_int(p, implicitly_refers_to_ANNOT)) { - Plugins::Call::refine_implicit_noun(p); - return; - } - - if (Wordings::empty(Node::get_text(p))) { - LOG("$T", current_sentence); - internal_error("Tried to resolve malformed noun-phrase"); - } --
§9.8.2. The following is needed to handle something like "colour of the box", +
§9.8.1. The following is needed to handle something like "colour of the box", where "colour" is a property name. We must be careful, though, to avoid confusion with variable declarations:
@@ -571,7 +549,7 @@ property of something. {<property-name-v>} of ... ==> 0; *XP = RP[1]§9.8.3. Act on a newly-discovered property of something9.8.3 = +
§9.8.2. Act on a newly-discovered property of something9.8.2 =
@@ -597,35 +575,35 @@ property of something.
}
§9.8.4. For example, "above" and "below" become significant if the mapping plugin +
§9.8.3. For example, "above" and "below" become significant if the mapping plugin is active, and "nowhere" if the spatial one is.
-Act on any special noun phrases significant to plugins9.8.4 = +
Act on any special noun phrases significant to plugins9.8.3 =
if (Plugins::Call::act_on_special_NPs(p)) return;
§9.8.5. Interpret this as an existing noun if possible9.8.5 = +
§9.8.4. Interpret this as an existing noun if possible9.8.4 =
parse_node *spec = NULL; - Parse the noun phrase as a value property name9.8.5.1; - if (spec == NULL) Parse the noun phrase as a value9.8.5.3; + Parse the noun phrase as a value property name9.8.4.1; + if (spec == NULL) Parse the noun phrase as a value9.8.4.3; if ((Node::is(spec, NONLOCAL_VARIABLE_NT)) || (Node::is(spec, CONSTANT_NT))) { Assertions::Refiner::noun_from_value(p, spec); return; } if (Specifications::is_description(spec)) - Act on a description used as a noun phrase9.8.5.5; - Act on an action pattern used as a noun phrase9.8.5.4; + Act on a description used as a noun phrase9.8.4.5; + Act on an action pattern used as a noun phrase9.8.4.4;
§9.8.5.1. Perhaps it is the name of a valued property? If so, it is used as a noun, +
§9.8.4.1. Perhaps it is the name of a valued property? If so, it is used as a noun, without obvious reference to any owner: we convert it to a noun node.
@@ -633,14 +611,14 @@ without obvious reference to any owner: we convert it to a noun node. property name meaning, not as the name of a kind of value.) -Parse the noun phrase as a value property name9.8.5.1 = +
Parse the noun phrase as a value property name9.8.4.1 =
if (<value-property-name>(Node::get_text(p))) spec = Rvalues::from_property(<<rp>>);-
§.1. Issue PM_VagueVariable problem.1 =
@@ -652,8 +630,8 @@ property name meaning, not as the name of a kind of value.) "'number variable' or 'a number that varies' - whatever kind of value you " "need - would be much clearer."); -§9.8.5.2. When a noun phrase in an assertion represents a value, it's normally a +
§9.8.4.2. When a noun phrase in an assertion represents a value, it's normally a constant ("13") or else something like a description of values ("a number"). It wouldn't make sense to refer to a temporary value like a local variable, but a global ("player" or "time of day") is possible. @@ -672,7 +650,7 @@ a noun instead of a condition testing the current action. <s-global-variable> ==> TRUE; *XP = RP[1]
§9.8.5.3. Parse the noun phrase as a value9.8.5.3 = +
§9.8.4.3. Parse the noun phrase as a value9.8.4.3 =
@@ -683,10 +661,10 @@ a noun instead of a condition testing the current action. spec = Specifications::new_UNKNOWN(Node::get_text(p)); } if (Descriptions::get_quantifier(spec)) - Check that this noun phrase is allowed a quantifier9.8.5.3.1; + Check that this noun phrase is allowed a quantifier9.8.4.3.1; LOGIF(NOUN_RESOLUTION, "Noun phrase %W parsed as value: $P\n", Node::get_text(p), spec);-
§.1. Issue a problem for a variable described without a kind.1 =
@@ -694,7 +672,7 @@ a noun instead of a condition testing the current action. return;§9.8.5.3.1. Check that this noun phrase is allowed a quantifier9.8.5.3.1 = +
§9.8.4.3.1. Check that this noun phrase is allowed a quantifier9.8.4.3.1 =
@@ -729,8 +707,8 @@ a noun instead of a condition testing the current action. return; }-
§9.8.5.4. If the noun phrase is a valid action pattern, such as "taking something", +
§9.8.4.4. If the noun phrase is a valid action pattern, such as "taking something", we change it to a new node type to mark this. We don't keep the pattern: it will be reparsed much later on.
@@ -742,7 +720,7 @@ piece of wood. So we parse action patterns with a lower priority than values here, given that we know we are looking for a noun. -Act on an action pattern used as a noun phrase9.8.5.4 = +
Act on an action pattern used as a noun phrase9.8.4.4 =
@@ -756,8 +734,8 @@ here, given that we know we are looking for a noun. } #endif-
§9.8.5.5. This case has been left to last, since it's so much the most difficult. +
§9.8.4.5. This case has been left to last, since it's so much the most difficult. Descriptions have to be converted into a surprising range of different subtrees — otherwise it will not be possible to issue a wide range of to-the-point problem messages for badly constructed sentences. @@ -766,7 +744,7 @@ to-the-point problem messages for badly constructed sentences.
Oddly, it's not the complicated descriptions which give trouble...
-Act on a description used as a noun phrase9.8.5.5 = +
Act on a description used as a noun phrase9.8.4.5 =
@@ -775,10 +753,10 @@ to-the-point problem messages for badly constructed sentences. Assertions::Refiner::noun_from_value(p, spec); return; } - Act on a simple description9.8.5.5.1; + Act on a simple description9.8.4.5.1;-
§9.8.5.5.1. ...it's the shorter phrases where, perversely, the risk of a +
§9.8.4.5.1. ...it's the shorter phrases where, perversely, the risk of a misunderstanding is higher. For one thing, we deliberately ignore a valid description in two cases:
@@ -812,7 +790,7 @@ that this is not the same silver bar referred to in some previous sentence. -Act on a simple description9.8.5.5.1 = +
Act on a simple description9.8.4.5.1 =
@@ -823,7 +801,7 @@ sentence. return; }-
§10. The following turns the node p into a subtree representing the content of a simple description in spec. Besides being used above, it's also convenient for assemblies. @@ -836,7 +814,7 @@ where the adjectives each become -void Assertions::Refiner::refine_from_simple_description(parse_node *p, parse_node *spec) { +void Assertions::Refiner::refine_from_simple_description(parse_node *p, parse_node *spec) { inference_subject *head = NULL; Set the attachment node to the headword, if there is one10.1; if (Descriptions::number_of_adjectives_applied_to(spec) > 0) { @@ -1123,8 +1101,6 @@ the two clauses are the wrong way around, so we perform surgery to turn: parse_node *x_pn = p->down->down->next; "north" in the example parse_node *name_pn = p->down->next; "hot and cold room" in the example Node::set_type(p, RELATIONSHIP_NT); - Annotations::write_int(p, relationship_node_type_ANNOT, - Annotations::read_int(p->down, relationship_node_type_ANNOT)); Node::set_type(p->down, CALLED_NT); p->down->next = x_pn; p->down->down->next = name_pn; diff --git a/docs/if-module/3-mcr.html b/docs/if-module/3-mcr.html index 7cdf6696e..fa5f207c7 100644 --- a/docs/if-module/3-mcr.html +++ b/docs/if-module/3-mcr.html @@ -360,6 +360,17 @@ such. return I; return NULL; } + +instance *PL::MapDirections::get_mapping_relationship(parse_node *p) { + binary_predicate *bp = Node::get_relationship(p); + if ((bp) && (Plugins::Manage::plugged_in(map_plugin))) { + instance *dir = PL::MapDirections::get_mapping_direction( + BinaryPredicates::get_reversal(bp)); + if (dir == NULL) dir = PL::MapDirections::get_mapping_direction(bp); + return dir; + } + return NULL; +}