You are on page 1of 67

Semantic Diff as the Basis for

Knowledge Base Versioning

Enrico Franconi1 Thomas Meyer2 Ivan Varzinczak2

1 Free University of Bozen/Bolzano 2 Meraka Institute, CSIR


Bolzano, Italy Pretoria, South Africa

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 1 / 24


Motivation

Knowledge Base
Ontology (DL, RDF)
Agents’ beliefs
Regulations or norms
...

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 2 / 24


Motivation

Knowledge Base
Ontology (DL, RDF)
K1
Agents’ beliefs
Regulations or norms
...

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 2 / 24


Motivation

Knowledge Base
Ontology (DL, RDF)
K1 K2
Agents’ beliefs
Regulations or norms
...

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 2 / 24


Motivation

K3
Knowledge Base
Ontology (DL, RDF)
K1 K2 K5
Agents’ beliefs
Regulations or norms
...
K4

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 2 / 24


Motivation

K3 ...
Knowledge Base
Ontology (DL, RDF)
K1 K2 K5 ...
Agents’ beliefs
Regulations or norms
...
K4 K6

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 2 / 24


Motivation

K3 ...
Knowledge Base
Ontology (DL, RDF)
K1 K2 K5 ...
Agents’ beliefs
Regulations or norms
...
K4 K6

Need for a versioning system

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 2 / 24


Motivation

Issues K6
Maintaining different versions
I Parsimonious representation K5 K1

Reasoning with versions Kc


I In which of the KBs does α hold,
K2
but not β?
K4
Difference between versions
K3
I How they differ in meaning

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 3 / 24


Motivation

Issues K6
Maintaining different versions
I Parsimonious representation K5 K1

Reasoning with versions Kc


I In which of the KBs does α hold,
K2
but not β?
K4
Difference between versions
K3
I How they differ in meaning

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 3 / 24


Motivation

Issues K6
Maintaining different versions
I Parsimonious representation K5 K1

Reasoning with versions Kc


I In which of the KBs does α hold,
K2
but not β?
K4
Difference between versions
K3
I How they differ in meaning

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 3 / 24


Motivation

Issues K6
Maintaining different versions
I Parsimonious representation K5 K1

Reasoning with versions Kc


I In which of the KBs does α hold,
K2
but not β?
K4
Difference between versions
K3
I How they differ in meaning

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 3 / 24


Outline

1 Logical Preliminaries

2 Knowledge Base Versioning


Semantic Diff
A General Framework
Compiled Representation

3 Conclusion
Contributions
Future Work

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 4 / 24


Outline

1 Logical Preliminaries

2 Knowledge Base Versioning


Semantic Diff
A General Framework
Compiled Representation

3 Conclusion
Contributions
Future Work

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 4 / 24


Outline

1 Logical Preliminaries

2 Knowledge Base Versioning


Semantic Diff
A General Framework
Compiled Representation

3 Conclusion
Contributions
Future Work

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 4 / 24


Logical Preliminaries

Knowledge bases
A knowledge base K is a (possibly infinite) set of formulas

Cn(K) = {α | K |= α}
Cn(.) is called Tarskian iff it satisfies
I Inclusion: X ⊆ Cn(X )
I Idempotence: Cn(Cn(X )) ⊆ Cn(X )
I Monotonicity: X ⊆ Y implies Cn(X ) ⊆ Cn(Y )

[α] = {β | α ≡ β}

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 5 / 24


Logical Preliminaries

Knowledge bases
A knowledge base K is a (possibly infinite) set of formulas

Cn(K) = {α | K |= α}
Cn(.) is called Tarskian iff it satisfies
I Inclusion: X ⊆ Cn(X )
I Idempotence: Cn(Cn(X )) ⊆ Cn(X )
I Monotonicity: X ⊆ Y implies Cn(X ) ⊆ Cn(Y )

[α] = {β | α ≡ β}

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 5 / 24


Logical Preliminaries

Knowledge bases
A knowledge base K is a (possibly infinite) set of formulas

