1
COMP6037 Semi-structured Data and the Web Uniqueness in Trees, Repercussion on interesting problems, and Graphs 5.2
Uli Sattler
University of Manchester
Clarification: a grammar, its language, and their types
- We know
- when a grammar is local:
i.e., if none of their non-terminal symbols compete…
- given a grammar G, what the language (set of trees) L(G) of G is:
L(G) := { t | t is a tree accepted by G}
- what it means for a language (set of trees) L to be local:
i.e., if we can find a local grammar G such that L = L(G)
- hence to find out whether L is local
(and perhaps L is given through a grammar G, i.e., L = L(G)) you need to determine whether we can find/construct a local grammar F such that L = L(F)
- ...the above works analgously if “local” is replaced with “single-type”
2
finite
Clarification: a grammar, its language, and their types
- Remember: we saw
- G is not single-type
- G’ is single-type:
Author and BA still compete, but don’t occur together in a rule!
- L(G’) = L(G)
- hence L(G) is
single-type!
3
G = (N, ,S, P) with N = {Book, Author, Editor, Affilia, Paper, F, L} = {B, P, Name, F, L, A} S = {Book, Paper} P = { Book B Editor|Author, Paper P Author, Editor Name F,L, Author Name L,Affilia, F F , L L , Affilia A } G’ = (N’, ’,S’, P’) with N’ = {Book, Author, Editor, Affilia, Paper, F, L} ’ = {B, P, Name, F, L, A} S’ = {Book, Paper} P’ = { Book B BA, Paper P Author, BA Name (F,L)|(L,Affilia), Author Name L,Affilia, F F , L L , Affilia A }
Things done so far
- [structures] semi-structured data, XML, datamodels, trees
- [description mechanisms] schema languages
– of different styles, strengths, purposes – validation, validate-as, PSVIs – a useful abstraction: tree grammars
- [‘difficult’ extensibility mechanism] namespaces, schemas
- [interaction mechanisms] query languages, parsers,
– possibly schema aware – namespace aware
- error handling
- [modelling] attributes vs elements, deep vs flat, ...
- ...today:
– we go back to [structures]: beyond trees, and – other ‘tasks’ around schemas – more modelling, human factors – exam preview
4