














































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















































Docsity.com
Docsity.com
IntuitionTransitive closure of a graph:^ T(x,y) :- G(x,y)T(x,y) :- G(x,z), T(z,y)
G____ 1 | 22 | 33 | 2
T____| | |
1 2 3
Docsity.com
IntuitionTransitive closure of a graph:^ T(x,y) :- G(
T(x,y) :- G(x,z), T(z,y)
G____ 1 | 22 | 33 | 2
T____| | |
(^1) (1) Map from instancesover the relations in the rule body 2 3
Docsity.com
IntuitionTransitive closure of a graph:^ T(^1 ,^2 ) :- G(
T(x,y) :- G(x,z), T(z,y)
G____ 1 | 22 | 33 | 2
T____1 | 2| |^ (2) ... map to instancesover the relations in the rule head
1 2 3
Docsity.com
IntuitionTransitive closure of a graph:^ T(x,y) :- G(
x,y) T(x,y) :- G(x,z), T(z,y)
G____ 1 | 22 | 33 | 2
T____1 | 22 | 3|
1 2 3
Docsity.com
IntuitionTransitive closure of a graph:^ T(x,y) :- G(x,y)T(x,y) :- G(
1 | 22 | 33 | 2
T____1 | 22 | 33 | 2
(^1) (1) Map from instancesover the relations in the rule body 2 3
Docsity.com
IntuitionTransitive closure of a graph:^ T(x,y) :- G(x,y)T(^1 ,^3 ) :- G(
1 | 22 | 33 | 2
T____1 | 22 | 33 | 2^ (2) ... map to instancesover the relations in the rule head
1 2 3
Docsity.com
IntuitionTransitive closure of a graph:^ T(x,y) :- G(x,y)T(x,y) :- G(x,z), T(z,y)
G____ 1 | 22 | 33 | 2
T____1 | 22 | 33 | 21 | 32 | 23 | 3
... repeat until fixpoint is reached(datalog without negation is monotone)
1 2 3
Docsity.com
Outline ¢ Datalog rules ¢ 3 equivalent semantics l Model theoretic l Fixpoint l Proof theoretic ¢ Datalog evaluation l Naive l Semi-naive l Magic!
Docsity.com
Safe Datalog ¢ Here: Datalog without negation. ¢ Again, notion of
Docsity.com
Semantics of Datalog3 equivalent approaches: l Model theoretic l Fixpoint theoretic l Proof theoretic
Docsity.com
Model Theoretic Approach ∀ x,y(^ T(x,y)
←^ G(x,y) ) ∀^ x,y,z( T(x,y)
←^ ( G(x,z)
∧^ T(z,y) ) )
Possible solutions:
G:^1
1 2 3
1 2 3
1 2 3 Docsity.com
Model Theoretic Approach ∀ x,y(^ T(x,y)
←^ G(x,y) ) ∀^ x,y,z( T(x,y)
←^ ( G(x,z)
∧^ T(z,y) ) )
Possible solutions:
G: Chose the^ minimum model (^1 23) T consists of the smallest set of facts that make the sentences true.
1 2 3
(^1 1 ) (^23) Docsity.com