Cn(K) = {α | K |= α}
Cn(.) is called Tarskian iff it satisfies
I Inclusion: X ⊆ Cn(X )
I Idempotence: Cn(Cn(X )) ⊆ Cn(X )
I Monotonicity: X ⊆ Y implies Cn(X ) ⊆ Cn(Y )

[α] = {β | α ≡ β}

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 5 / 24


Logical Preliminaries

Knowledge bases
A knowledge base K is a (possibly infinite) set of formulas

Cn(K) = {α | K |= α}
Cn(.) is called Tarskian iff it satisfies
I Inclusion: X ⊆ Cn(X )
I Idempotence: Cn(Cn(X )) ⊆ Cn(X )
I Monotonicity: X ⊆ Y implies Cn(X ) ⊆ Cn(Y )

[α] = {β | α ≡ β}

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 5 / 24


Outline

1 Logical Preliminaries

2 Knowledge Base Versioning


Semantic Diff
A General Framework
Compiled Representation

3 Conclusion
Contributions
Future Work

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 6 / 24


Semantic Diff
Difference in meaning between knowledge bases K and K0
Analogy with the Unix diff command
I diff distinguishes between syntactically different files

Semantic diff highlights the difference in (logical) meaning

Assume a logic with a Tarskian consequence relation

Example
Let the (propositional) knowledge bases:

K1 = {p, q} and K2 = {p, p → q}

K1 and K2 differ in syntax


But K1 and K2 convey the same meaning (K1 ≡ K2 )

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 7 / 24


Semantic Diff
Difference in meaning between knowledge bases K and K0
Analogy with the Unix diff command
I diff distinguishes between syntactically different files

Semantic diff highlights the difference in (logical) meaning

Assume a logic with a Tarskian consequence relation

Example
Let the (propositional) knowledge bases:

K1 = {p, q} and K2 = {p, p → q}

K1 and K2 differ in syntax


But K1 and K2 convey the same meaning (K1 ≡ K2 )

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 7 / 24


Semantic Diff
Difference in meaning between knowledge bases K and K0
Analogy with the Unix diff command
I diff distinguishes between syntactically different files

Semantic diff highlights the difference in (logical) meaning

Assume a logic with a Tarskian consequence relation

Example
Let the (propositional) knowledge bases:

K1 = {p, q} and K2 = {p, p → q}

K1 and K2 differ in syntax


But K1 and K2 convey the same meaning (K1 ≡ K2 )

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 7 / 24


Semantic Diff
Difference in meaning between knowledge bases K and K0
Analogy with the Unix diff command
I diff distinguishes between syntactically different files

Semantic diff highlights the difference in (logical) meaning

Assume a logic with a Tarskian consequence relation

Example
Let the (propositional) knowledge bases:

K1 = {p, q} and K2 = {p, p → q}

K1 and K2 differ in syntax


But K1 and K2 convey the same meaning (K1 ≡ K2 )

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 7 / 24


Characterizing Semantic Diff

KBs closed under logical consequence

(P1) K = Cn(K) and K0 = Cn(K0 )

Semantic diff of K and K0 : pair hA, Ri


A is the add-set of (K, K0 )
R as the remove-set of (K, K0 )

(P2) K0 = (K ∪ A) \ R

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 8 / 24


Characterizing Semantic Diff

KBs closed under logical consequence

(P1) K = Cn(K) and K0 = Cn(K0 )

Semantic diff of K and K0 : pair hA, Ri


A is the add-set of (K, K0 )
R as the remove-set of (K, K0 )

(P2) K0 = (K ∪ A) \ R

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 8 / 24


Characterizing Semantic Diff

KBs closed under logical consequence

(P1) K = Cn(K) and K0 = Cn(K0 )

Semantic diff of K and K0 : pair hA, Ri


A is the add-set of (K, K0 )
R as the remove-set of (K, K0 )

(P2) K0 = (K ∪ A) \ R

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 8 / 24


Characterizing Semantic Diff

Minimal change and no redundancy

(P3) A ⊆ K0

