foundations of knowledge representation and

FOUNDATIONS OF
KNOWLEDGE REPRESENTATION
AND REASONING
João Pavão Martins
Departamento de Engenharia Informática
Instituto Superior Técnico
Universidade Técnica de Lisboa
ii
c
Copyright !1996,
1997, 1998, 1999, 2001, 2004, 2005, 2006 João Pavão Martins
All Rights Reserved
No part of this book may be reproduced in any form or by any means, electronic or mechanical,
including photocopy, recording, or any information storage or retrieval system without permission
in advance, in writing, from the author:
João Pavão Martins
Grupo de Inteligência Artificial
Departamento de Engenharia Informática
Instituto Superior Técnico
Av. Rovisco Pais
1096 Lisboa CODEX
Portugal
[email protected]
Contents
Glossary of notations
vii
Preface
xi
1 What is Knowledge Representation?
1.1 World, models, and representations . . . . .
1.2 Cognitive agents . . . . . . . . . . . . . . .
1.3 What is knowledge? . . . . . . . . . . . . .
1.4 Underlying hypotheses . . . . . . . . . . . .
1.4.1 Physical symbol system hypothesis .
1.4.2 Knowledge representation hypothesis
1.5 Levels of approach . . . . . . . . . . . . . .
1.5.1 The knowledge level . . . . . . . . .
1.5.2 The symbol level . . . . . . . . . . .
1.6 Declarative and procedural knowledge . . .
1.7 Other aspects of knowledge representation .
1.8 Bibliographic notes and historical remarks .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2 Classical Logic
2.1 Propositions and arguments . . . . . . . . . . .
2.2 Components of a logic . . . . . . . . . . . . . .
2.2.1 The deductive system . . . . . . . . . .
2.2.2 The semantics . . . . . . . . . . . . . .
2.2.3 Deductive system vs. semantics . . . . .
2.3 Propositional logic . . . . . . . . . . . . . . . .
2.3.1 Deductive system . . . . . . . . . . . . .
Theorems and derived rules of inference
New logical symbols . . . . . . . . . . .
How do we construct proofs? . . . . . .
i
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
3
6
11
14
14
15
16
16
17
18
21
22
.
.
.
.
.
.
.
.
.
.
25
26
32
33
34
34
35
38
49
51
53
ii
CONTENTS
2.4
2.5
2.6
2.7
2.8
Properties of the deductive system . . . . . . . . .
2.3.2 Semantics . . . . . . . . . . . . . . . . . . . . . . .
2.3.3 Soundness and completeness of propositional logic
First-order logic . . . . . . . . . . . . . . . . . . . . . . . .
2.4.1 Deductive system . . . . . . . . . . . . . . . . . . .
2.4.2 Semantics . . . . . . . . . . . . . . . . . . . . . . .
2.4.3 Soundness and completeness of first-order logic . .
Representation using logic . . . . . . . . . . . . . . . . . .
2.5.1 Kinship relations . . . . . . . . . . . . . . . . . . .
2.5.2 World of airplanes . . . . . . . . . . . . . . . . . .
2.5.3 Blocks world . . . . . . . . . . . . . . . . . . . . .
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .
Bibliographic notes and historical remarks . . . . . . . . .
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Non-Classical Logics
3.1 Modal logic . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 The language of propositional modal logic . . .
3.1.2 Semantics for propositional modal logic . . . .
3.1.3 Properties of the accessibility relation . . . . .
3.1.4 Axioms and readings of the modal operators .
3.1.5 Deductive system for propositional modal logic
Rules for normal modal logic . . . . . . . . . .
Rules for other modal logics. . . . . . . . . . .
3.1.6 Soundness and completeness . . . . . . . . . .
3.1.7 First-order modal logic . . . . . . . . . . . . . .
The language of first-order modal logic . . . . .
Remarks on first-order modal logic . . . . . . .
3.2 Relevance logic . . . . . . . . . . . . . . . . . . . . . .
3.2.1 Deductive system . . . . . . . . . . . . . . . . .
3.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Bibliographic notes and historical remarks . . . . . . .
3.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . .
4 Non-Monotonic Formalisms
4.1 Basic principles . . . . . .
4.2 Default Logic . . . . . . .
4.2.1 Deductive system .
4.2.2 Semantics . . . . .
4.3 Auto-epistemic Logic . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. 56
. 61
. 64
. 65
. 73
. 76
. 84
. 84
. 85
. 93
. 98
. 100
. 101
. 102
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
143
. 144
. 149
. 149
. 159
. 169
109
111
112
113
119
121
124
124
127
128
128
128
129
130
132
138
138
139
iii
CONTENTS
4.4
4.5
4.6
4.7
Circumscription . .
Summary . . . . .
Bibliographic notes
Exercises . . . . .
. . . . . . . .
. . . . . . . .
and historical
. . . . . . . .
. . . . .
. . . . .
remarks
. . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
172
174
174
177
5 Belief Revision
181
5.1 The need for belief revision . . . . . . . . . . . . . . . . . . . 183
5.2 Justification-based systems . . . . . . . . . . . . . . . . . . . 185
5.2.1 JTMS . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
5.2.2 Interaction between the JTMS and the problem solver 194
5.2.3 Removal of contradictions . . . . . . . . . . . . . . . . 196
5.3 Dependency networks . . . . . . . . . . . . . . . . . . . . . . 198
5.3.1 Computation of labels for nodes . . . . . . . . . . . . 199
5.4 Assumption-based systems . . . . . . . . . . . . . . . . . . . . 200
5.4.1 Computation of labels for nodes . . . . . . . . . . . . 201
5.4.2 Interaction between the ATMS and the problem solver 202
5.4.3 Removal of contradictions . . . . . . . . . . . . . . . . 203
5.5 Other approaches . . . . . . . . . . . . . . . . . . . . . . . . . 203
5.5.1 Multiple Belief Reasoner . . . . . . . . . . . . . . . . . 204
5.5.2 Logic-based TMS . . . . . . . . . . . . . . . . . . . . . 206
5.6 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
5.7 Bibliographic notes and historical remarks . . . . . . . . . . . 208
5.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
6 Semantic Networks
6.1 Basic principles of semantic networks . . . . . . .
6.2 sneps: A case study . . . . . . . . . . . . . . . .
6.2.1 Arcs in sneps . . . . . . . . . . . . . . . .
6.2.2 Nodes in sneps . . . . . . . . . . . . . . .
6.2.3 Knowledge representation in sneps . . . .
6.2.4 Logical connectives in sneps . . . . . . . .
6.2.5 Network representation of the connectives
6.2.6 Putting it all together . . . . . . . . . . .
6.2.7 Inference in sneps . . . . . . . . . . . . .
6.2.8 Building and using sneps networks . . . .
6.2.9 Examples . . . . . . . . . . . . . . . . . .
6.3 Other kinds of semantic networks . . . . . . . . .
6.3.1 Conceptual graphs . . . . . . . . . . . . .
6.3.2 Semantic primitives . . . . . . . . . . . .
6.4 Concluding remarks . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
213
. 218
. 224
. 225
. 225
. 229
. 238
. 248
. 251
. 254
. 256
. 262
. 266
. 266
. 268
. 271
iv
CONTENTS
6.5
6.6
Bibliographic notes and historical remarks . . . . . . . . . . . 271
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
7 Frames
7.1 Basic concepts . . . . . . . . . .
7.2 Reasoning with frames . . . . . .
7.2.1 Property inheritance . . .
7.2.2 Procedural attachment . .
7.2.3 Rule-based reasoning . . .
7.3 KEE: A case study . . . . . . . .
7.3.1 Basics . . . . . . . . . . .
7.3.2 TellAndAsk . . . . . .
7.3.3 Reasoning with KEE . . .
7.4 Formal semantic of frames . . . .
7.5 Scripts . . . . . . . . . . . . . . .
7.6 Concluding remarks . . . . . . .
7.7 Bibliographic notes and historical
7.8 Exercises . . . . . . . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
remarks
. . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
8 Description Logics
8.1 Basic principles . . . . . . . . . . . . . . . . . . . .
8.1.1 TBox – The terminological component . . .
8.1.2 ABox – The assertional component . . . . .
8.2 Terminological formalism . . . . . . . . . . . . . .
8.2.1 Concept descriptions . . . . . . . . . . . . .
8.2.2 Role descriptions . . . . . . . . . . . . . . .
8.2.3 Knowledge bases — the TBox . . . . . . . .
8.2.4 Models and semantic structures . . . . . . .
8.2.5 Terminological languages . . . . . . . . . .
8.3 Assertional formalism . . . . . . . . . . . . . . . .
8.3.1 Interpretations . . . . . . . . . . . . . . . .
8.4 Reasoning in description logics . . . . . . . . . . .
8.4.1 Reasoning in the terminological component
8.4.2 Reasoning in the assertional component . .
8.4.3 Knowledge bases vs. Data bases . . . . . .
8.5 Implementations of description logics . . . . . . . .
8.5.1 The terminological language . . . . . . . . .
8.5.2 The assertional language . . . . . . . . . . .
8.6 Knowledge modeling in description logics . . . . .
8.7 RACER: A case study . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
277
279
284
284
286
287
289
289
292
295
297
301
302
302
304
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
307
. 309
. 310
. 315
. 316
. 318
. 322
. 324
. 325
. 325
. 326
. 327
. 328
. 328
. 333
. 334
. 335
. 335
. 338
. 339
. 348
v
CONTENTS
8.7.1 Building RACER knowledge bases
8.7.2 Evaluation functions . . . . . . . .
8.7.3 Queries . . . . . . . . . . . . . . .
8.7.4 Retrieval . . . . . . . . . . . . . .
8.7.5 Example . . . . . . . . . . . . . . .
Bibliographic notes and historical remarks
Exercises . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
350
353
354
354
356
364
365
9 Knowledge Representation Revisited
9.1 Notational and inferential perspectives . .
9.2 Abstraction levels . . . . . . . . . . . . . .
9.2.1 The implementation level . . . . .
9.2.2 The logical level . . . . . . . . . .
9.2.3 The epistemological level . . . . .
9.2.4 The conceptual level . . . . . . . .
9.3 The knowledge level and the symbol level
9.4 Bibliographic notes and historical remarks
9.5 Exercises . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
371
373
374
374
375
377
378
379
384
385
8.8
8.9
References
387
vi
CONTENTS
Glossary of notations
Notation
!→
tell
ask
{e1 , . . . , en }
(∆, α)
∴
#
|=
LP L
¬
∧
∨
→
Pi
∪
Prem
Rep
∧I
∧E
Hyp
Reit
#α
#α
→I
→E
¬I
¬E
Description
Function mapping
Knowledge base addition
Knowledge base query
Set with elements e1 , . . . , en
Argument
Therefore
Derivability
Logical consequence
Language of propositional logic
Negation
Conjunction
Disjunction
Implication
Predicate symbol
Set union
Rule of premise
Rule of repetition
Rule of conjunction introduction
Rule of conjunction elimination
Rule of hypothesis
Rule of reiteration
Theorem
Theorem
Empty set
Rule of implication introduction
Rule of implication elimination
Rule of negation introduction
Rule of negation elimination
Page
16
16, 382
16, 382
26
26
26
33, 43
34, 63
36
36
36
36
36
36
37
39
39
39
40
41
41
43
43
43
43
43
45
45
viii
GLOSSARY OF NOTATIONS
Notation
∨I
∨E
Theo
→E"
MT
¬¬I
¬∨I
def
=
↔
↔I
↔E
"
T h(∆)
V
LF OL
∀
∃
fin
Pin
xi
Pin (t1 , t2 , . . . , tn )
{x1 /t1 , . . . , xn /tn }
·
∀I
∀E
∃I
∃E
(D, F, R)
D
F
R
I
|=I α
LP M L
!
"
(W, R)
Description
Rule of disjunction introduction
Rule of disjunction elimination
Derived rule of theorem
Derived rule of implication elimination
Modus tollens
Derived rule of double negation introduction
Derived rule of negated disjunction introduction
By definition
Equivalence
Rule of equivalence introduction
Rule of equivalence elimination
Q.E.D. (end of proof)
Theory generated from ∆
Valuation function
Language of first-order logic
Universal quantification
Existential quantification
Function symbol (with n arguments)
Predicate symbol (with n arguments)
Individual variable
Atomic wff
Substitution
Application of substitution
Rule of universal introduction
Rule of universal elimination
Rule of existential introduction
Rule of existential elimination
Conceptualisation
Universe of discourse
Set of functions
Set of relations
Interpretation function
α is true under the interpretation I
Language of propositional modal logic
Necessary
Possible
Kripke structure
Page
46
46
49
50
51
51
51
53
52
53
53
57
60
61
65
68
68
68
68
68
70
72
72
73
74
75
75
78
78, 317
79
79
80, 327
82
112
113
113
114
ix
GLOSSARY OF NOTATIONS
Notation
(W, R, V )
R(w1 , w2 )
|=M α
M |=w α
LF OM L
⇒
LP RL
N
2S
+
LP RL
α(x):β1 (x),...,βm (x)
γ(x)
α:β1 ,...,βm
γ
α(x):β(x)
β(x)
(R, ∆)
Γ(Ω)
≥r
≥R
M od(∆)
T
(n1 , . . . , nm )
<AM | AN m | c>
ma
nma
conc
∩
<AM - c>
∧⇒
∨⇒
!
"j
n
i
Cin (α1 , . . . , αn )
Description
Kripke model
Accessibility relation between w1 and w2
Model M satisfies wff α
α is true in world w according to model M
Language of first order modal logic
Entailment
Language of propositional relevance logic
Set of natural numbers
Set of sets of S
Language of extended propositional
relevance logic
Page
115
114
117
117
129
132
132
132
132
General default rule
149
Closed default rule
150
Normal default rule
150
Default theory
Extension generating operator
Preference relation introduced by default
rule r
Preference relation introduced by set R
151
154
Set of models of ∆
Translation function in a TMS
Sequence
General justification
Set of monotonic antecedents
Set of non-monotonic antecedents
Conclusion of a justification
Set intersection
Monotonic justification
And-entailment
Or-entailment
And-or
Ordered set of all the i-combinations of the
elements of the set {α1 , . . . , αn }
162
189
193
198
198
198
198
199
201
241
241
241
132
160
161
245
x
GLOSSARY OF NOTATIONS
Notation
n
k ci (α1 , . . . , αn )
n
k c̄i (α1 , . . . , αn )
\
f .{α1#, . . .$, αn }/
n
j
E
[D, E]
0
⊥
2
3
∀R.C
∃R.0
∃R.C
≥nR
≤nR
{i1 , . . ., in }
-SU
R1 5 R2
R+
R−
≡
7
T
|=[D,E] T
AL
ALUEN
O
C
R
[D, I]
|=[D,I] ∆
T |=[D,E] C 7 D
Description
k-th element of Cin (α1 , . . . , αn )
{α1 , . . . , αn } \ k cni (α1 , . . . , αn )
Set difference
The set {f (α1 ), . . . , f (αn )}
Number of combinations of n things j
at time
Extension function
Semantic structure
Universal concept
Inconsistent concept
Concept or role intersection
Concept or role union
Value restriction
Limited existential quantification
Full existential quantification
Number restriction
Number restriction
Concept enumeration
Cardinality of set S
Universal role
Role composition
Transitive closure
Inverse role
Concept or role equality
Concept or role inclusion
Terminology
Model of a terminology
Page
245
245
245
245
245
318
318
318
318
319, 322
319, 322
319
320
320
321
321
321
321
322
322
323
323
324
324
325
325
Attributive language
Attributive language with union, full
existential quantification, and number
restrictions
Set of entities (individuals or objects)
Set of concepts
Set of roles
Description logic interpretation
Model of a description
325
D subsumes C in terminology T
329
326
327
327
327
327
328
Preface
This book corresponds to a compilation of the notes that have been used
in the course on knowledge representation offered by Instituto Superior
Técnico, Technical University of Lisbon (Portugal). It should be considered as a rough draft of a forthcoming book on Knowledge Representation.
Comments and suggestions about its contents will be most welcome.
The book is organized into the following parts:
• Part 1 - Overview (Chapters 1 and 9)
Provides an overview of the field of knowledge representation;
• Part 2 - Foundations (Chapters 2, 3, 4, and 5)
Provides the foundations for understanding and evaluating different
knowledge representation formalisms;
• Part 3 - Representation Formalisms (Chapters 6, 7, and 8)
Presents the characteristics of the main representation formalisms; discusses, in detail, one formalism of each type; and presents evaluation
criteria for a knowledge representation system;
Acknowledgments
I am grateful to Stuart C. Shapiro, Bill Rapaport, Maria R. Cravo, Ana
Cardoso Cachopo, Helena Sofia Pinto, Pedro Oliveira, Pedro Lemos, Sérgio
xii
PREFACE
Costa, Paulo Filipe Andrade, Paulo Sebastião, Pedro Martins, and Haythem
Ismail for comments on earlier drafts of this book.