Handling time in RDF - uchile.cl

26
Handling time in RDF Claudio Gutierrez (Joint work with C. Hurtado and A. Vaisman) Department of Computer Science Universidad de Chile UPM, Madrid, January 2009 Time in RDF – p. 1/15

Transcript of Handling time in RDF - uchile.cl

Handling time in RDF

Claudio Gutierrez

(Joint work with C. Hurtado and A. Vaisman)

Department of Computer Science

Universidad de Chile

UPM, Madrid, January 2009

Time in RDF – p. 1/15

Outline• Introducing time into RDF

• Temporal RDF Graphs

• Semantics of Temporal RDF Graphs

• Syntax for Temporal Graphs

• Querying Time in RDF

Time in RDF – p. 2/15

Introducing time into RDF�� ��

�� ��Student

�� ��

�� ��Grad

subC99ssssssssss

�� ��

�� ��UnderGrad

subCggNNNNNNNNNNN

�� ��

�� ��M.Sc

subC

OO

�� ��

�� ��John

type

DD

Time in RDF – p. 3/15

Introducing time into RDF�� ��

�� ��Student

�� ��

�� ��Grad

subC99ssssssssss

�� ��

�� ��UnderGrad

subCggNNNNNNNNNNN

�� ��

�� ��Ph.D

subC::uuuuuuuuu

�� ��

�� ��M.Sc

subC

OO

�� ��

�� ��John

typeeeKKKKKKKKKK

Time in RDF – p. 3/15

Introducing time into RDF�� ��

�� ��Student

�� ��

�� ��Grad

subC99ssssssssss

�� ��

�� ��UnderGrad

subCggNNNNNNNNNNN

�� ��

�� ��Ph.D

subC::uuuuuuuuu

�� ��

�� ��M.Sc

subC

OO

�� ��

�� ��John

type

cc

Time in RDF – p. 3/15

Temporal Graph

�� ��

�� ��Student

�� ��

�� ��Grad

[0,Now]99ssssssssss

�� ��

�� ��UnderGrad

[0,Now]ggNNNNNNNNNNN

�� ��

�� ��Ph.D

[3,Now]::uuuuuuuuu

�� ��

�� ��M.Sc

[0,Now]

OO

�� ��

�� ��John

[0,3]

DD

[3,4]eeKKKKKKKKKK

[4,Now]

cc

Time in RDF – p. 4/15

General Issues• Versioning versus Labeling

– Label elements subject to change– Maintain a snapshot of each state of the graph

Time in RDF – p. 5/15

General Issues• Versioning versus Labeling

– Label elements subject to change– Maintain a snapshot of each state of the graph

• Time Points versus Time Intervals.

[4, 31] = [4] ∪ [5] ∪ · · · ∪ [30] ∪ [31]

Time in RDF – p. 5/15

General Issues• Versioning versus Labeling

– Label elements subject to change– Maintain a snapshot of each state of the graph

• Time Points versus Time Intervals.

[4, 31] = [4] ∪ [5] ∪ · · · ∪ [30] ∪ [31]

• Temporal Query Language

– Point based (variables refer to point times)– Interval based (variables refer to intervals)

Time in RDF – p. 5/15

RDF Intrinsic Issues• Notion of temporal Entailment |=τ

�� ��

�� ��Ph.D[2,7]

sc//

sc

[5,7]

<<�� ��

�� ��Grad[5,9]

sc//�� ��

�� ��Stud

Time in RDF – p. 6/15

RDF Intrinsic Issues• Notion of temporal Entailment |=τ

�� ��

�� ��Ph.D[2,7]

sc//

sc

[5,7]

<<�� ��

�� ��Grad[5,9]

sc//�� ��

�� ��Stud

• Treatment of temporal Blank Nodes:

�� ��

�� ��Student

�� ��

�� ��John

[2,3]99tttttttttt

�� ��

�� ��Mary

[3,5]

OO

?

|=τ�� ��

�� ��Student

�� ��

�� ��X

[2,5]

OO

Time in RDF – p. 6/15

RDF Intrinsic Issues• Notion of temporal Entailment |=τ

�� ��

�� ��Ph.D[2,7]

sc//

sc

[5,7]

<<�� ��

�� ��Grad[5,9]

sc//�� ��

�� ��Stud

• Treatment of temporal Blank Nodes:

�� ��

�� ��Student

�� ��

�� ��John

[2,3]99tttttttttt

�� ��

�� ��Mary

[3,5]

OO

?

|=τ�� ��

�� ��Student

�� ��

�� ��X

[2,5]

OO

• Vocabulary for temporal labeling

Time in RDF – p. 6/15

DefinitionsTemporal Triple: an RDF triple with a temporal label,e.g. (a, b, c)[t]

Temporal Graph: set of temporal triples

Snapshot of graph G at time t:

G(t) = {(a, b, c) : (a, b, c)[t] ∈ G}

Notion of temporal entailment G1 |=τ G2

Time in RDF – p. 7/15

SemanticsGround Case:

G1 |=τ G2 if for each t, G1(t) |= G2(t)

Time in RDF – p. 8/15

SemanticsGround Case:

G1 |=τ G2 if for each t, G1(t) |= G2(t)