(P4) R ⊆ K

Duality of semantic diff

(P5) K = (K0 ∪ R) \ A

‘Undo’ operation when moving between versions

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 9 / 24


Characterizing Semantic Diff

Minimal change and no redundancy

(P3) A ⊆ K0

(P4) R ⊆ K

Duality of semantic diff

(P5) K = (K0 ∪ R) \ A

‘Undo’ operation when moving between versions

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 9 / 24


Characterizing Semantic Diff

Minimal change and no redundancy

(P3) A ⊆ K0

(P4) R ⊆ K

Duality of semantic diff

(P5) K = (K0 ∪ R) \ A

‘Undo’ operation when moving between versions

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 9 / 24


Characterizing Semantic Diff

Definition
K and K0 knowledge bases, A and R sets of sentences
hA, Ri is semantic diff compliant w.r.t. (K, K0 ) iff (K, K0 ) and hA, Ri
satisfy Postulates (P1)–(P5)

(P1) K = Cn(K) and K0 = Cn(K0 )


(P2) K0 = (K ∪ A) \ R
(P3) A ⊆ K0
(P4) R ⊆ K
(P5) K = (K0 ∪ R) \ A

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 10 / 24


Characterizing Semantic Diff

Definition
K and K0 knowledge bases, A and R sets of sentences
hA, Ri is semantic diff compliant w.r.t. (K, K0 ) iff (K, K0 ) and hA, Ri
satisfy Postulates (P1)–(P5)

(P1) K = Cn(K) and K0 = Cn(K0 )


(P2) K0 = (K ∪ A) \ R
(P3) A ⊆ K0
(P4) R ⊆ K
(P5) K = (K0 ∪ R) \ A

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 10 / 24


Characterizing Semantic Diff
Specific construction for the semantic diff operator:
Definition
The ideal semantic diff of (K, K0 ) is the pair hA, Ri, where
A = K0 \ K and R = K \ K0

Neither A nor R are logically closed:


Example
Let K = Cn(p ∧ q) and K0 = Cn(¬q)

A = {[¬q], [¬p ∨ ¬q]}

R = {[p ∧ q], [p], [q], [p ↔ q], [p ∨ q], [¬p ∨ q]}

p ∨ ¬q ∈ Cn(A), p ∨ ¬q ∈ Cn(R), but p ∨ ¬q ∈


/ A and p ∨ ¬q ∈
/R

In fact, for any ideal semantic diff hA, Ri, > ∈


/ A and > ∈
/R
Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 11 / 24
Characterizing Semantic Diff
Specific construction for the semantic diff operator:
Definition
The ideal semantic diff of (K, K0 ) is the pair hA, Ri, where
A = K0 \ K and R = K \ K0

Neither A nor R are logically closed:


Example
Let K = Cn(p ∧ q) and K0 = Cn(¬q)

A = {[¬q], [¬p ∨ ¬q]}

R = {[p ∧ q], [p], [q], [p ↔ q], [p ∨ q], [¬p ∨ q]}

p ∨ ¬q ∈ Cn(A), p ∨ ¬q ∈ Cn(R), but p ∨ ¬q ∈


/ A and p ∨ ¬q ∈
/R

In fact, for any ideal semantic diff hA, Ri, > ∈


/ A and > ∈
/R
Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 11 / 24
Characterizing Semantic Diff
Specific construction for the semantic diff operator:
Definition
The ideal semantic diff of (K, K0 ) is the pair hA, Ri, where
A = K0 \ K and R = K \ K0

Neither A nor R are logically closed:


Example
Let K = Cn(p ∧ q) and K0 = Cn(¬q)

A = {[¬q], [¬p ∨ ¬q]}

R = {[p ∧ q], [p], [q], [p ↔ q], [p ∨ q], [¬p ∨ q]}

p ∨ ¬q ∈ Cn(A), p ∨ ¬q ∈ Cn(R), but p ∨ ¬q ∈


/ A and p ∨ ¬q ∈
/R

In fact, for any ideal semantic diff hA, Ri, > ∈


