• No se han encontrado resultados

en diferentes contextos de desarrollo

4.1. Ontario, Canadá

Definition 1 (Identifier Node). Identifier Nodes (IN) were introduced in Section 9.1.2.2, as those nodes in the parse tree labelled by one of the following syntactic categories:

<boolean query name>, <set query name>, <label variable>, <label constant>, <set variable>, <set constant>.

Additionally, let us defineIdentifier Node Name(INN) as string of symbols labelling the unique child (in fact, a leaf called above asi) of the corresponding IN fork in the parse tree.

Definition 2(Binder Node). Binder (or binding) Nodes(BN) are those nodes in the parse tree labelled by one of the following syntactic categories:

<delta-term with declarations>, <delta-formula with declarations>, <collect>, <separate>, <recursion>, <quantified formula>.

Binder nodes can have appropriate declarations like "let...", "forall...",

"exists...", etc., as described in Definition 3, and thereby canbindidentifier occurrences (or IN).

Definition 3 (Identifier Declaration Node). Following from Definition 2 those declarations belonging to BN are calledidentifier declarations nodes (IDN) of a BNand defined as follows. • For BNs <delta-formula with declarations>with "let" declaration(s), and<delta-term with declarations> with"let" declaration(s) the IDNs are:

5

For example, the second leaf labelled by the identifierlin Fig. 9.1 above

6

In Fig. 9.1 above the corresponding node would be<delta-formula with declarations>having the declaration of the label constantlunder it. Note that quantifiers and other quantifier-like constructs, called binders (see Section 9.2.2), are also considered as identifier declarations.

– <set constant declaration>grandchild of<declarations>, – <label constant declaration>grandchild of<declarations>, – <set query declaration>grandchild of<declarations>, and – <boolean query declaration>grandchild of<declarations>. • For BNs<separate>and<collect>the IDNs are:

– <label variable>grandchild of<variable pair>, and – <set variable>grandchild of<variable pair>. • For BN<recursion>the IDNs are:

– <set variable>child of<recursion>,

– <label variable>grandchild of<variable pair>, and – <set variable>grandchild of<variable pair>. • For BN<quantified formula>the IDNs are:

– <label variable>grandchild of<variable pair>, and – <set variable>grandchild of<variable pair>.

For example, Figure 9.2 depicts a fragment of a query parse tree, where the root node

<separate>is a BN and the corresponding IDN nodes (described above) can be found by walking the paths from the<separate>node,

<variable pair>→<variable pair label>→<label variable>

<variable pair>→<variable pair set>→<set variable>

All other cases follow as the above. Note that there may be many IDNs of a given BN. Any IDN declares one or more identifiers (IN) each of which has its name as a string of symbols (the leaf under IN).

Definition 4(Bounding Term or Formula or Label Value Node ).

(a) Following from Definition 2, the bounding term or formula or label value nodes (BTFLVN) of a BN

<collect> <separate> <recursion>

<quantified formula>

<delta-term with declarations> <delta-formula with declarations>

is defined, respectively, as

– a unique<delta-term>child of:

∗ <collect>or<separate>or<recursion>or ∗ <forall>child of<quantified formula>or ∗ <exists>child of<quantified formula>or ∗ any<set constant declaration>grandchild of

<delta-term with declarations>or

<delta-formula with declarations>or

∗ any<set query declaration>grandchild of

<delta-term with declarations>or

<delta-formula with declarations>, or

– a unique<label value>child of:

∗ any<label constant declaration>grandchild of

<delta-term with declarations>or

<delta-formula with declarations>or

– a unique<delta-formula>child of:

∗ any<boolean query declaration>child of

<delta-term with declarations>or

<delta-formula with declarations>.

(b) Each BTFLVN of a BN restricts the range of the value of some INs (variables, constants or query names) which BN binds7and which we also callbounded or restricted IN(s) by the BTFLVN8. These INs are defined as follows:

– In the case of BNs <collect>, <separate>, <recursion> and

<quantified formula>, the bounded INs are respectively

<label variable> and<set variable> grandchildren of<variable pair>.

– Additionally, in the case of BN <recursion> one more bounded IN is its immediate<set variable>child.

– In the case of BNs <delta-formula with declarations> or

<delta-term with declarations>, the bounded IN is either the declared

7

Which was briefly hinted in the Definition 2

8

Moreover, the IN bounded by BTFLVN should not be free in the BTFLVN (i.e., if present in the BTFLVN, it should be declared inside this BTFLVN) as we will discuss later as one of the conditions to be checked by contextual analysis algorithm. This is the reason why we need Definition 4.

<set constant> or <label constant>, or <set query name>, or

<boolean query name>.

For example, Figure 9.2 depicts the query parse tree for an expressione(fragment of a queryq), where the root node<recursion>is a BN and the corresponding BTFLVN and the bounded INs can be found by walking the paths,

<recursion>→<delta-term>(BTFLVN)

<recursion>→<set variable>(IN)

<recursion>→<variable pair>→

<variable pair label>→<label variable>(IN)

<recursion>→<variable pair>→

<variable pair term>→<set variable>(IN)

whereas <label variable> (l) and <set variable> (x) are INs bounded by this

<delta-term> (BTFLVN). Additional (recursion) <set variable> (r) is IN also bounded by<delta-term>(BTFLVN).

Figure 9.2: Fragment of a query parse tree