next up previous contents
Next: Mapping: Reference over sets Up: Reference Previous: Reference

Scope

A relative path reference is bound to a specific description by the rules of scope and refinement. The scope of Noos is lexical, that is to say a relative reference is determined by the text in which it appears. Specifically, a relative path reference is bound to the root of the description in which it appears--the outmost define in the text. Local descriptions (or subdescriptions) are also descriptions. The formal reason is because subterms of feature terms are also feature terms. Notice, however, that the outmost description in a text, the root, is the only one that is bound to relative path references, and none of the local descriptions is bound to it. Since a local description is always a refinement of a description tex2html_wrap_inline1889 , relative path references that are to be bound to it are to be specified in the text that defines description tex2html_wrap_inline1889 --and not in the refinements of tex2html_wrap_inline1889 .

In Example 2.5 person is defined with two relative path references in slots father and mother. Father is defined as (>> husband mother) and mother as (>> wife father). The relative path references are bound to the description's root, person in this case. In fact the generic description person have no referent for those references, but that is not important, since the refinements of person--namely John, Mary, Nick, and Ann in Example 2.5--can reuse those relative path references. In Example 2.6, when the user performs the two first queries, the refinements of person use the relative path definitions. In the first query, the feature value of father slot in John is unknown, but being a refinement of person the father slot reuses the relative path reference (>> husband mother) this slot has in person. That relative path reference is bound to the current root John and thus establishes the binding of the feature value of father to the appropriate value regarding John--that is to say Nick.

Another way to view path references is as constraints. Any description tex2html_wrap_inline1889 that is refinement of person (and that does not override the father slot) will obey the constraint of having as feature value in father the husband of the mother of tex2html_wrap_inline1889 gif.

   frag296

Remark also in Example 2.6 that the third query (asking the father of Mary) returns an anonymous person designated <Person-13>, while the fourth query is unable to find a father of Nick and returns the fail, a token denoting failure. A reference to an non-existent concept in Noos determines a failure--which is not the same as error. The role of fail and failure in reflection will be explained in Chapter 4.

  frag317

Example 2.7 shows two other uses of relative path references. First, notice the (>>) expression in the owner of the car of Jonah. An expression (>>) is a relative path reference with a null path that denotes the rootgif of the description text in which it appears--namely Jonah. Second, notice that a relative path reference binds to the root of the description text in which it is scoped. For instance, the prize of a car is defined as (>> prize model), and the lexical scope where it is defined has car as root. Then, the refinement of car that is the car of Jonah (let us call it car-11) has in prize a relative path (>> prize model) that binds to that car-11 and not to Jonah. That is to say, relative path references are bound relative to the root of the description where they are textually defined. Thus, the relative path references of car are always relative to the appropriate car in whatever refinement of car, and regardless of whether that car is a subdescription of another description (as car-11).

If we conceive of path references as constraints, this amounts to state that a relative path reference like (>> prize model) appearing textually in car is establishing a constraint like tex2html_wrap_inline2013 in any refinement of car that does not override it. When a refinement of car is a subdescription of Jonah we can conceive of the constraint as being augmented by the slot in which it appears, as follows: tex2html_wrap_inline2015 , where car in the prior constraint has been substituted by car(Jonah), namely Jonah's car.

Another way to look at the combination of refinement and scope is to look at the following list of equivalent absolute path references dealing with the price of Jonah's car. We are assuming that car-11 is Jonah's car and Ibiza-19 is Jonah's car model, tex2html_wrap_inline2021 precedes the query, tex2html_wrap_inline2023 precedes (a transformation to) an equivalent path reference, and tex2html_wrap_inline2025 precedes the query's outcome.

frag369

tex2html_wrap_inline1865 Summarizing, abstract concepts like persons and cars can be defined by descriptions like person, car and car-model using relative path references to specify the constraints among the features that characterize them. Descriptions can be refined and freely combined. Abstract descriptions (like car-model) can be refined to define less abstract concepts (like Ibiza) or concrete concepts (like Ibiza-19). Moreover, complex abstract concepts can be defined by combining refinements of abstract concepts and specifying their mutual relations and constraints. Finally, complex abstract concepts can be refined into descriptions of concrete concepts that will incorporate all the properties of the abstract descriptions that are not overridden.


next up previous contents
Next: Mapping: Reference over sets Up: Reference Previous: Reference

Enric Plaza
Thu Jan 23 11:36:28 MET 1997