/ A and > ∈
/R
Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 11 / 24
Characterizing Semantic Diff
Specific construction for the semantic diff operator:
Definition
The ideal semantic diff of (K, K0 ) is the pair hA, Ri, where
A = K0 \ K and R = K \ K0

Neither A nor R are logically closed:


Example
Let K = Cn(p ∧ q) and K0 = Cn(¬q)

A = {[¬q], [¬p ∨ ¬q]}

R = {[p ∧ q], [p], [q], [p ↔ q], [p ∨ q], [¬p ∨ q]}

p ∨ ¬q ∈ Cn(A), p ∨ ¬q ∈ Cn(R), but p ∨ ¬q ∈


/ A and p ∨ ¬q ∈
/R

In fact, for any ideal semantic diff hA, Ri, > ∈


/ A and > ∈
/R
Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 11 / 24
Characterizing Semantic Diff
Specific construction for the semantic diff operator:
Definition
The ideal semantic diff of (K, K0 ) is the pair hA, Ri, where
A = K0 \ K and R = K \ K0

Neither A nor R are logically closed:


Example
Let K = Cn(p ∧ q) and K0 = Cn(¬q)

A = {[¬q], [¬p ∨ ¬q]}

R = {[p ∧ q], [p], [q], [p ↔ q], [p ∨ q], [¬p ∨ q]}

p ∨ ¬q ∈ Cn(A), p ∨ ¬q ∈ Cn(R), but p ∨ ¬q ∈


/ A and p ∨ ¬q ∈
/R

In fact, for any ideal semantic diff hA, Ri, > ∈


/ A and > ∈
/R
Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 11 / 24
Characterizing Semantic Diff
There is a unique ideal semantic diff associated with any two KBs
Theorem
Let hA, Ri be the ideal semantic diff of K and K0 . Then
hA, Ri is semantic diff compliant with respect to (K, K0 )
hA, Ri is unique w.r.t. (K, K0 )

Corollary
For the ideal semantic diff hA, Ri of (K, K0 ), A ∩ R = ∅

Ideal semantic diff and symmetric difference: (K0 \ K) ∪ (K \ K0 )

Corollary
For the ideal semantic diff hA, Ri of (K, K0 ), hA, Ri = h∅, ∅i iff K = K0

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 12 / 24


Characterizing Semantic Diff
There is a unique ideal semantic diff associated with any two KBs
Theorem
Let hA, Ri be the ideal semantic diff of K and K0 . Then
hA, Ri is semantic diff compliant with respect to (K, K0 )
hA, Ri is unique w.r.t. (K, K0 )

Corollary
For the ideal semantic diff hA, Ri of (K, K0 ), A ∩ R = ∅

Ideal semantic diff and symmetric difference: (K0 \ K) ∪ (K \ K0 )

Corollary
For the ideal semantic diff hA, Ri of (K, K0 ), hA, Ri = h∅, ∅i iff K = K0

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 12 / 24


Characterizing Semantic Diff
There is a unique ideal semantic diff associated with any two KBs
Theorem
Let hA, Ri be the ideal semantic diff of K and K0 . Then
hA, Ri is semantic diff compliant with respect to (K, K0 )
hA, Ri is unique w.r.t. (K, K0 )

Corollary
For the ideal semantic diff hA, Ri of (K, K0 ), A ∩ R = ∅

Ideal semantic diff and symmetric difference: (K0 \ K) ∪ (K \ K0 )

Corollary
For the ideal semantic diff hA, Ri of (K, K0 ), hA, Ri = h∅, ∅i iff K = K0

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 12 / 24


Characterizing Semantic Diff
There is a unique ideal semantic diff associated with any two KBs
Theorem
Let hA, Ri be the ideal semantic diff of K and K0 . Then
hA, Ri is semantic diff compliant with respect to (K, K0 )
hA, Ri is unique w.r.t. (K, K0 )

Corollary
For the ideal semantic diff hA, Ri of (K, K0 ), A ∩ R = ∅

