30.08.2014 Views

url - Universität zu Lübeck

url - Universität zu Lübeck

url - Universität zu Lübeck

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

132 CHAPTER 7. THE XML INDEX UPDATE PROBLEM<br />

3. ∀x ∈ nodes(p) : x.descendant = y , A has |Σ(p) ∪ α| transitions (q y ; s) → q y for<br />

all s ∈ Σ(p) ∪ α. These transitions build loops on q y<br />

4. A has one transition (q 0 , e.label) → q e with q 0 the bottommost state that has<br />

no incoming transition.<br />

These transitions lead to a nondeterministic finite automaton. The terminal state<br />

is q p.root . The initial state is q 0 .<br />

<br />

Example 23 The linear path expression p = /a/ ∗ //c//d leads to an automaton<br />

A with Q = {q a ,q ∗ ,q c ,q d ,q 0 } and σ = {t 0 ... t 14 }. The alphabet is Σ(p) = {a, c, d}<br />

The following transitions are built:<br />

t 0 = (q 0 ; ”d”) → q d ,<br />

t 1 = (q d ; ”a”) → q d ,<br />

t 2 = (q d ; ”c”) → q d ,<br />

t 3 = (q d ; ”d”) → q d ,<br />

t 4 = (q d ; ”α”) → q d ,<br />

t 5 = (q d ; ”c”) → q c ,<br />

t 6 = (q c ; ”a”) → q c ,<br />

t 7 = (q c ; ”c”) → q c ,<br />

t 8 = (q c ; ”d”) → q c ,<br />

t 9 = (q c ; ”α”) → q c ,<br />

t 10 = (q c ; ”a”) → q ∗ ,<br />

t 11 = (q c ; ”c”) → q ∗ ,<br />

t 12 = (q c ; ”d”) → q ∗ ,<br />

t 13 = (q c ; ”α”) → q ∗ ,<br />

t 14 = (q ∗ ; ”a”) → q a ,<br />

t 15 = (q 0 ; ”a”) → q 0 ,<br />

t 16 = (q 0 ; ”c”) → q 0 ,<br />

t 17 = (q 0 ; ”d”) → q 0 ,<br />

t 18 = (q 0 ; ”α”) → q 0 . <br />

Figure 7.2: Automaton accepting Mod(p) with p = /a/ ∗ //c//d<br />

For an XML data t A processes all strings of the set rename(path leaf (t)) bottom-up,<br />

i.e. from a leaf node to the root. A visual representation of A is on the right side<br />

of figure 7.2. The initial state is q 0 ; q a is the one final state. Please note that the<br />

transitions are not deterministic (e.g. t 2 , t 5 ). Analogously to tree-automata the<br />

finite automaton processes the XML data bottom-up. Basically, it is possible to<br />

build an equivalent automaton that processes the input top-down.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!