• Keine Ergebnisse gefunden

XML and Programming Languages

N/A
N/A
Protected

Academic year: 2022

Aktie "XML and Programming Languages"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Fourth exercise sheet for the lecture

XML and Programming Languages

Dr. Janis Voigtl¨ander Summer Term 2009

Exercise 11

Use the alternative CoreXPath semantics to give a “query tree” (overFaxis,∩, etc.) for efficient evaluation of /descendant::a/b[c/d∨ ¬(following::∗)]. 3 Exercise 12

Discuss the general complexity, in terms of query size and data size, of query evaluation using the alternative CoreXPath semantics, under the assumption that operations likeFaxis,∩, etc. execute in linear time depending on the sizes

of their input sets. 3

Exercise 13

A CoreXPath pathp1 is said to semantically contain another onep2, written p1 ⊇ p2, if for every tree document and node n therein, [[p1]]NodeSet(n) ⊇ [[p2]]NodeSet(n).

1. Let p1 = r[(a/b)∧(a/c)]/d and p2 = r[(a[b]/c)∧d]/d. Check whether p1 ⊇p2 and/orp1 ⊆p2.

2. Let p1 = a/b/c and p2 = a/b[c]/c. Check whether p1 ⊇ p2 and/or

p1 ⊆p2. 3

Exercise 14

A CoreXPath path p1 is said to be semantically equivalent to another one p2, writtenp1 ≡p2, if p1 ⊇p2 and p1 ⊆p2. Prove the following equivalences, where the ti and qi are arbitrary:

1. descendant::t1[q1]/parent::t2[q2]≡descendant-or-self::t2[q2∧t1[q1]]

2. t1[q1∧(parent::t2[q2])]≡self::t2[q2]/t1[q1] 3

Referenzen

ÄHNLICHE DOKUMENTE

I Axiomatic semantics tries to give a meaning of a programming construct by giving proof rules. This means we have to put them into relation with each other, and show that

A regular expression is deterministic if the FSA built from it using the construction in the lecture has no two transitions (q, σ, q ′ ) and (q, σ, q ′′ ) with q ′ 6= q

Give the unabbreviated versions of the following CoreXPath queries, and describe their semantics relative to a context node n:1. .//σ/ ancestor - or - self ::

Check query containment for each combination of the following CoreXPath expressions: a/b/c, a/b[c]/∗, a/b[∗]/c, a/∗/c,

In order to eliminate the difference in document length and average number of query term instances between the relevant and non-relevant sets, we normalized all values, except for

!It asserts two immediately testable hypotheses concerning the cross-section relationship between the size and growth of firms: (a) that firms of different size-classes have the

The data in the figure show the correlation coefficients for changes in government organisational structure and three environmental factors -- the complexity of the

We can take from this simple 2-dimensional example that, for large queries, the performance is slightly (30%) improved if the pages are split unbalanced. This is due to the fact