Ideal semantic diff and symmetric difference: (K0 \ K) ∪ (K \ K0 )

Corollary
For the ideal semantic diff hA, Ri of (K, K0 ), hA, Ri = h∅, ∅i iff K = K0

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 12 / 24


Outline

1 Logical Preliminaries

2 Knowledge Base Versioning


Semantic Diff
A General Framework
Compiled Representation

3 Conclusion
Contributions
Future Work

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 13 / 24


A Framework for Knowledge Base Versioning
Scenario:
n versions, K1 , . . . , Kn , of a KB that need to be stored
A core knowledge base Kc

For 1 ≤ i, j ≤ n:
Ideal semantic diff of (Ki , Kj ): hDij , Dji i
Ideal semantic diff of (Kc , Ki ): hDci , Dic i

From Properties
(P2) K0 = (K ∪ A) \ R
(P5) K = (K0 ∪ R) \ A

The add-set Dij of (Ki , Kj ) is also the remove-set of (Kj , Ki )


The remove-set Dji of (Ki , Kj ) is also the add-set of (Kj , Ki )

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 14 / 24


A Framework for Knowledge Base Versioning
Scenario:
n versions, K1 , . . . , Kn , of a KB that need to be stored
A core knowledge base Kc

For 1 ≤ i, j ≤ n:
Ideal semantic diff of (Ki , Kj ): hDij , Dji i
Ideal semantic diff of (Kc , Ki ): hDci , Dic i

From Properties
(P2) K0 = (K ∪ A) \ R
(P5) K = (K0 ∪ R) \ A

The add-set Dij of (Ki , Kj ) is also the remove-set of (Kj , Ki )


The remove-set Dji of (Ki , Kj ) is also the add-set of (Kj , Ki )

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 14 / 24


A Framework for Knowledge Base Versioning
Scenario:
n versions, K1 , . . . , Kn , of a KB that need to be stored
A core knowledge base Kc

For 1 ≤ i, j ≤ n:
Ideal semantic diff of (Ki , Kj ): hDij , Dji i
Ideal semantic diff of (Kc , Ki ): hDci , Dic i

From Properties
(P2) K0 = (K ∪ A) \ R
(P5) K = (K0 ∪ R) \ A

The add-set Dij of (Ki , Kj ) is also the remove-set of (Kj , Ki )


The remove-set Dji of (Ki , Kj ) is also the add-set of (Kj , Ki )

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 14 / 24


A Framework for Knowledge Base Versioning
In order to access any version, it is sufficient:
To store Kc , and
To store Dic and Dci for all Ki s.t. 1 ≤ i ≤ n

By Theorem 1, Ki = (Kc ∪ Dci ) \ Dic for every i s.t. 1 ≤ i ≤ n

hDc6 , D6c i

hDc5 , D5c i • • hDc1 , D1c i

Kc
• hDc2 , D2c i
hDc4 , D4c i •
• hDc3 , D3c i

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 15 / 24


A Framework for Knowledge Base Versioning
In order to access any version, it is sufficient:
To store Kc , and
To store Dic and Dci for all Ki s.t. 1 ≤ i ≤ n

By Theorem 1, Ki = (Kc ∪ Dci ) \ Dic for every i s.t. 1 ≤ i ≤ n

hDc6 , D6c i

hDc5 , D5c i • • hDc1 , D1c i

Kc
• hDc2 , D2c i
hDc4 , D4c i •
• hDc3 , D3c i

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 15 / 24


A Framework for Knowledge Base Versioning
In order to access any version, it is sufficient:
To store Kc , and
To store Dic and Dci for all Ki s.t. 1 ≤ i ≤ n

By Theorem 1, Ki = (Kc ∪ Dci ) \ Dic for every i s.t. 1 ≤ i ≤ n

hDc6 , D6c i

hDc5 , D5c i • • hDc1 , D1c i

Kc
• hDc2 , D2c i
hDc4 , D4c i •
• hDc3 , D3c i

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 15 / 24