Non Ground Case:G1 |=τ G2 if there are ground instances µ1(G1) andµ2(G2) such that for each t:

µ1(G1)(t) |=τ µ2(G2)(t)

Time in RDF – p. 8/15

SemanticsGround Case:

G1 |=τ G2 if for each t, G1(t) |= G2(t)

Non Ground Case:G1 |=τ G2 if there are ground instances µ1(G1) andµ2(G2) such that for each t:

µ1(G1)(t) |=τ µ2(G2)(t)

Proposition. For ground graphs, G1 |=τ G2 impliesG1(t) |= G2(t) for all times t.

Time in RDF – p. 8/15

Semantics (cont.)

The temporal closure tcl(G) is a maximal set of temporaltriples G′ such that:

– G′ contains G

– G is equivalent to G′

Proposition.G1 |=τ G2 iff tcl(G1) |=τ G2

Proposition. Deciding if G′ is the closure of G isDP-complete.

Time in RDF – p. 9/15

Syntax for (a, b, c)[4, 5]• Point version

�� ��

�� ��a

��

�� ��

�� ��Y1Instant //�� ��

�� ��4

�� ��

�� ��c�� ��

�� ��X

tsubj

ffMMMMMMMMMMMMM

tpredoo

tobjxxppppppppppppp

temporal88ppppppppppppp

temporal//�� ��

�� ��Y2Instant //�� ��

�� ��5

�� ��

�� ��c

Time in RDF – p. 10/15

Syntax for (a, b, c)[4, 5]• Point version

�� ��

�� ��a

��

�� ��

�� ��Y1Instant //�� ��

�� ��4

�� ��

�� ��c�� ��

�� ��X

tsubj

ffMMMMMMMMMMMMM

tpredoo

tobjxxppppppppppppp

temporal88ppppppppppppp

temporal//�� ��

�� ��Y2Instant //�� ��

�� ��5

�� ��

�� ��c

• Interval version

�� ��

�� ��a

��

�� ��

�� ��4

�� ��

�� ��c�� ��

�� ��X

tsubj

ffMMMMMMMMMMMMM

tpredoo

tobjxxqqqqqqqqqqqqq

temporal //�� ��

�� ��YInterval //�� ��

�� ��Z

initial@@�������

final ��>>>

>>>>

�� ��

�� ��c�� ��

�� ��5Time in RDF – p. 10/15

Syntax (cont.): rulesRule 1-2: Equivalence betwen point and interval versions

Rule 3: Normalization of point-version:

�� ��

�� ��a

��

�� ��

�� ��YInstant

//�� ���� ��4

�� ��

�� ��c�� ��

�� ��X

tsubj

ffMMMMMMMMMMMMM

tpredoo

tobjxxppppppppppppp

temporal

88qqqqqqqqqqqqq

temporal//�� ��

�� ��ZInstant

//�� ���� ��5

�� ��

�� ��c

Time in RDF – p. 11/15

Syntax (cont.): rulesRule 1-2: Equivalence betwen point and interval versions

Rule 3: Normalization of point-version:

�� ��

�� ��a

��

�� ��

�� ��4

�� ��

�� ��c�� ��

�� ��X

tsubj

ffMMMMMMMMMMMMM

tpredoo

tobjxxppppppppppppp temporal

//�� ��

�� ��VInstant //

Instant

88qqqqqqqqqqqqq �� ��

�� ��5

�� ��

�� ��c

Time in RDF – p. 11/15

Syntax works well

(a, b, c)[m,n]

.

( )∗

���� ��

�� ��a

��

.

( )∗

OO

�� ��

�� ��m

�� ��

�� ��c�� ��

�� ��X

ffMMMMMMMMMMMMMoo

xxqqqqqqqqqqqqq

temp //�� ��

�� ��YInt //�� ��

�� ��Z

init>>~~~~~~~~

fin @@@

@@@@

@

�� ��

�� ��c �� ��

�� ��n

Time in RDF – p. 12/15

Syntax works well (cont.)Theorem.

1. G1 |=τ G2 implies (G1)∗ |= (G2)

2. G2 |= G2 implies (G1)∗ |=τ (G2)∗

3. (G∗)∗ = G and G |= (G∗)∗

Theorem. Let ⊢ be the deductive system formed by RDFSrules plus Temporal rules. Then:G1 |=τ G2 iff (G1)

∗ ⊢ (G2)∗

Time in RDF – p. 13/15

Querying Temporal RDFProposal: Conjunctive fragment with– interval and point variables– aggregate functions– constructor of graphs for answers

Time in RDF – p. 14/15

Querying Temporal RDFProposal: Conjunctive fragment with– interval and point variables– aggregate functions– constructor of graphs for answers

• Students who have taken a Master course between year2000

• Students taking Ph.D courses together and the timewhen this occurred

• Time intervals when the IT Master program was offered

• Students applying for jobs at time t after finishing theirPh.D program in no more than 4 years

Time in RDF – p. 14/15

What we have:1. Semantics for Temporal RDF graphs

2. Syntax to incorporate the framework into standard RDF

3. Sound and complete inference rules for temporal graphs

4. Complexity bounds showing temporal RDF preservescomplexity of RDF

5. Sketch of Temporal RDF query language

Time in RDF – p. 15/15