A Framework for Knowledge Base Versioning
We can generate the ideal semantic diff of Ki and Kj

Proposition
Dij = (Dcj \ Dci ) ∪ (Dic \ Djc ) and Dji = (Dci \ Dcj ) ∪ (Djc \ Dic )

K1

hDn1 , D1n i hD1i , Di1 i

hDc1 , D1c i

Kn Kc hDci , Dic i Ki
hDcn , Dnc i

hDcj , Djc i

hDnj , Djn i hDij , Dji i


Kj

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 16 / 24


A Framework for Knowledge Base Versioning
We can generate the ideal semantic diff of Ki and Kj

Proposition
Dij = (Dcj \ Dci ) ∪ (Dic \ Djc ) and Dji = (Dci \ Dcj ) ∪ (Djc \ Dic )

K1

hDn1 , D1n i hD1i , Di1 i

hDc1 , D1c i

Kn Kc hDci , Dic i Ki
hDcn , Dnc i

hDcj , Djc i

hDnj , Djn i hDij , Dji i


Kj

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 16 / 24


Outline

1 Logical Preliminaries

2 Knowledge Base Versioning


Semantic Diff
A General Framework
Compiled Representation

3 Conclusion
Contributions
Future Work

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 17 / 24


Compiled Representation

Our characterization of Semantic Diff is in the knowledge level

Need for a compiled representation of KBs and the diffs


Computationally, a compiled format is required: F (K)

Given any representation of Ki and Kj , look for an intermediate


representation of the ideal semantic diff hI (Dij ), I (Dji )i

From Ki together with this intermediate representation of the ideal


semantic diff, generate Kj
From this intermediate representation generate the ideal semantic diff
hDij , Dji i

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 18 / 24


Compiled Representation

Our characterization of Semantic Diff is in the knowledge level

Need for a compiled representation of KBs and the diffs


Computationally, a compiled format is required: F (K)

Given any representation of Ki and Kj , look for an intermediate


representation of the ideal semantic diff hI (Dij ), I (Dji )i

From Ki together with this intermediate representation of the ideal


semantic diff, generate Kj
From this intermediate representation generate the ideal semantic diff
hDij , Dji i

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 18 / 24


Compiled Representation

Our characterization of Semantic Diff is in the knowledge level

Need for a compiled representation of KBs and the diffs


Computationally, a compiled format is required: F (K)

Given any representation of Ki and Kj , look for an intermediate


representation of the ideal semantic diff hI (Dij ), I (Dji )i

From Ki together with this intermediate representation of the ideal


semantic diff, generate Kj
From this intermediate representation generate the ideal semantic diff
hDij , Dji i

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 18 / 24


Compiled Representation

Our characterization of Semantic Diff is in the knowledge level

Need for a compiled representation of KBs and the diffs


Computationally, a compiled format is required: F (K)

Given any representation of Ki and Kj , look for an intermediate


representation of the ideal semantic diff hI (Dij ), I (Dji )i such that:

From Ki together with this intermediate representation of the ideal


semantic diff, generate Kj
From this intermediate representation generate the ideal semantic diff
hDij , Dji i

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 18 / 24


Compiled Representation

Our characterization of Semantic Diff is in the knowledge level

Need for a compiled representation of KBs and the diffs


Computationally, a compiled format is required: F (K)

Given any representation of Ki and Kj , look for an intermediate


representation of the ideal semantic diff hI (Dij ), I (Dji )i such that:

From Ki together with this intermediate representation of the ideal


semantic diff, generate Kj
From this intermediate representation generate the ideal semantic diff
hDij , Dji i

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 18 / 24


Compiled Representation

With the intermediate representation


We can also generate one KB from another

Theorem
F (Ki ) = (F (Kj ) \ I (Dji )) ∪ I (Dij )
= (F (Kj ) ∪ I (Dij )) \ I (Dji )

We can generate the ideal diff (details in the NMR’10 paper)

We can get I (Dij ) and I (Dji )

Theorem
For 1 ≤ i, j ≤ n, I (Dij ) = (I (Dcj ) \ I (Dci )) ∪ (I (Dic ) \ I (Djc ))

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 19 / 24


Compiled Representation

With the intermediate representation


We can also generate one KB from another

Theorem
F (Ki ) = (F (Kj ) \ I (Dji )) ∪ I (Dij )
= (F (Kj ) ∪ I (Dij )) \ I (Dji )

We can generate the ideal diff (details in the NMR’10 paper)

We can get I (Dij ) and I (Dji )

Theorem
For 1 ≤ i, j ≤ n, I (Dij ) = (I (Dcj ) \ I (Dci )) ∪ (I (Dic ) \ I (Djc ))

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 19 / 24


Compiled Representation

With the intermediate representation


We can also generate one KB from another

Theorem
F (Ki ) = (F (Kj ) \ I (Dji )) ∪ I (Dij )
= (F (Kj ) ∪ I (Dij )) \ I (Dji )

We can generate the ideal diff (details in the NMR’10 paper)

We can get I (Dij ) and I (Dji )

Theorem
For 1 ≤ i, j ≤ n, I (Dij ) = (I (Dcj ) \ I (Dci )) ∪ (I (Dic ) \ I (Djc ))

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 19 / 24


Outline

1 Logical Preliminaries

2 Knowledge Base Versioning


Semantic Diff
A General Framework
Compiled Representation

3 Conclusion
Contributions
Future Work

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 20 / 24


Contributions

Groundwork for a semantic-driven notion of versioning


I Intuitive, simple and general

Notion of semantic diff applicable to a large class of KR languages


I Our results hold for any KB in a Tarskian logic

Parsimonious representation
I Core KB: sufficient to reconstruct any of the versions
I Diff between KBs: no direct access to any of the versions
I This holds for any syntactic representation (see the NMR’10 paper)

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 21 / 24


Contributions

Groundwork for a semantic-driven notion of versioning


I Intuitive, simple and general

Notion of semantic diff applicable to a large class of KR languages


I Our results hold for any KB in a Tarskian logic

Parsimonious representation
I Core KB: sufficient to reconstruct any of the versions
I Diff between KBs: no direct access to any of the versions
I This holds for any syntactic representation (see the NMR’10 paper)

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 21 / 24


Contributions

Groundwork for a semantic-driven notion of versioning


I Intuitive, simple and general

Notion of semantic diff applicable to a large class of KR languages


I Our results hold for any KB in a Tarskian logic

Parsimonious representation
I Core KB: sufficient to reconstruct any of the versions
I Diff between KBs: no direct access to any of the versions
I This holds for any syntactic representation (see the NMR’10 paper)

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 21 / 24


Contributions

Groundwork for a semantic-driven notion of versioning


I Intuitive, simple and general

Notion of semantic diff applicable to a large class of KR languages


I Our results hold for any KB in a Tarskian logic

Parsimonious representation
I Core KB: sufficient to reconstruct any of the versions
I Diff between KBs: no direct access to any of the versions
I This holds for any syntactic representation (see the NMR’10 paper)

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 21 / 24


Contributions

Groundwork for a semantic-driven notion of versioning


I Intuitive, simple and general

Notion of semantic diff applicable to a large class of KR languages


I Our results hold for any KB in a Tarskian logic

Parsimonious representation
I Core KB: sufficient to reconstruct any of the versions
I Diff between KBs: no direct access to any of the versions
I This holds for any syntactic representation (see the NMR’10 paper)

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 21 / 24


Outline

1 Logical Preliminaries

2 Knowledge Base Versioning


Semantic Diff
A General Framework
Compiled Representation

3 Conclusion
Contributions
Future Work

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 22 / 24


Ongoing and Future Work

How to choose the core knowledge base Kc

Which normal forms are more appropriate

Experiments with realistic data for evaluation of the approach

Ontology versioning in Description Logics

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 23 / 24


Thank you!

Franconi, Meyer, Varzinczak (FUB/Meraka) Semantic Diff for KB Versioning 24 / 24

You might also like