An Architecture for
Hybrid Knowledge Representation
Zur Erlangung des akademischen Grades eines'
Doktors der Naturwissenschaften der Fakultat flir Infonnatik
der Universitat Karlsruhe (Technische Hochschule)
vorgelegte
Dissertation
von
Guilhenne Bittencourt
aus Porto Alegre. Brasilien.
Tag der mundlichen Priifung: 31 Januar 1990
Erster Gutachter:
Prof. Dr. Jacques Calmet
Zweiter Gutachter:
Prof. Dr. Peter Deussen
Zusammenfassung
Die Arbeit besteht aus dem Entwurf eines Hybridsystems, welches vier verschiedene
Wissensreprasentationsmethoden beinhaItet: Logik erster Stufe, terminologische Sprache,
semantische Netzwerke und Produktionensysteme. Der modulare Aufbau des Systems beinhaltet drei
Ebenen: (i) Die epistemologische Ebene, hier werden die sernantischen Ausdriicke der Darstellungen
definie rt, (ii) die logische Ebene, hier werden die Verwaltung der Wissenshasen, die
Inferenzmechanismen und die Wechselwirkung zwischen den verschiedenen epistemologische
Methoden definien, und (iii) die heuristische Ebene, in der adhoc Strategien zur Beschleunigung der
Ausfiihrung eingefiihrt werden konnen. Die Semantik des Systems ist formal definien unter
Benutzung eines modelltheoretisches Formalismus. Die wichtigsten Beitrage der Arbeit sind: (i) Eine
Methodologie zur Definition der Semantik von Wissensreprllsentationsmethoden. (ii) Die Integration
in einer mehrstufigen ~rchitektur von: Logik erster Stufe, terminologische Sprache, Vererbbarkeit
mit Ausnahmen und heuristische Programmierung. Das System wurde in Common Lisp, unter
Verwendung einer Objekt-orientierten Erweiterung dieser Sprache, implementien.
Abstract
This work consists in designing a hybrid system integrating four different knowledge
representation methods: First-order logic, terminological languages, semantic networks and
production systems. The architecture of the system consists of three levels: (i) The epistemological
level, where the semantic primitives of the representation are defined, (ii) the logical level. where the
knowledge base management, the inference procedures and the interactions between the different
epistemological methods are defined, and (iii) the heuristic level. where ad hoc strategies can be
introduced to improve the efficiency of execution. The semantics of the system is formally defined
using a model-theoretic formalism. The main contributions of this work are the following: (i) A
methodology to define the semantics of knowledge representation methods. (ii) The integration, in a
multi-level architecture, of first-order logic, terminological reasoning, inheritance with exceptions and
heuristic programming. The system has been implemented in Common Lisp using an object-oriented
extension of this language.
- iii
Acknowledgements
I would like to express my gratitude to many people who helped me, in one way or another, to
complete this work. I apologize to those people who directly or indirectly contributed to the success
of this research, but are not part of the following list of acknowledgements.
Zuerst mochte ich Herro Prof. Dr. Jacques Calmet fUr seine freundliche Unterstiitzung und
Betreuung recht herzlich danken. Ich rnochte Herro Prof. Dr. P. Deussen filr die Bereichtschaft,
Zweitgutachter meiner Arbeit zu werden, danken, Ich danke auch Herro Prof. Dr. Th. Beth ftir die
Aufnahme am Europaischen Institut flir Systemsicherheit. Gleichzeitig danke ich allen meinen
Kollegen des Insituts fur Algorithmen und Kognitive Systeme, die rnich sehr unterstiitzt haben,
insbesondere Felix Ulmer und Ono Tjandra flir ihre Ratschlage und Hinweise.
Mon travail de !h~se avait ete commence au Laboratoire d'Informatique Fondamentale et
d'IntelIigence AnificielIe, a Grenoble, France. Je tiens a remercier son directeur, M. Philippe Jorrand,
pour m'avoir accepte dans son laboratoire, ainsi que mes collegues et amis du LIFIA, principalement
Philippe Chatelin, Mary Cisneros, Hubert Comon, Pascal Drabik, Jean-Michel Hufflen, Denis
Lugiez, Christian de Sainte-Marie et Philippe Schnoebelen, pour leur aide et encouragements.
Gostaria de agradecer a todos os amigos e colegas do Instituto de Pesquisas Espaciais, do
Brasil, que apesar da distancia colaboraram de maneira inestimavel para que meu trabalho de
doutorado pudesse ser realizado. Urn agradecimento muito especial a Edson Luiz Franea Senne, que
me representou no Brasil durante estes anos em que estive fora, e aos amigos Luiz Alberto Vieira
Dias, Nandamundi Vijay Kumar, Pedro Paulo Balbi de Oliveira e Sandra Aparecida Sandri pelo apoio
e encorajamento.
Finalmente, gostaria de agradecer a minha esposa Jane pelo amor, pela amizade e pela
paciencia, sem os quais nao s6 este trabalho certamente nao teria sido possfvel como perderia para
mim todo
0
sentido.
Guilherme Bittencourt
Lebenslauf
Geboren am 21 Juli 1956 in Porto Alegre - RS - Brasilien.
Ausbildung:
SchulausbiJdung:
• bis Oktober 1974 : Colegio Estadual Julio de Castilhos - Porto Alegre - RS -Brasilien
Studium:
• Dezember 1979 : Engenheiro Eletrico, Opt;:iio EletrOnica (elektrische Ingenieur)
Universidade Federal do Rio Grande do Sui - UFRGS - Brasilien
• Dezember 1981 : Bacharelado em Ffsica (Bachelor in Physik)
Universidade Federal do Rio Grande do Sui - UFRGS - Brasilien
• Oktober 1984 : Mestre em Ciencia da Computacao (Magister in Infonnatik)
Instituto de Pesquisas Espaciais (brasilianische Raumforschung Institut) - INPE - Brasilien
." Juli 1986: Diplome d'Etudes Approfondis (DEA) d'Informatique
Institut National Polytechnique de Grenoble - INPG - Frankreich
Berufserfahrung:
• November 1976 bis Dezember 1979 : Forschungshilfe am Centro de Processamento de Dados
(Informatik Abteilung) - Universidade Federal do Rio Grande do Sui - UFRGS - Porto Alegre
Brasilien.
• Februar 1980 bis Februar 1982 : Software Ingenieur am Instituto de Ffsica (Physik Institut)
Universidade Federal do Rio Grande do Sui - UFRGS - Porto Alegre - Brasilien.
• Seit August 1982 : Forschungsassistent am Instituto de Pesquisas Espaciais (brasilianische
Raumforschung Institut) - INPE - Silo Jose dos Campos - SP - Brasilien.
• Oktober 1985 bis September 1988 : Studium der Informatik in Grenoble, am Laboratoire
d'Informatique Fondamentale et d'Intelligence Artificielle , Institut National Poly technique de
Grenoble - LIFIA / INPG - Frankreich.
• Seit Oktober 1988 : Wissenschaftliche Tatigkeit in der Universitiit Karlsruhe, Fakultat fur
Informatik.
- vii
Table of Contents
4.2.1. Assertional Module
63
4.2.2.
66
Frame Module
4.2.3. Semantic Network Module
I. Introduction
1.1. Motivation
:
1.2. The Methods
1
4.4. The Heuristic Level,
72
4
5. The Semantics
75
5.1. The Epistemological Level
75
5
5.1.1. The Assertional Module
75
1.5. The implementation
6
5.1.2. The Frame Module
83
1.6. Summary of the Thesis
6
1.4. The Semantics
2. Knowledge Representation
9
2.1.1. The Acquisition of Knowledge
2.1.2. The Search Techniques
2.1.3. The Reasoning
2.2. Adequacy of the Representations
2.2.1. Epistemological Adequacy
2.2.2. Heuristic Adequacy
5.2.1. Isolated Modules
:
:
101
12
5.2.1.1. Assertional Knowledge Bases
13
5.2.1.2. Frame Knowledge Bases
101
14
5.2.1.3. Semantic Network Knowledge Bases
102
5.2.2. Interaction
15
101
102
16
5.2.2.1. First-Order Logic and Frames
17
5.2.2.2. First-Order Logic and Semantic Networks
103
104
106
108
18
2.3.1. Logic
18
5.2.2.4. Frames and First-Order Logic
2.3.2. Semantic Networks
19
5.2.2.5. Semantic Networks and First-Order Logic.:
108
2.3.3. Frames and Scripts
21
5.2.2.6. Semantic Networks and Frames
109
2.3.4. Production Systems
22
5.2.2.7. First-Order Logic, Frames and Semantic Networks
109
23
5.2.2.8. Frames, First-Order Logic and Semantic Networks
110
5.2.2.9. Semantic Networks, First-Order Logic and Frames
110
2.4. Hybrid Systems
2.4.1. KRyPTON
2.4.2. KANDOR
2.4.3.
24
25
5.3. The Heuristic Level.
6. The Implementation
110
115
BACK
26
2.4.4. KL- TWO
27
2.4.5. CAKE
28
6.1.1. Common Lisp
117
29
6.1.2. Common ORBIT
117
33
6.1.3. Kyacc Klex
118
33
6.1.4.
Grasp
119
6.1.5.
Unification
120
2.4.6. Comparison between Hybrid Systems
3. Model-Theoretic Semantics
Preliminaries
3.2. Knowledge Representation Formalisms
3.2.1. First-Order Logic
36
36
6.1.
The
Environment
6.2. The System
3.2.2. Terminological Language
,41
6.2.1. The Knowledge Base Module
3.2.3. Semantic Networks
,45
6.2.2. The Interface Module
3.3. Four-Valued Semantics
The
,
;91
100
5.2.2.3. Frames and Semantic Networks
2.3. Knowledge Representation Methods
3. 1.
5.1.3. The Semantic Network Module
5.2. The Logical Level,
II
2.1. Knowledge Representation
4.
1
70
2
1.3. The Architecture
68
4.3. The Logical Level:
Language
4.1. General Description
4.2. The Epistemological Level,
116
123
125
127
50
6.2.2.1. The Interactive Interface
127
61
6.2.2.2. The Programming Interface
131
61
6.2.3. The Assertional Module
133
63
6.2.4. The Frame Module
134
6.2.5. The Semantic Network Module
:. 135
6.2.6. The Interaction between Modules
136
6.2.6. I. First-Order Logic and Frames
136
6.2.6.2. First-Order Logic and Semantic Networks
137
6.2.6.3. Frames and Semantic Networks
137
6.2.7. The Production System Module
138
7. Conclusion
139
7.1. Contributions
139
7.2. Comparison with other Work
141
7.2.1. The Theoretic Aspects
141
7.2.2. The Implementation Aspects
142
7.3. Future Research
7.3. I. The Theory
143
'"
7.3.2. The System
7.3.3. The Applications
Appendix A. Proof of the Frame Method Theorem
Appendix B. Proofs of the Interaction Theorems
B. I. First-Order Logic and Frames
143
144
145
147
159
159
B.2. First-Order Logic and Semantic Networks
163
B.3. Frames and Semantic Networks
168
Appendix C. The Syntax of the Language
C.1. User Interface Syntax
175
175
C. I. I. Logical Level
175
C.1.2. Assertiona1 module
177
C.1.3. Frame Module
178
C.1.4. Semantic Net Module
C.2. Programming Syntax
178
179
C.2. I. Logical Level
179
C.2.2. Assertional module
180
C.2.3. Frame Module
181
C.2.4. Semantic Net Module
181
Appendix D. Examples of the System Operation
183
D. I. Basic Operation
183
D.2. First-Order Logic
209
D.3. Frames
211
D.4. Semantic Networks
215
References
233
Index
245
List of Illustrations
2.1. Knowledge Representation Functionalities
12
3.1. The Lattice A4 of Truth Values
52
3.2, The Rules for Filling in Truth Tables
53
3.3. The NOT connective
3.4. The AND connective
53
54
3.5. The OR connective
54
3.6. The Logical Lattice LA
4.1. Architecture of the System
55
63
4.2. Example of Inheritance Hierarchies
69
4.3. Defined Hierarchies
70
5.1. Class and Hierarchy Models
93
5.2. Contradictory Links
6.1. The Modules of the System
95
116
:
6.2. The Files of the System
0.1. Hierarchy rl
D.2. Hierarchy r2
123
224
224
0.3. Hierarchy r3
D.4. Hierarchy r4
225
225
D.5. Hierarchy rS
225
D.6. Hierarchy r6
D.7. Hierarchy r7
226
226
D.8. Hierarchy rg
D.9. Hierarchy r9
227
227
D.IO. Hierarchy rIO
D.II. Hierarchy rll
227
228
rl2
228
D.13. Hierarchy rl3
D.14. Hierarchy rl4
228
229
D.12. Hierarchy
229
D.15. Hierarchy rlS
D.16. Hierarchy rI6
D.17. Hierarchy rn
:
230
230
CHAPTER I
INTRODUCTION
knowledge representation methods (like some expert system shells) by what Nebel and Luck (1987)
call a hybrid formalism. A hybrid formalism consist of: a representational theory, explaining what
Chapter 1
knowledge is to be represented by what formalism, and a common semantics for the overall
formalism explaining in a semantic sound manner the relationship between expressions of different
Introduction
formalisms.
This thesis proposes a hybrid architecture integrating four different methods of knowledge
representation: first-o~der logic, frames, semantic networks and production systems. The system is
constructed according to a modular architecture consisting of three levels: one level for the
epistemological methods, where the semantic primitives of the representation are defined; one logical
1987; Bittencourt, 1986). The study of the expressiveness and semantic soundness requirements of
such a knowledge representation system led us to change the focus of our research to the specification
level, where the inference procedures and the interactions between the different epistemological
methods are defined and, finally, a heuristic level, where ad hoc strategies can be introduced to
improve the efficiency of execution. The underlying model-theoretic semantics of the system is
formally defined in a four-valued logic approach.
of a general knowledge representation system. Two particular requirements, imposed on the design of
this general system, directed our research: (i) The architecture of the system should allow the
integration of different knowledge representation formalisms, and (ii) each formalism integrated into
• The introduction of a multilevel architecture for hybrid systems, together with a methodology to
define the semantics of knowledge representation methods and their interactions.
this architecture should receive a model-theoretic semantic definition.
• The extension of the usual terminological language used in hybrid systems to accept n-place
relations instead of just binary roles.
The research presented in this thesis began with an investigation about the most suitable
knowledge representation methods for representing mathematical knowledge (Calmet and Lugiez,
In the following sections, we sketch the principal motivations and characteristics underlying the
design and implementation of the result of this research: An architecture for hybrid knowledge
representation.
The original contributions of this thesis are the following:
• The definition of a sound and complete subsumption algorithm, according to the four-valued
semantics, for the proposed terminological language.
• The integration of inheritance with exceptions into the proposed architecture.
1.1. Motivation
The problem of how to represent and use knowledge has always been a fundamental point in
every Artificial Intelligence application. In the mid-sixties, knowledge representation became a
separate research issue. One of the principal characteristics of this research domain is the lack of a
unified theory, or even of a common opinion, explaining what knowledge representation is. Fertile
controversies are frequent in the domain. The declarative versus procedural issue, as well as the
symbolic versus connectionism controversies are two famous examples. Nevertheless, some of the
desired characteristics of a knowledge representation language begin to emerge. If we adopt The
Physical Symbol System Hypothesis (Newell and Simon, 1976), in contrast to the connectionist
approach, then two of these characteristics, nowadays widely accepted, are specially important for
• The semantic definition of nonmonotonic inheritance with exceptions using the four-valued logic
approach.
• The implementation of a hybrid knowledge representation system corresponding to the
epistemological and logical levels of the semantically defined architecture. The heuristic level,
although semantically specified, is not yet implemented.
1.2. The Methods
In the Handbook of Artificial Intelligence (Barr and Feigenbaum, 1981), the knowledge
representation methods are divided into six categories: Logic, procedural representation, semantic
networks, production systems, direct (analogical) representation, and, finally, frames and scripts.
our work: (i) a unique representation formalism covering all possible applications is not a good
From these six categories four knowledge representation methods are usually recognized as the most
solution (Sloman, 1985), a better solution being to use several cooperating formalisms, and (ii) a
important current approaches (McCalla and Cercone, 1983): First-order logic, frames, semantic
networks and production systems.
clear semantics explaining the meaning of the knowledge representation language is fundamental, i.e.
a system without a semantic is not a knowledge representation system but just a data structure
The main goal of this thesis is to study, in a common framework, the semantics of different
manipulation program. In the last few years, a class of systems incorporating these characteristics has
knowledge representation methods and the possibility of interaction between these methods. To begin
been proposed. These systems are called hybrid systems (Brachman et al., 1983; Luck et al.. 1987;
Vilain, 1985). They usually include two or more knowledge representation methods tightly
our study, we chose these four most currently used knowledge representation methods.
associated. These systems differ from other artificial intelligence systems presenting several
in representing knowledge: Logic, frames and semantic networks are methods used to express
The four chosen methods can be further divided into two categories according to their functions
- 2
1NfR0DUCIlON
CHAPTER 1
CHAPTER 1
INTRODUCIlON
declarative knowledge about the domain, and production systems, although including a declarative
Horty et al. (1987). The semantics of the adopted semantic network method is also defined using the
representation in the form of rules, is a complete programming paradigm including the procedural
four-valued approach.
aspects. We call the first three methods epistemological methods and the fourth method a heuristic
These three epistemological methods, taken alone, are not very powerful, mainly due to the
adoption of the four-valued semantics in the definition of the inference procedure. This non classical
method.
Each epistemological method has one or more inference procedures associated to it. These
semantics, if it allows the decidability of all the inference algorithms, it also weakens in a great deal
inference procedures are used to access the represented knowledge. They may allow the retrieval of
the deductive power of the methods. To increase this deductive power we propose to associate the
explicitly represented knowledge or they may permit the generation of new knowledge which was
three methods. This association is accomplished through the definition of hybrid inference procedures
only implicitly represented.
First-order logic presents a very powerful inference procedure allowing the generation of all the
allowing the generation of new knowledge from knowledge acquired through the different
knowledge entailed (i.e. implicitly represented) by a given amount of represented knowledge. The
problem with this complete inference procedure is its computational cost: It grows exponentially with
the quantity of the represented knowledge. On the other hand, the problem of verifying wether a
given knowledge element is entailed by a certain amount of knowledge is not decidable in first-order
logic. To avoid these problems our first-order logic method presents a non complete inference
procedure, and a query procedure which always stops with an answer (Patel-Schneider, 1985). These
procedures are semantically defined using a four-valued logic approach (Belnap, 1975 and 1977).
Frames are a label used to characterize all knowledge representation methods based on the
epistemological methods. This interaction is defined not by the inference procedures themselves but
by the semantic specification of the results that these procedures should provide.
The epistemological methods and their interactions form an abstract data type whose access
functions are the inference procedures associated to each method and to each interaction between
methods. This abstract data type is semantically defined and all its access functions are decidable, i.e,
would eventually stop with an answer.
To increase the knowledge representation expressiveness, the proposed architecture presents yet
a heuristic level where production systems can be defined. These production systems could use the
previously mentioned access functions as part of their rules, allowing the specification of ad hoc
seminal work of Minsky (1975). The adopted frame method is a terminological language, i.e. a
inference steps. This heuristic level is less formally defined and its features provide it with the
language allowing the definition of a terminology consisting of primitive and defined concepts and n
place relations over these concepts, in the tradition of the KL-ONE system (Brachman and Schmolze,
expressive power of a programming language. This expressive power has the consequence that
1985). The main inference procedure of this frame method is the subsumption procedure, We say that
a concept, or a relation, subsumes another if all instances of the latter are also instances of the former.
never-stopping inference procedures may easily be defined using the heuristic level. This
consequence is the price to be paid to achieve the expressiveness of a programming language.
This inference procedure is very sensitive to the expressiveness of the language: In reasonably
expressive languages the subsumption problem has been proved to be co-NP-complete (Brachman
1.3. The Architecture
and Levesque, 1984; Nebel, 1988) and in more expressive languages it is even undecidable (Schmidt
SchauB, 1988; Patel-Schneider, 1989b). The use of the four-valued semantic approach allowed the
architecture of these systems in a number of ways. The proposed system is composed of three levels:
the epistemological level, the logical level and the heuristic level.
definition of a subsurnption procedure which is not complete with respect to a "classical" semantics
but which is semantically motivated and which presents a good computational behavior (Patel
The first level is where the structure of the knowledge is defined. This level consists of three
modules, each addressing a different type of knowledge structure: A first-order logic module, used to
Schneider, 1986b and 1989a).
express assertional knowledge (Patel-Schneider, 1985); a frame module, based on the terminological
The proposed architecture follows the hybrid systems tradition but extends the usual
All knowledge representation methods based on the abstraction of nodes and edges are called
box of Krypton (Brachman et al., 1985), used to express terrninologicalknowledge, and a semantic
semantic network methods. The adopted semantic network method allows the definition of hierarchies
network module, used to express explicit hierarchies and inheritance with exceptions (Horty et al.,
1987).
with exceptions. The principal inference procedure available in this method is the inheritance
procedure. It allows to verify wether a class is a subclass of another given an explicit hierarchy
Each of these three modules is constructed around some epistemological notions. The notions
consisting of positive (or default) links and negative (or exception) links. Many inheritance
involved in the logic module are: Predicates, functions and constants. The notions involved in the
procedures have' been proposed in the literature, e.g. Roberts and Goldstein (1977) and Fahlman
frame module are: Concepts and relations. Finally, the notions introduced by the semantic network
(1979), but only recentl.y the theoretic soundness of these procedures began to be studied. Some
module are: Classes and hierarchies. These notions receive the name of epistemological notions
because they are associated to models in the external world.
examples of semantically sound inheritance procedures are: .Etherington and Reiter (1983), Touretzky
(1986) and Sandewall (1986). We adopted the so called skeptical inheritance approach, proposed by
Syntactically, each one of the three modules consists of a set of primitives. These primitives are
used to manipulate the epistemological notions. The four-valued semantic definition of these.
- 4
INTRODUCTION
CHAPTER I
INTRODUCTION
CHAPTER I
primitives associates to each notion two models (Belnap, 1977): A positive model consisting of the
Finally, we use the four-valued approach to define the interactions between the different
domain elements that are known to be instances of the notion, and a negative model, consisting of the
epistemological methods. The idea underlying these interactions is to define semantically a knowledge
elements that are known not to be instances of the notion. This approach models aspects of ignorance
base for a given method which takes into account the knowledge represente? through the other
(an instance belongs neither to the positive model nor to the negative model) and inconsistency (an
methods. There are nine different interactions: Logic-frames, logic-semantic network, frame-semantic
instance belongs to both models), thus constituting a semantics for an incomplete inference
network, frame-logic, semantic network-logic, semantic network-frame, logic-frame-semantic
network, frame-logic-semantic network and semantic network-logic-frame. All these interactions are
mechanism.
The second level introduces the notion of a knowledge base. Semantically, a knowledge base is
defined as a set of partitions. Each partition is associated to one of the epistemological methods of the
semantically defined and algorithms for the first three are proposed and proved sound and complete
with respect to the semantic definition.
first level. These partitions, and the methods to which they are associated, can be used independently
or combined. When a question is asked to a set of partitions, the knowledge stored in all these
partitions must be taken into account to answer the question.
1.5. The implementation
A system, called the MANTRA 1 system, has been developed based on the epistemological and
Finally, the third level consists of primitives allowing the definition of production systems. The
logical levels of the proposed architecture. The system has been implemented in Kyoto Common Lisp
rules used in these production systems are formed by queries to the knowledge bases defined in the
(KCL), a complete implementation of the standard Common Lisp (Steele Jr., 1984), together with an
logical level. Conflict resolution strategies and control strategies can be explicitly chosen by special
object-oriented extension called Common ORBIT (De Smedt, 1987). The use of an object-oriented
primitives, allowing the definition of a wide variety of production system architectures (Lenat and
programming tool increases the modularity of the system and makes it easy to modify.
The interface has been developed using KYACC-KLEX (Vigouroux, 1988), an interface
McDermott, 1977).
between KCL and the compiler constructor YACC (Johnson, 1975) and LEX (Lesk, 1975)
environment. The use of this environment makes the interface very easy to modify and to adapt to
1.4. The Semantics
The definition of a knowledge representation formalism must include a semantic account of the
changes in the syntax of the representation language. The system presents two interface languages:
meaning associated to each element of the formalism, independently of any implementation. it is
One interactive interface based on menus and a programming interface allowing the use of the system
impossible to "represent knowledge" using a computer program, all we can represent and manipulate
primitives inside Lisp programs. The programming interface facilitates the integration of the system
are sentences of a given formal language. These sentences are the elements of knowledge
with other systems written in Common Lisp, and can be used to develop the not yet implemented
representation methods and to these sentences we must associate a meaning through a semantics. The
heuristic level of the architecture.
Model-Theoretic Semantics is a framework introduced exactly to be used in the definition of the
To facilitate the interconnection between the different methods a single data abstraction has been
meaning of formal languages, because of this it is highly adequate to be used in the definition of the
adopted. This data abstraction consists of a set of Directed Graphs. Directed graphs subsumes several
semantics of knowledge representation methods.
of the most commonly used data structures and is also suitable to be used in an interactive system due
All the algorithms developed for the different inference procedures of the adopted knowledge
representation methods respect two design requirements: (i) They must be complete and sound
to their inherent graphical character. The system Grasp, a graph manipulation package (Bittencourt,
1984), has been adopted as the progranuning tool implementing this data abstraction.
.
according to the given semantic definition and (ii) they must be decidable. If we adopted the classical
The base of all inference procedures implemented into the system is the unification function. A
semantics for the first-order logic and frame methods these two requirements would be incompatible,
special unification package has been implemented in Common Lisp. The adopted algorithm is the
thus we decided to adopt a four-valued approach. This approach, introduced by Belnap (1975 and
almost linear algorithm due to Martelli and Montanari (1982).
.
1977), allows the definition of algorithms respecting both of the above requirements. This approach
has first been applied to the first-order logic language and to a terminological language by Patel
1.6. Summary of the Thesis
Schneider (1985; 1986b). In this thesis, we apply the four-valued approach to an extended rust-order
The thesis is organized as follows: In chapter 2, we present a brief survey of the knowledge
logic language, allowing defined predicates, and to an extended terminological language, allowing n
representation domain. In this survey, we give a special attention to the description of the history of
place relations instead of binary roles. A four-valued semantics for monotonic semantic networks has
the four knowledge representation methods integrated into our hybrid architecture: Logic, frames,
been proposed by Thomason et al. (1986). We introduce a more complex semantic network language,
semantic networks and production system. We also describe the hybrid system research domain and
allowing the definition of several different nonmonotonic hierarchies, and we applied the four-valued
present briefly some of the most known hybrid systems.
approach to this new ianguage.
IModular
5
Assertional, Semantic Nelwork and Terminological Representation Approach.
INTRODUcnON
CHAPTER 1
In chapter 3, we introduce the model-theoretic semantics framework. In the aim of making this
thesis self contained, we present the indispensable mathematical background underlying the semantic
definition of the knowledge representation methods. We present also the classical semantics of the
three epistemological methods and we introduce the four-valued approach.
In chapter 4, we present informally, through examples, the proposed knowledge representation
language. We describe each of the epistemological methods, their interactions and the heuristic level
of the architecture.
Chapter 5 is the kernel of the thesis. In this chapter, the semantics of the knowledge
representation language introduced in chapter 4 is defined,
In chapter 6, the implementation of a hybrid system based on the defined architecture is
presented. The methodology used during this implementation and the details of the data structures and
the modular development of the system are discussed.
Finally, in chapter 7, the implemented system is compared to other systems described in the
literature. Also some conclusions and the directions for future work are presented.
This thesis includes some tutorial material on topics relevant to the knowledge representation
domain, particularly to the hybrid system research, and also a revision of the
mat~ematical
background needed for the semantic definition of the proposed architecture. This has been done for
two reasons: (i) In Brazil, where this thesis will hopefully be read, sometimes the relevant literature is
not readily available, and (ii) this work is also intended to be a first draft of a future book on the
domain.
CHAPTER 2
KNOWLEDGE REPRESENTATION
make computers more useful and to understand the principles that make intelligence possible"
(Winston, 1984).
Since the beginning, some unstated assumptions have underlain much of the research in
Chapter 2
artificial intelligence, in general, and in knowledge representation, in particular. These assumptions
Knowledge Representation
were expressed for the first time by Brian Smith in the prologue of his Ph. D. Thesis (Smith, 1985).
He called them the Knowledge Representation Hypothesis:
"Any mechanically embodied intelligent process will be comprised of structural
ingredients that (a) we as external observers naturally take to represent a propositional
account of the knowledge that the overall process exhibits, and (b) independent of such
The idea of a mechanization of the intelligence can be traced back to Leibniz (1646-1716).
Leibniz proposed a "calculus of thought" where ideas could be derived through the combinatorial
manipulation of an "alphabet of thought". But the necessary mathematical tools for such a project
were missing and were not provided until the 19th century, with the work of Boole, Frege and
Russel. The formalization of reasoning and knowledge was expanded and amplified in the current
century by philosophers and mathematicians like Quine, Carnap and Tarski.
The actual mechanization (in the sense of executed by a machine) of some kind of reasoning had
to wait until the fifties when computers were invented. Perhaps the first person to see clearly the
possibility of computer intelligence was Alan Turing. He begins his paper Computing Machinery and
I nielligence (Turing, 1950) with the following sentence: "I propose to' consider the question 'Can
machines think?"'. In this paper Turing analyzes explicitly the possibility of mechanical intelligence
and refutes arguments against its feasibility. He also introduces the famous "Turing Test" to verify if
a computer can be called intelligent Another important early paper concerning the mechanization of
external semantical attribution, playa formal but causal and essential role in engendering
the behavior that manifests that knowledge."
This hypothesis can, better than the above definitions, explain what an intelligent system really
is, or at least what kind of intelligent systems the artificial intelligence research is presently
considering.
Two main research directions have been followed for the construction of these intelligent
systems: The Connectionist Model and the Physical Symbol System Model. The connectionist trend
began with the work of Minsky and Papert on Perc eptrons (1969). For a long time this line of
research has not been very active but the advent of small and cheap microprocessors made it practical
to implement connection machines composed of thousands of microprocessors and gave a new
impulse to the field. The symbol system model follows the logic tradition and had McCarthy and
Newell as its principal supporters. The principles of the approach are summarized in the paper
Physical Symbol Systems by Newell (1980). The success of Expert Systems established the
where he discussed how a machine might be
symbolic manipulation of a great number of specialized facts about some narrow knowledge domain
The term Artificial Intelligence was proposed by John McCarthy in 1956 during a summer
workshop at Dartmouth College. This workshop is considered as the start of artificial intelligence as
interested in the symbol system model, the connectionist approach, although very important, is no
more commented in the sequel].
we know it today. The conference was organized by John McCarthy and by Marvin Minsky and have
The early research on the symbol manipulation was concentrated in the development of general
formalisms able to solve arbitrary problems. The General Problem Solver (GPS) designed by Ernst
thought was published by C. Shannon
programmed to play chess.
(l~50)
as participants the two other men who, with McCarthy and Minsky, would lead the artificial
intelligence research for the following years: Herbert Simon and Allen Newell.
In his above mentioned paper, Turing points out the fact that before answering the question
"Can machines think?" one should first define "machine" and "think". From the artificial intelligence
as the current paradigm for the construction of intelligent systems. In this thesis, we are mainly
and Newell (1969) is an example of this approach. This initial research helped to establish the
theoretical foundations of the symbol systems and to provide artificial intelligence with suitable
point of view, "machine" refers almost always to a computer. The term "think" or better the term
programming techniques. These general systems, although performing rather well in toy domains,
could not be "scaled up" to treat real world problems. This is due to two facts, one related to
"artificial intelligence" received a working definition in a paper of McCarthy and Hayes (1969): "A
theoretical issues and one related 10 the nature of the real world knowledge. The theoretical reason is
machine is intelligent if it solves certain classes of problems requiring intelligence in humans". Other
that all methods based on the complete first-order logic suffer from the problem known as
definitions for artificial intelligence were also proposed: "Artificial Intelligence is the part of computer
Combinatorial Explosion: The memory and time needed to solve the problem grow exponentially with
0/
science concerned with designing computer systems that exhibit the characteristics we associate with
the size of the problem. This problem described by Cook (1971) in his paper The Complexity
intelligence in human behavior" (Barr and Feigenbaum, 1981) or "Artificial Intelligence is the study
Theorem Proving Procedures is inherent to the logical approach and is not a question of programming
of mental faculties through the use of computational models" (Charniak and McDennott, 1985).
Others refuse to give a definition but instead state the goals of the field of Artificial Intelligence: "To
I A survey on the connectionist research is presented in tnc book Parallel Distributed Processing published by
Rumelhart and McClelland (1986).
- 10
KNOWLEDGE REPRESENTATION
CHAPTER 2
CHAPTER 2
KNOWLEDGE REPRESENTATION
techniques. The second reason is that real world knowledge is often incomplete and incoherent and
To avoid the philosophical problems involved in defining knowledge representation, we can
that sometimes all the information available about how to solve some problem is a set of practical
also provide a working definition: "A representation of knowledge is a c~mbination of data structures
rules not embedded in any theory of the domain.
This situation generated two types of solutions: In one hand, the theoretical framework has been
and interpretative procedures that, if used in the right way in a program, wi1llead to 'knowledgeable'
behavior" (Barr and Feigenbaum, 1981). From this point of view, the utilization of knowledge
analyzed and weaker inference methods were designed and specific constraints on completeness and
consists of three tightly related processes: The Acquisition of Knowledge, the Search of already
soundness were risen to achieve tractability. On the other hand, heuristic methods and non classical
stored knowledge and the Reasoning, i.e, the generation of new knowledge from the stored
logics have been conceived to allow the representation and manipulation of incomplete and incoherent
knowledge. The relation between this functionalities is sketched diagrammatically in figure 2.1. Every
knowledge. These two solutions are concerned with the development of Knowledge Bases. We
knowledge representation method should provide these functionalities.
define a knowledge base as a set of sentences in a formal language, to which a semantics has been
Reasoning
provided, together with some inference procedures able to generate new sentences from the sentences
already stored in the knowledge base. The development of efficient and reliable knowledge bases is
central to the goal of constructing intelligent systems according to the current paradigm which states
that a great quantity of specialized knowledge is needed to produce computer systems which present
an intelligence behavior.
The work developed in this thesis presents the characteristics of both of these solutions: In one
hand, the semantics of the knowledge representation methods incorporated into the proposed
architecture are based on a weaker logic and all algorithms involved are decidable. On the other hand,
a heuristic level is also incorporated into the architecture allowing the representation of ad hoc
reasoning rules.
In the rest of this chapter, we present a brief overview of the techniques used to represent
knowledge-, This overview is more a historical retrospect than a technical account of the research in
the domain. The technical issues are treated in the next chapter.
2.1. Knowledge Representation
The definition of the term Knowledge Representation presents the same difficulties found for
the definition of the term artificial intelligence. Several formal definitions have been proposed, e.g.
Furbach et al. (1985) and Zeigler (1987). In these definitions, the three essential components of a
representation are explicitly stated: The represented world, the representing world and the
correspondence between these two worlds. Another important point is that the represented and
representing world should be provided with specific operators, with the help of which we are able to
manipulate the entities belonging to these worlds. Furbach et al. call the union of a world and its
operators a Body of Knowledge. In our specific case, the represented world is abstracted under the
form of a set of arbitrary objects whose only property is their identity. The operators acting on this
world are the usual set theoretical operators. The representing world consists of formal languages
which manipulate syntactical entities. Finally, the correspondence between the two worlds is given by
the semantic functions.
LV
W.,ld
Aoqulstnon
•I .~ I
I· .(
,
.
)•
I
Search
.C;~
Fig. 2.1. Knowledge Representation Functionalities
In our case, the operational aspects of the knowledge representation process are related to the
implementation of the proposed architecture. In the following sections, we analyze briefly each of the
functionalities required in a knowledge representation system and comment how this functionality is
present in our system.
2.1.1. The Acquisition of Knowledge
To acquire knowledge it is not enough to add new knowledge elements to the knowledge base,
it is also necessary to integrate the new knowledge to the already stored knowledge by specifying the
relations between the new elements and the elements already in the knowledge base. These relations
are essential to the process of accessing the knowledge stored in a knowledge base. Two types of
mechanisms are available: the knowledge elements can be directly connected through pointers or the
elements can be joined together into clusters.
Another important aspect of the acquisition of knowledge is the treatment of incoherent
knowledge. Depending on the type of knowledge acquisition, the knowledge entered into the
knowledge base can present errors. These errors are due to the nature of the knowledge itself, as in
the case of error prone sensors, or to the human interface between the real world knowledge and the
knowledge base. Some techniques have been developed to deal with acquisition errors, e.g. the
specification of acquisition rules where the type and form of the expected knowledge is specified.
These techniques are common to knowledge base and data base technologies. On the other hand, the
2For more detailed surveys on knowledge representation see: Bittencourt (1988a), Brachman and Levesque (1985),
Brnchman and Smith (1980) and Lauriere (1982).
contents of the knowledge base can be periodically searched for incoherences. The problem with the
_ 11
!2
KNOWLEDGE REPRESENTAllON
CHAPTER 2
CHAPTER 2
KNOWLEOOE REPRESENTAllON
verification of incoherence is that for more expressive formalisms no complete incoherence
their equality, similarities or differences. The pattern-matching technique is not only used in the
verification procedure is known. Finally, it should also be noted that the adequacy of the
search process, actually it is central to all symbolic manipulation. This technique is also used in the'
representation formalism to the type of real world knowledge is determinant for the efficiency of the
knowledge acquisition and in"the reasoning processes. Mylopoulous (1980) identified. the following
knowledge acquisition process.
applications for the pattern-matching: (i) classification, determination of the type of an unknown
In our system, the knowledge acquisition consists of two input languages: The interactive
knowledge element, (ii) correction, where the nature of a pattern match failure leads to error
interface and the programming interface. Both interfaces provide two types of help to the knowledge
correction, (iii) confirmation, where a possible candidate to fit a description is matched against it for
acquisition process: The syntactic verification of the input expression and the possibility of dynamic
confirmation purposes and (iv) decomposition, where a pattern with a substructure is matched against
redefinition of named entities. The acquisition process was not a priority in the implementation of our
a structured unknown element and the unknown element is decomposed into subparts corresponding
system, because of this the knowledge acquisition capabilities of the system are not very powerful.
to those of the pattern. If the elements of knowledge present a complex structure the fraction of
processing power of a search process used by the panern matching tends to be important,
2.1.2. The Search Techniques
In our system, the pattern matching procedure used is the Unification Algorithm. This algorithm
The details of the search techniques depend on the type of representation method being used but
is the kernel of the first-order logic module, and is used in all the interactions where this module
we can classify them in three main types: Blind Search, Ordered Search and AND/OR Graph Search
participate. The unification algorithm can be classified in the decomposition type of pattern matching:
(Nilson, 1982).
The idea is, given two different terms, to find the structural differences between the two terms and, if
The blind search consists of visiting or generating every possible state attainable from a given
possible, to generate a substitution which applied to both terms will make them equal.
initial state. It can be Breadth First or Depth First. Except for the very small search spaces, this
technique is computationally intractable. It is important because it states the foundations of the search
process: the notion of search space, the operators for generate or for move to a new state and the
breadth first and depth first strategies. All other search techniques are refinements of the blind search.
The ordered search is a blind search provided with an heuristic function able to order the
possible next states according to their possibility of success. This type of search is used in the
programming of games, where the rules of the game can provide enough information for the
calculation of an heuristic function to compare two game positions.
The AND/OR graph search is a blind or ordered search in an AND/OR graph. An AND/OR
2.1.3. The Reasoning
The reasoning processes are able to generate new knowledge elements from the knowledge
elements stored in the knowledge base. Five broad classes of reasoning processes have been
identified (Barr and' Feigenbaum. 1981): Formal reasoning, procedural reasoning, analogical
reasoning, abstraction and generalization, and, finally, meta-level reasoning.
" The Formal Reasoning consists of the syntactic transformation of knowledge elements through
the use of inference rules. Three types of formal reasoning are possible:
• Deductive inference: From two knowledge elements, of the form V'I;.P => Q and P, we can infer
graph is a graph with two different kinds of nodes: the AND nodes, representing nodes from where
the new knowledge element Q. This inference rule is known as Modus Ponens. Other inference
all possible successor states must be successfully solved for the node to be solved, and OR nodes,
rules can also be classified under the formal deductive inference label: Specialization, Resolution,
representing nodes from where one successful successor is enough for the node to be solved.
etc.
• Abductive inference: From two knowledge elements, of the form V x.P => Q and Q, we can
AND/OR graphs are also used in two players game programming, because their structure is suitable
for representing the situations of the two different players. Two techniques are used for the ordered
search of an AND/OR graph: the Mini-Max procedure, consisting of chosing the minimum of the
values assigned by the heuristic function to the successors of a node if this node is of type OR, or the
maximum if the node is of type AND, and the Alpha-Beta procedure which is a refinement of the
mini-max procedure alIowing less nodes to be visited without changing in the final result.
In our system, a graph manipulation package is used as the basic data structure. All the
suppose that the reason why Q is true is that P is true and, through this supposition, infer P.
• Inductive inference: If every time we have an element of type P we have also a correspondent
element of type Q, we can infer the rule V x.P => Q.
Among these three forms of formal reasoning, only the first is sound according to the classical
logic semantics. The other two inferences depend on probabilities, and they may produce wrong
results.
dependencies between entities are stored through edges in these dependency graphs, but the search
The Procedural Reasoning is used whenever there exists a known algorithm to calculate the
procedures used with these graphs are rather simple. On the other hand, the semantic network module
answers we are searching for. Mathematical properties of the knowledge elements are specially
presents complex search procedures on graphs, where exceptions must be taken into account.
suitable to be inferred by procedural methods. Inferences associated with the analogical representation
Another important concept related to the search techniques is the Pattern-Matching procedure:
of physical objects are also frequently procedural in nature. The spatial relations between two bodies,
The mechanism allowing the comparison between two elements of knowledge and the verification of
for instance, could be deduced from a set of logical predicates describing their positions in a room,
KNOWLEDGE REPRESENTATION
CHAPTER 2
but a procedure accessing an analogical representation of this room could infer these relations much
more efficiently by simply calculating them from the coordinates of the objects (Eastman, 1970 and
CHAPTER 2
KNOWLEDGE REPRESENTATION
• Metaphysical: If the world could be constructed according to the representation without contradicting
the facts of the aspect of reality that interest us.
1973).
The Analogical Reasoning; although current among human beings, is very difficult to
• Epistemological: If the representation can be used practically to express the facts that 'one actually
formalize. The mechanism used by the human mind to generate analogies is not well understood and
• Heuristic: If the reasoning processes actually gone through in solving a problem are expressible in
its application to help the reasoning of artificial intelligence systems is very limited (Winston, 1980).
the representation.
We are mainly concerned with the representation of facts about some aspect of the world and
One domain in which analogy has been successfully used is in automatic theorem proving. The
restricted form of the expressions allowed and the clear structure of the proofs facilitates the definition
of analogy measures and its use to help in guiding the proof of an unknown expression based on
has about the aspect of the world.
their use in solving problems. We suppose the metaphysical adequacy as an implicit property of the
available facts and we analyze, in the following sections, the epistemological and heuristic adequacy
analog proofs of known theorems (Boy de la Tour and Caferra, 1985).
The Specialization and Generalization reasoning is the basic type of reasoning used in learning
of knowledge representations.
programs. Typically the program is presented to a set of examples and counterexamples and should
2.2.1. Epistemological Adequacy
The problem of the epistemological adequacy is the problem of defining a correspondence
between the aspects of the reality to be represented, i.e. the represented world, and the representing
entities, i.e. the representing world. If the representing world consists of a set of symbols and a set of
relations over these symbols then two sufficient conditions for the representation to be
epistemologically adequate are (Levesque, 1986): (i) There is a one-to-one correspondence between a
certain class of symbols in the representing world and the objects of interest in the represented world.
(ii) For every simple relation of interest in the represented world, there is a relation over the symbols
of the representing worid such that the relationship holds among a group of objects in the represented
world if and only if the appropriate relation exists among the corresponding symbols in the
representing world. This kind of representation is called by Levesque a vivid representation.
Sometimes knowledge cannot be represented in a vivid form, e.g. if the knowledge is uncertain
or ambiguous, and sometimes it is not practical to represent the knowledge in a vivid form, e.g. if the
number or size of the necessary relations is very large or infinite. The epistemological adequacy of
representations dealing with these cases must be analyzed case by case. For instance, certitude
coefficients is an epistemologically adequate representation for uncertain knowledge if some
information about the probability that this knowledge is correct is known.
Another problem related to the epistemological adequacy of a representation is the introspection
problem: Wether we want to represent facts not only about the represented world but also facts about
the representing world in the same representation. In these cases we need a meta-level representation
and the analysis of the adequacy of this representation to represent the old representing world must be
taken into account.
In the case of our system, we provide a semantics based on the model-theoretic approach to all
the representation methods. This means that our system is epistemologically adequate to represent
every world situation which can be mapped into a domain of arbitrary objects and their relations.
How this mapping is constructed is left to the user of the system to decide.
generate a representation, in a given formal language, of the simplest concept explaining all the
information available (Winston, 1975). This type of reasoning is also typical of human beings and its
use in artificial intelligence presents some difficult problems.
Finally, the Meta-Level Reasoning consists of the manipulation of knowledge about the utility
and availability of domain knowledge. This is an important form of reasoning, if the intelligent
system should be aware of its limitations and if it should be able to recognize problems that are
beyond its capabilities. Another use of meta-knowledge is for explanation purposes: If a system
should explain how it has arrived at some result, it must be able to represent and use knowledge about
its deductive mechanism. This last type of meta-knowledge is called introspection (Maes, 1986).
Our system can be characterized as a knowledge base tool, because of this, the only type of
reasoning provided by the system is the formal reasoning. Each of the knowledge representation
methods integrated into the system presents inferences procedures able to generate new knowledge
from the already stored knowledge. These procedures are deductive inferences in the sense that they
generate semantically valid knowledge elements. The difference between these procedures and usual
deductive formal reasoning systems is that our system is based on a non classical semantics following
the four-valued approach. Our system can be used as a base to construct other types of reasoners. It is
specially suited as a tool for building procedural reasoners, due to its programming interface allowing
the use of the system primitives inside a Lisp function, and meta-level reasoners, due to the
possibility of definition of several named knowledge bases and of the use of these knowledge base
identifiers as elements of other knowledge bases.
2.2. Adequacy of the Representations
If we want to represent some aspect of the reality and if we want to use this represented
knowledge to solve problems then the first question to be analyzed concerns the adequacy of the
chosen representation with respect to the real world facts and to the problems we want to solve.
McCarthy and Hayes (1969) have identified three types of adequacies for a knowledge representation:
- 15
- 16
KNOWLEDGEREPRESENTATION
CHAPTER 2
2.2.2. Heuristic Adequacy
The heuristic adequacy is' concerned with the expressiveness of the reasoning processes
CHAPTER 2
..) WLEOOE REPRESENTATION
• Meta-Knowledge: The capacity ofrepresenting knowledge about the represented knowledge, can
involving the represented knowledge. This represented knowledge is considered to be an
be thought of as the capacity of explicitly representing the structure into which the knowledge
fragments are embedded. This capacity is very important if the system should explain its reasoning
epistemologically adequate representation for the aspects of the relevant reality. From a reasoning
process or be aware of its own limitations.
point of view the knowledge can be thought of as a set of fragments: The portions of knowledge that
The heuristic adequacy of our system can be reduced to the heuristic adequacy of each
can be accessed by the reasoning process. The heuristic adequacy can be analyzed from two points of
view: the properties of the fragments themselves and the properties of the structure containing the
fragments. The properties of the fragments which determine the heuristic adequacy of the
formalisms is exactly to provide a wide range of heuristically adequate methods adapted to the
representation are the following:
• Grain Size: This property determines the level of correspondence between entities of the
representation of different aspects of the world. The four knowledge representation methods
integrated in the proposed architecture cover aU the fragment and structure properties presented above.
knowledge representation method integrated into the system. The idea of having several different
represented world and the fragments of knowledge available to the reasoning process. The range of
answers provided by the reasoning process is limited by how detailed the representation is, i.e. if a
2.3. Knowledge Representation Methods
"bus" is represented as a single knowledge fragment, the reasoning process can reason about its
In this section, we present the most commonly used knowledge representation methods. The
time table, its position in a map, etc, but it cannot reason about how many seats are available or the
presentation emphasizes historical aspects and reponed applications of the methods. The methods
presented - logic, semantic networks, frames and scripts, and production systems - are the same
power of its engine.
• Explicitness: The knowledge needed by the reasoning process can be explicitly represented in the
four methods integrated in the proposed architecture.
representation or can be hidden. To make a hidden knowledge become explicit. we can use search
procedures, as in inheritance hierarchies, or we can use the inference power of the reasoning
process itself. How much knowledge is explicitly represented is a tradeoff between storage space
and efficiency of the reasoning process.
• Procedural or Declarative Representation: Procedural representation spares the reasoning
processes the work of inferring the result of direct computations, on the other hand, procedural
knowledge is difficult to modify and generally does not allow introspection. In this case, we have a
tradeoff between time efficiency versus modifiability and clearness.
• Credibility: To reason about uncertain knowledge, the reasoning processes need some explicit
representation of the degree to which this knowledge is uncertain. credibility coefficients have been
introduced to provide this measure. The reasoning with credibility coefficients presents some
unsolved theoretical problems: How should the credibility coefficient of two different knowledge
fragments combine and how should the estimation of the credibility coefficient be made.
2.3.1. Logic
Differently of the other knowledge representation methods, logic has a long history beginning
with the Greek philosophers. Logic is concerned mainly with two fundamental concepts: Truth and
Provability. These concepts have been investigated extensively for centuries by philosophers,
mathematicians and linguists. Logic as a knowledge representation method is concerned with the use
of the logical formalism in the construction of artificial intelligence programs'',
A logical system consists of a set of formula: and a set of inference rules. The formula: are
sentences in a formal language whose syntax is given. Formula: can be associated to Truth Values,
i.e. they can be true ot false. The part of logics concerned with the study of these truth values is called
Model Theory. A formal method to define this association has been proposed by Tarski (1936,
1956). Two important problems are associated to the truth value of a logical formula: The Validity
problem, i.e. if a formula can possibly be true, and the Tautology problem, i.e. if a formula is always
true.
An Inference Rule is a syntactical rule which, when successively applied on valid formula,
Besides the properties associated to the knowledge fragments, the way this fragments are
structured also plays an important role in the heuristic adequacy of the representation. The properties
generates only new valid formula. The inference rules provide a deductive structure to a logical
of the structure of the knowledge fragments which determine the epistemological adequacy of a
representation are the following:
language. The sequence of formula: generated by the application of inference rules on a given formula
is called a Proof The part of logic concerned with provability is called ProofTheory. Two important
• Modularity: The facility to add new knowledge fragments to the representation and to modify
results associate the model theory and the proof theory. The first is a negative result and is due to
existing fragments depends on the modularity of the representation structure. Loosely bound
Church: It states that there is no general method for deciding in a finite number of steps whether a
fragments can be structured in a modular way and highly interconnected fragments present
difficulties to be embedded into a modular structure.
formula is valid. The second is a positive result and is due to GOdel: It states that there are logical
proof systems in which every valid formula is provable. This is referred to as the Completeness of the
3Por a survey of logic in general and its applications to computer science in particular see Gallier (1986).
- 17
- 18
KNOWLEOOE REPRESENTAnON
CHAPTER 2
CHAPTER 2
KNOWLEOOE REPRESENTAnON
proof system. These results are the base of the power of logic as a knowledge representation method
case the links represent binary relations over the objects. But the nodes can also represent predicates,
and also of its weakness: The Godel theorem provides a complete method to infer sentences whose
classes, n-place relations and many other things depending on the system.
'The utilization of the formalism of nodes and links to represent knowledge has been proposed
meaning is formally defined by the Tarskian semantics but the Church theorem states that methods for
The adequacy of logic as a knowledge representation method has been discussed since the early
by QuilJian (1968). In his paper, QuilJian introduces a model for the human memory called Semantic
Memory. This model, where concepts are represented by nodes and relations by links, explains many
days of artificial intelligence. The first systems considered to be artificial intelligence applications
aspects of the human memory, like the fact that recognition of objects that belong to larger classes
verifying the validity of these sentences are inherently inefficient and can even never terminate.
were based on logic. The QA3 (Green, 1969) is an example of such system. This system was able to
takes more time than the recognition of those that belong to smaller ones. Many characteristics of the
answer simple questions about different domains, like puzzles and the block world. Its reasoning
semantic network systems developed later on were already present in the work of Quillian.
method was based on resolution, a logic deduction system in which every formula must be in clausal
During the seventies, the formalism of semantic networks has been used in the implementation
form. The generality of the method limited the range of problems to which it could be successfully
of several systems for natural language comprehension. The system HAM (Anderson and Bower,
applied. Another example is the STRIPS system (Fikes et al., 1972). This system was able to
1973) and the Active Structural Network System (Rumelhart and Norman, 1975) are two examples of
construct action plans for a robot operating in a block world environment. Its reasoning was also
these systems.
based on resolution but it included also the notion of possible world: The set of environment
Two papers published in 1975 had a great influence on the semantic network research:
configurations that could be attained from a given configuration. A third example is the FOL system
Minsky's paper proposing the frame formalism (Minsky, 1975) and Woods' paper analyzing the
(Filman and Weyhrauch, 1976). This system, differently from the other two examples, did not use
meaning of the links (Woods, 1975). Minsky's paper introduced the notion of internal structures for
resol ution as its reasoning method, it used instead a natural deduction system and it was able to verify
the correctness of first-order logic proofs.
The inherent inefficiency of the logical methods led the artificial intelligence researchers to
,
nodes creating a new knowledge representation method derived from the semantic network
formalism. Woods' paper highlighted the need of a formal semantics for the semantic networks. This
paper has been followed by several other papers where the semantic network formalism is associated
propose more efficient formalisms, usually procedural formalisms. The debate between
to the logical framework. Some papers used the semantic network formalism just as an altemative
"declarativists", those who prefer logic as a representation method and "proceduralists'', the
syntax notation for logical formulse, others presented the semantic networks as an independent
proponents of the new methods, headed by John McCarthy and Marvin Minsky respectively,
knowledge representation method using the logical framework just to provide a clear semantics for the
generated many new ideas and provided a new impulse to the knowledge representation field. The
nodes and links.
arguments pro the use of logic as a representation method can be summarized in three points: (i) logic
The Inheritance of properties through paths of links in semantic networks is one of the most
is a natural representation method, (ii) knowledge represented in logic is modular and flexible, can be
important characteristics of this method. The inheritance allows properties to be specified only once,
easily modified and augmented, and finally, (iii) logic is provided with an intuitive formal semantics,
at the higher possible level of the hierarchy and than to be inherited by all sub-levels implying a save
due to Tarski.
of memory space for storing properties. The inheritance algorithms used in networks structured as
This last point is perhaps the most important. Even if a knowledge representation is not based in
trees are very simple and efficient, but if multiple inheritance is allowed, specially in the presence of
a logical formalism, today it is widely accepted that it must present some kind of model-theoretic
exceptions links, the task of determining inheritance paths becomes much more difficult. Even worse,
semantics to be called a knowledge representation. Methods not supported by a semantics are just data
in presence of multiple inheritance and exceptions the intuitions about what is a good inheritance
structure manipulation programs which have no connection with some precise aspect ofreaJity.
policy turn out to be very fuzzy, leading different systems to implement different policies (Touretzky
The first-order logic module integrated into the proposed architecture is a weak logic based on
the four-valued semantic approach. This approach allow to obtain decidability of the inference
procedure without loosing the semantic motivation of the method.
et al., 1987).
Besides the inheritance of properties, another inference mechanism is the matching of a
fragment of a network against another network. The semantics of this mechanism is even more
complex to specify and is highly dependent on the meaning of the links in the network. These links
have received a variety of interpretations, a good survey of these interpretations is presented in
2.3.2. Semantic Networks
Semantic Network is a label applied to a wide range of systems. These systems' are very
Brachman (1983).
diversified, the notation being the only common feature present in all systems: A semantic network
The semantic network module integrated in the proposed architecture is used to define
consists of a set of nodes connected by a set of links. These nodes can represent objects and in this
inheritance hierarchies with exceptions. The inference procedure of this module allow the verification
of the subclass relation between two classes belonging to a given hierarchy.
- 19
KNOWLEDGE REPRESENTATION
CHAPTER 2
CHAPTER 2
KNOWLEDGE REPRESENTATION
2.3.3. Frames and Scripts
Frames and Scripts were introduced to allow the expression of internal structures of objects.
2.3.4. Production Systems
Production Systems is a generic name for all systems that represent knowledge in the form of
These methods also allow the representation of inheritance hierarchies like the semantic network
Production Rules, i.e, pairs consisting of a condition and an action. The initial idea of production
methods.
The ideas underlying these methods were introduced by Marvin Minsky in his seminal paper A
systems was introduced by Post (1943). Post proposed the, so called, Post Systems, a set of rules
Framework to Represent Knowledge (Minsky, 1975). The applications proposed by Minsky for his
processing.
framework are scene analysis, visual perception modeling and natural language comprehension,
for specifying syntactical transformations over strings of characters, as a general method for data
The production
~ystems
were rediscovered during the seventies as a tool for psychological
although neither implementation methodology nor formal definition of the framework is presented in
modeling. The condition-action format is suitable to model all behaviors based on stimulus response
the frame ideas and several
pairs. Two systems using production system for human behavior modeling are PAS II (Waterman,
the article. Since 1975, many systems have been implemented based
Oft
formal definitions of frames have been proposed. Frames are also at the origin of the ideas underlying
the object-oriented paradigm. Scripts have been proposed by Schank and Abelson (1975, 1977), they
consist of frame systems specialized in the description of event sequences.
1973) and VIS (Moran, 1973).
Another class of systems based on the production rule format for knowledge representation is
the Expert System class. The goal of an expert system is simultaneously less general and more
In general, a frame consists of a set of Slots describing attributes associated to the objects
ambitious than the goal of psychological models. Expert systems are intended to reproduce the
described by the frame. The values associated to these slots can be other frames, creating a
performance of a human expert in the solution of real world problems, but these problems are
dependency network between the frames. The frames are also usually organized in a specialization
restricted to a very narrow domain. The first successful expert systems were DENDRAL
hierarchy, creating another dimension of dependency between frames. The slots also have properties,
(Feigenbaum et al., 1971) and MYCIN (Shortliffe, 1976). DENDRAL infers the molecular structure
these properties are called Facets and usually describe type or number restrictions on the slot values.
of unknown compounds from mass spectral and nuclear magnetic response data. MYClN assists
The systems that have used frames or scripts do not form an homogeneous group but certain
physicians in the selection of appropriate antimicrobial therapy for hospital patients with bacteremia,
fundamental ideas are shared by all these systems. One of these ideas is the Inheritance of properties
meningitis, and cystitis infections. Since then a great variety of expert systems have been developed
from superclasses to subclasses, allowing the specification of some property of a group of objects or
for solving problems in many different domains including agriculture, chemistry, computer systems,
classes by associating this property to their superclass. The inheritance can be a very efficient
electronics, engineering, geology, information management, law, manufacturing, mathematics,
inference mechanism in a domain that presents a natural taxonomy of concepts.
Another idea common to frame systems is the Reasoning Guided by Expectations. A frame
medicine, military science, physics, process control and space technology.t Some of these systems,
like the system XCON/Rl (McDermott, 1982), for the configuration of VAX computers of DEC, and
contains slots and these slots can have typical values or default values. When trying to instantiate a
PROSPECTOR (Hart et al., 1978), for the analysis of the likelihood of finding particular types of
frame according to a given situation, the reasoning process should try to fill the slots with the specific
mineral deposits in a given region, are highly commercially profitable. With the success of expert
values provided by the situation description. The fact that the reasoning process knows which values
system, specialized programming environments for the development of these systems have been
to search for may be fundamental for the efficiency of recognition of a complex situation.
implemented. These environments, called Expert System Shells, provide all the mechanisms needed
_A third idea is the Procedural Attachment. Besides the typical and default values, a slot can be
associated to a procedure that should be executed when certain conditions hold: if created, when the
to build an expert system except the specialized knowledge.
In general, the architecture of production system consists of three modules: a rule base, a
value of the slot is initialized, if needed, when some values for the slot is needed, if modified, when
working memory and an inference engine. The inference engine controls the activity of the system.
the value of the slot is modified or if deleted, when the value of the slot is deleted.
This activity takes place in cycles, each cycle consists of three phases: (i) Matching, the selection of
The frame module integrated into the proposed architecture consists of a Terminological
the rules satisfying the present situation, as described in the working memory, (ii) Conflict
Language. This type of language, introduced in the KL-ONE system(Brachman and Schmolze,
Resolution, the choice, among the matching rules, of those which are going to be executed or "fired",
1985), allows for the definition of a terminology. Its main inference procedure is the Subsumption
(iii) Action, the execution of the chosen rules. The two first phases are sometimes joined into a single
relation test used to verify if a given concept is more general than another.
phase called recognition resulting in the name Recognition-Action for the whole cycle.
The satisfiability test of the niles depends on the formalism used for representing the internal
knowledge. It can be a unification procedure between two logical formula: or a match test between
two frames of simple a syntactical equality test between two symbols. The satisfiability of the rules
4For a bibliography on expert systems and their melhodology see Calmel and Biuencourt (1988).
- 21
- 22
KNOWLEIXiE REPRESENTAnON
CHAPTER 2
CHAPTER 2
KNOWLEIXiE REPRESENTAnON
depends also on the control strategy adopted by the inference engine: If the system is working in
A more theoretical approach to the diversification of formalisms began with the KRYPTON
forward chaining then the left part of the rules are matched against the established facts of the working
system, the first essentially hybrid reasoning system (Brach man et al., 1983). The characteristics of
memory and if the system is working in backward chaining then the action part of the rules are
these new kind of hybrid systems have been summarized by Nebel and Luck (1987):
matched against the present goals of the system and the left-hand part is used as the new goals if the
"A hybrid knowledge representation system is an implementation of a hybrid knowledge
matching is successful. The syntax of the rules varies according to the system and can be very
representation formalism consisting of two or more different subformalisms. These
friendly with natural language format like in ROSIE (Fain et al., 1982) or quite cryptic like in the OPS
subformalism should be integrated through (i) a representational theory, explaining what
family of systems (Forgy and McDermon, 1977).
knowledge is to be-represented by what formalism, and (ii) a common semantics for the
The main advantages of production systems as a knowledge representation method are the
following: modularity, uniformity and naturalness. The principal disadvantages are: inefficient
overall formalism, explaining in a semantic sound manner the relationship between
expressions of different subfonnalisms."
execution time and complex control flux of the problem solving method. These advantages and
In the following sections, we present a brief description of some systems that presents the
disadvantages determine a characteristic profile for the domains suitable to the development of expert
characteristics above. In general these systems consist of (at least) two different kinds of knowledge:
system. These domains should present: (i) a knowledge consisting of a great number of loosely
The terminological knowledge, consisting of a set of Concepts and Roles defining a Terminology,
connected facts, (ii) processes consisting of sets of independent actions and (iii) a clear separation
and the assertional knowledge, consisting of some Logical Formalism suited to represent general
between the knowledge and the actions.
assertions, The syntax of the languages associated to each system can vary from graphics-oriented to
The proposed architecture provides a heuristic level where production systems can be defined to
be used in the automatic modification of knowledge bases. The rules of these production systems
lisp-like expressions, but the semantics of these languages is generally presented using the model
theoretic approach.
consist of pair of queries and definitions belonging to one of the other three methods of the
architecture.
2.4.1. KRYPTON
The development of KRYPTON began in 1982 (Brachman et al., 1983). The system consists
2.4. Hybrid Systems
The efficiency problems associated to the general knowledge representation methods based on
of two modules: the Terminological Box and the Assertional Box. The terminological box, or
module, is based on the KL-ONE language - a representation system based on semantic networks
logical formalisms and the difficulty of representing certain type of knowledge, e.g. negative,
and frames (Brachman and Schmolze, 1985). In fact, KRYPTON has been developed mainly out of
disjunctive and existentially quantified assertions, using frames or semantic networks lead to the idea
the worlc on KL-ONE. The difficulties in representing assertional knowledge using KL-ONE led to
of Multiple Representations. The reasons why we need different knowledge representation
the idea of the integration of a theorem-prover and a KL-ONE-like language into a hybrid system. The
formalisms for an adequate representation of a realistic portion of the world have been sunnnarized by
chosen theorem-prover was Stickel's connection graph theorem-prover (Stickel, 1982).
Sloman (1985). This position, contrary to the view that one uniform formalism is sufficient (e.g,
The most important feature introduced by KRYPTON is the notion of a Functional Approach to
Kowalski, 1980), have been considered since the seventies (e.g. Brow and Burton, 1975; Moses,
knowledge representation (Levesque, 1984b): KRYPTON is provided with a clear, implementation
1971.and Sloman, 1971) but only recently it became very popular.
independent, description of what services are provided to the user. This Knowledge Level (Newell,
Many of today's knowledge representation systems provide their users with more than one
representation formalism. The important question here is how these different formalisms should be
1982) description is presented in the form of a formal definition of the syntax and semantics of the
languages provided by the two modules and also of their interaction (Brachman et al., 1985).
used and to which degree their functionalities can be integrated when representing domain
This formal analysis of the functionalities of KRYPTON led to a negative result that had great
knowledge. Some systems that supports several formalisms (specially SOffit: expert system shells) left
impact on the future development of terminological languages: The subsumption problem, even for a
the task of integrating the different formalisms totally to the user. In this systems, each formalism is
very simple subset of the terminological language of KRYPTON is co-Nl-compleret (Brachman and
unaware of the knowledge represented in other formalisms, except in the cases where the user
Levesque, 1984). This analysis also highlighted an interesting behavior of the complexity of the
explicitly tell tfiem how to consider this knowledge. This situation, although presenting many
subsumption algorithm: It seems to present a "computational cliff' implying that a slight change in the
practical advantages from the point of view of programming expert systems, is not semantically
expressiveness of the terminological language can transform the problem from a quite easy one (0(n 2)
satisfactory, i.e. the semantic consistency of the knowledge represented in different formalisms is not
in the analyzed case) to intractable (co-NP-complete in the analyzed case).
maintained by the system.
5A problem is said to be co-NP-complete if it is me complement of a NP-complete problem.
24
KNOWLEDGE REPRESENTA nON
CHAPTER 2
CHAPTER 2
KNOWLEDGE REPRESENTA nON
The set of primitives of the KRYPTON language has varied from one presen tation to another of
calculates complete subsumption based on the semantics developed for the KRYPTON system
the language. In its most complete form (Brachman et al., 1983), the terminological box includes
(Brachman and Levesque, 1984). This calculation can be done in reasonable time because the
primitives for: Concept conjunction, value and number restriction on concepts, primitive subconcept,
expressive capabilities of its frames are severely limited.
concept decomposition, role differentiation, role chain, primitive subrole and role decomposition. The
KANDOR has been used as the knowledge representation component.of ARGON (Patel
assertional box provides a complete first-order logic language including the usual operators: Not, and,
or, exists and for all.
Schneider et aI., 1984), an interactive information retrieval system designed to be used by non
experts for retrieval over a large, heterogeneous knowledge bases, possibly taken from a large
2.4.2. KANDOR
of its operations were essential to its successful use in ARGON.
number of sources. Th~ well-defined semantics of KANDOR as well as the computational efficiency
Two ideas have guided the development of the KANDOR knowledge representation system
(Patel-Schneider, 1984): To provide a limited and well-defined interface to the system, and to limit its
2.4.3. BACK
expressive power to guarantee that all the operations performed by the system terminate in reasonable
The BACK system presents the same structure as KRYPTON: A terminological box and an
time. The limited interface prevents the system from being used as a low-level utility for manipulating
assenional box. One main concern in the BACK implementation is the Balancedness of the
data structures, and also allows the definition of a consistent semantics independent of the
formalisms involved. Although the fact that the reasoning in hybrid systems is frequently incomplete
implementation. The fact that the operations performed by the system are time efficient makes the
(because of efficiency requirements) sometimes leads to situations where one formalism allows to
system usable as part of larger knowledge-based system that have to deal with the real world.
express something which obviously should have some impact on another formalism according to the
The basic units of KANDOR are individuals and frames. Individuals are associated to objects in
semantics of the system, the incompleteness of the reasoning precludes this impact to be realized by
the real world and frames are associated to sets of these individuals. These units are manipulated
the system. The formalisms of such systems are said to be unbalanced. To capture this notion of
through the standard representational structures of frames, slots, restrictions, and slot fillers common
unbalancedness Nebel and Luck (1988) introduce the Principle of Balancedness in Hybrid
to most frame-based systems. Each slot maps individuals into sets of values, called slot fillers,
Representation Systems:
Elements of these sets can be other individuals, strings, or numbers. Frames in KANDOR have no
"If a representation construct in a subformalism of a hybrid formalism suggests that its
assertional import, they serve simply as descriptions of some set of individuals. There are two types
usage has some impact on knowledge represented with another subformalism (according
of frames: Primitive and defined. To be an instance of a primitive frame, an individual must be
to the common semantics), then this should be realized by the reasoning component of the
explicitly specified as an instance of the frame when it is created. To be an instance of a defmed frame
underlying system."
an individual must satisfy the conditions associated to the frame definition. There two types of
The criteria taken into account in the development of the BACK system are the following: (i)
conditions: Superframes and restrictions. A superframe is just another frame, and a restriction is a
The subformalisms of the system should be balanced, (ii) the formalism should permit tractable
condition on a set of slots fillers for some slot. An individual satisfies the restriction if its slots fillers
for that slot satisfy the condition.
should be able to represent incomplete knowledge in a limited manner, (iv) the system should allow
There are only threedifferent types of restrictions allowed in KANDOR frames: (i) The SOME
for extending the knowledge base incrementally (retractions are not considered) and (v) the system
restriction, which states that at least some number of slot fillers for a particular slot must be an
inference algorithms covering almost all possible inferences, (iii) the assertional box formalism
should reject assertional box entries which are inconsistent.
instance of some frame, (ii) the ALL restriction, which states that all the slot fillers for a particular slot
The terminological language of BACK is more powerful than that of KRYPTON. It includes a
must be instances of some frame or be some individual, and (iii) the MAX restriction, which states
that there can be at most some number of slot fillers for a panicuIar slot.
restriction operator used to declare disjoint concepts, static defmitions of concepts and roles allowing
concepts and roles to be declared equal or related by the subsumption relation, the usual concept
KANDOR provides two main operations that require inferences to be made: Given an individual
conjunction and value restriction and, finally, explicit number restrictions on the number of role
and a frame, determine whether the individual is an instance of the frame, arid, given two frames,
values in the form of the primitives atleast and atmost. The price to be paid for this greater
determine whether one frame subsumes the other. In order to answer the first type of question
expressiveness is the intractability of the subsumption algorithm. This terminological language has
quickly, whenever a new individual is created KANDOR examines all frames that it could be instance
been analyzed in Nebel (1988) and its subsumption algorithm has been proved to he co-NP-hard in
of, and store this information. This operation is called realization. To answer the second 'type of
the strong sense. In this analysis new interesting properties concerning the "computational cliff' have
question, KANDOR automatically maintains a frame taxonomy. Whenever a new frame is created it is
been highlighted: it is possible to have a language allowing the atleast primitive or the atmost
placed in its correct position in this taxonomy. This operation is called classification. KANDOR
- 25
- 26
KNOWLEDGE REPRESENTATION
CHAPTER 2
primitive without loosing the tractability of the subsumption algorithm, but with the inclusion of both
primitives the problem falls off the "computational cliff' leading to an intractable algorithm.
CHAPTER 2
KNOWLEDGE REPRESENTATION
2.4.5. CAKE
The CAKE system was developed as a knowledge representation and reasoning facility for the
The assertional box of BACK consists of an object-centered language. This language,
Programmer's Apprentice project (Rich et al., 1979). The goal of this project was to implement a
differently of the usual object-centered languages, allows incomplete information to be expressed.
system able to analyze, synthesize, modify, verify and explain programs. Differently of the
The following operators are available in the language (Nebel and Luck, 1987): (i) stating the
previously presented hybrid systems, CAKE does not present complementary representation
cardinality of a role-filler set, (ii) disjunctive information on role fillers and (iii) stating the
exhaustiveness of the provided information selectively. This language is very weak, allowing only the
formalisms in which different types of knowledge are represented, but it uses its two formalisms to
represent the same knowledge.
statement that one object is in the extension of some concept and that two objects are related, or that
The two formalisms present in CAKE are: A predicate calculus package based on the RUP
one object is in relation to a number of other objects. But its integration with the terminological box,
(Reasoning Utility Package) system (McAllester, 1982) and a specialized, semantic network like
using the constraint propagation approach, results in a very powerful language providing one feature
formalism used to represent the structure of programs. This last formalism, called Plan Diagrams or
not present in other hybrid systems: The capacity of rejecting inconsistent information.
simply Plans, was developed without any special concern about formal semantics but was only
2.4.4. KL-TWO
formal semantic to the Plan language, defining a mapping from this language to predicate calculus,
designed to fit the requirements of the program representation problem. In the attempt to provide a
The KL-TWO system is composed by two subformalisms (Vilain, 1985): PENNI, a modified
Rich discovered that the resulting predicate calculus formalization could be used in the implementation
version of the RUP (Reasoning Utility Package) system (McAllester, 1982) and NIKL (New
of the system as a separate level, and that the interaction between the Plan level and the Predicate
Calculus level enhanced the efficiency of the system.
implementation of KL-ONE), a terminological reasoner in the KL-ONE (Brachman and Schmolze,
assertions without any quantification and NIKL allows the representation of a simple class of
The methodology used in the development of the CAKE system is summarized by Rich as
follows (Rich, 1982):
universally quantified sentences. These sentences can be applied in PENNI to extend its propositional
"Use a hybrid system in which an ad hoc knowledge representation language co-exists
1985) tradition. These two formalisms are complementary: PENNI is able to represent propositional
with a predicate calculus translation. At the predicate calculus level, provide as much
language with a limited form of quantification.
The PENNI formalism consists of a database of propositional assertions, more specifically, a
reasoning power as can be naturally expressed and efficiently implemented in the
data base of ground sentences of first-order logic without quantifiers. This database permits
language of predicate calculus. At the higher level, implement those reasoning procedures
incremental assertions and retractions. Underlying the deductive mechanism of PENNI is a Truth
which naturally exploit the structure of the ad hoc knowledge representation language.
Maintenance System (TMS) allowing all the useful operations that have been associated with such
Finally, provide explicit connections between the two levels so that changes at one level
systems (Doyle, 1979): Justification of deduction by linking each new deduced proposition to the
can be incrementally translated to the other."
propositions allowing its deduction, efficient retraction and fast dependency-directed backtracking.
The present architecture of CAKE consists of eight layers (Rich, 1985): The bottom five layers
PENNI disposes of two deduction algorithms: An efficient but incomplete forward-chaining
forming the predicate calculus level and the top three layers corresponding to the Plan level. The
algorithm and a complete but less efficient algorithm. The forward-chaining algorithm is incomplete
predicate calculus layers, from bottom to top, and their functions are the following: (i) Truth
because it fails to perform the inferences that require case analysis.
Maintenance, unit propositional resolution, retraction and explanation, (ii) Equality, uniqueization of
The NIKL terminological reasoner allows the definition of composite concepts and roles
terms, congruence closure, (iii) Demons, pattern directed invocation, priority queues, (iv) Algebraic,
through the use of structuring primitives and primitive concepts and roles, The primitives available in
commutativity, associativity, etc, lattices, boolean algebras, (v) Types, type inheritance and
NIKL include: Concept conjunction, statement of the minimal number of role fillers, concept value
functionality. The Plan layers are the following: (i) Plan Calculus, data and control flow graphs,
restriction and role differentiation. The inference provided by NIKL is
basic~ly
the subsumption
relation between concepts. Recently, it has been proved that the subsumption problem in NIKL is
abstract data types, (ii) Plan Recognition, flow graph parsing and recognition heuristics, (iii) Plan
Synthesis, search of refinement space and synthesis heuristics.
undecidable (Patel-Schneider, I989b).
Two forms of hybrid reasoning are performed by the KL-lWO system: The forward reasoning,
used to classify new assertions according to the concepts already defined in the NIKL knowledge
base, and the backward reasoning, used to answer queries. Both mechll-',lisms combine the inferences
mechanism of PENNI and NIKL to perform their tasks.
28
KNOWLEDGE REPRESENTATION
CHAPTER 2
CHAPTER 2
Examples of hybrid systems not presenting the assertional-terminological architecture are
2.4.6. Comparison between Hybrid Systems
The systems presented above do not form an exhaustive list of the Hybrid Systems described in
the literature, but we think they are representative of the different systems that have been proposed.
KNOWLEDGE REPRESENTATION
CAKE and the system developed by Charniak for natural language comprehension (Charniak, 1981).
Some systems provide a third module, besides the assertional and terminological modules. One such
The typical architecture of hybrid systems consists of a terminological and an assertional
system is the system KRAPFEN developed by Stock and Castelfranchi (1989). Other systems using
modules. The terminological modules of these systems are in general variants of the KL-ONE
semantic networks to express predicate calculus sentences have also been described in the literature
language. The assertional modules, on the other hand, present a variety of approaches. One typical
(e.g. Fikes and Hendrix, 1977) but they are not considered hybrid system in the sense we intend
class of hybrid system has its assertional module based on complete theorem provers. This class is
here.
called by Vilain (1985) theorem-prover-based hybrid reasoners. Examples of such systems are
To summarize we present, in table 2.1, the main characteristics of the hybrid systems presented
KRYPTON and the system developed by Schubert, Papalaskaris and Taugher (Schubert et al.,
in this section along with the characteristics of other hybrid systems described in the literature.
Although the comparison of our MANTRA system with the systems described in the literature is the
subject of chapter 7, we also include our system in the table 2.1.
1983), this last system extends a theorem prover to reason about type, part, color and time
relationships.
Other hybrid systems adopt a restricted version of first-order logic in their assertional module.
Examples of this type of systems, called by Vilain (1985) restricted language hybrid reasoners, are
the BACK system, which adopts an object-centered language allowing the expression of incomplete
knowledge, and the KL-lWO system, which adopts the RUP propositional deduction system. More
recent examples of this type of systems are the LOOM, QUARK and CLASSIC systems.
The LOOM system (MacGregor and Bates, 1987) is a very ambitious project developed at USC
(California, USA), it includes a terrn classifier, instance matcher, truth maintenance for both TBox
and ABox, default reasoning, full-first-order retrieval language, pattern-driven methods, a pattern
classifier, and automatic detection of inconsistency. Moreover, the system can be interfaced with a
rule-based system (Yen et al., 1989). Its semantics uses a three-valued semantics that is extended to
seven values when defaults are included.
The QUARK system (Poesio, 1988), developed at the University of Hamburg (FRG), includes
a Hom clauses interpreter, and a terminological reasoner in the KL-ONE tradition. Its semantics is
defined using the four-valued approach. The system is organize around nodes called Denotasionai
Entities (DE), and the set of facts associated to these DE's, called Aggregates. The aggregates
correspond to the frame entities in other systems, and are organized into a network.
The CLASSIC system (Brachman et al., 1989) is a direct descendent of the KANDOR system,
and shares with this system all its functionalities. Its goal is to extend the expressive power of
KANDOR's tenninologicallanguage while remaining tractable. It includes, besides the functionalities
of the KANDOR system, a construct to allow equalities between role fillers, a set construct to allow
one to say a slot is filled by an individual of one of a set of different frames, a test-defined construct
which allows one to test membership in classes by a user defined test, and a limited form of rules
which allow one to say that once something is found to be an instance of one concept, then it is an
instance of another concept. The system also allows host concepts, such as integers, strings, and all
Common Lisp structures.
Another interesting approach is to use the programming language PROLOG (Sterling and
Shapiro, 1986) as the base for the assertional module and extend it with a terminological reasoner.
This approach is followed, for instance, by Guarino in his DRL system (Guarino, 1988).
KNOWLEDGE REPRESENTAnON
KRYPTON
KANDOR
CHAfYfER2
Formal
Semantics
Domain of
Application
-
Model
Iheoretic
Natural
language
KL-ONElike
-
Model
Iheoretic
-
Assertional
Module
Terminological
Module
Full first-order
predicatelogic
KL-ONElike
Frame like
Other
Modules
schema
BACK
Objectcentered
language
KL-ONEIike
-
Model
Iheoretic
Natural
language
KL-1WO
Variablefree
predicatelogic
KL-ONElike
-
Model
theoretic
-
Plan
Mapping into
logic
Prognunming
languages
Seven-valued
semantics
Natural
language
Truth
CAKE
maintenance
system
-
diagnms
Truth
maintenance
system
Variable-free
Algebra
Production
Horn
clauses
KL-ONElike
-
Four-valued
semantics
Natural
language
Frame-like
KL-ONEIike
-
Model
theoretic
PrototYPe
application:
Wine choice
Prolog
Many-sorted
Iheory
-
Prolog
Semantics
Logic
programming
KRAPFEN
Network of
propositions
KL-ONElike
Prototype
module
Not
povided
Natural
language
MANTRA
Decidable
first-orderlogic
KL-ONEIike
Semantic net
and production
systems
Four-valued
semantics
Mathematical
knowledge
LOOM
QUARK
CLASSIC
Systems
schema
DRL
Table 2.1. The Hybrid Systems
'11
MODEL-THEORETIC SEMANTICS
CHAPTER 3
A convenient mathematical structure used to define the semantics of formal languages is the
notion of a Term Algebra. A term algebra is simply a pair consisting of a nonempty set A together
with a collection F of functions. Each function being of the form f: An ~ A. for some natural number
Chapter 3
n > O. This notion is formally presented in the following definition.
Model-Theoretic Semantics
Definition 3.2. Term Algebra.
Given a ranked alphabet 1:. a l:--algebra A is a pair <A, 1> where A is a nonempty set called the
carrier. and 1 is an interpretation function assigning functions to the function symbols as follows:
(i) Each symbol fin 1: of arity n > 0 is interpreted as a function j[ f ] : An ~ A;
A knowledge representation system cannot really store knowledge. but only expressions of
some formal language. To associate these expressions to the knowledge we want to represent, an
(ii) Each constant c in 1: is interpreted as an element of A.
The following abbreviations are adopted: j[ f ] ;: fA and j[ c ] == CA •
external semantics must be defined to provide meaning for the expressions. The requirement that
knowledge representation systems must dispose of a formal account of their meaning has been
To define the meaning of the primitives of knowledge representation languages, we shall
highlighted by several researchers. McDermott (1978) argues that any notation used in an artificial
construct recursive semantic functions. For such a construction to be valid it is necessary that the
intelligence system must have a denotation and that the reasoning in the system must be sound and
expressions in the language be freely generated from a given set of atomic expressions. It is also
preferably complete with respect to this denotation. Hayes (1977). Moore (1982) and more recently
necessary to use a property of term algebras called the unique homomorphic extension property.
These notions are introduced in the following definitions.
. Frisch (1985) have also emphasized the role of semantics in knowledge representation.
The system proposed in this thesis is provided with a semantic definition in chapter S. This
representation language. The model-theoretic approach is a very reasonable way of providing an
Definition 3.3. Homomorphism.
Given two l:--algebras A and B, a function h: A ~ B is a homomorphism iff:
external semantics for a knowledge representation system. in that the purpose of model-theoretic
(i) For every function symbol f of arity n > 0, for every <a), ...• an> E An,
semantic definition is a model-theoretic account of the meaning of the proposed knowledge
semantics is. to give external meaning to the expressions of a formal language. In the aim of making
this thesis self contained, we present in this chapter a brief introduction to the model-theoretic
h(fA(al, ...• an» : fB(h(aI), ...• h(an»;
(ii) For every constant c, h(CA) = cB. •
approach and we define a "classical" semantics for the three epistemological methods integrated into
the proposed architecture. The reader familiar with the model-theoretic approach would like. perhaps,
Definition 3.4. Subalgebra:
to skip this chapter and to go directly to chapter 4, where the proposed knowledge representation
A term algebra B=<B,
alphabet E, iff:
language is introduced. The presentation of the mathematical preliminaries and of the "classical"
J> is a
subalgebra of a term algebra A=<A, 1>, with the same ranked
(i)B sA;
semantics of the first-order logic is main Iy based on Gallier (1986).
(ii) For every constant C E E. CB = CA. and for every function symbol f of arity n > 0, fB : Bn ~ Bis
the restriction of fA : An
3.1. Preliminaries
~
A. •
In this section we introduce our notation and we present some results that will be needed later
on. In defining our knowledge representation language we need a standard set of symbols to name
Definition 3.5. Least Subalgebra Generated by a Subset.
operations taking a specified number of arguments. Such a set is called a Ranked Alphabet (or
Given a term algebra A and a subset X of A. the inductive closure of X in A is the least subalgebra of
Signature). The following definition formalize this notion.
A containing X. This term algebra is defined as follows: Let ([Xli)i ~ 0 be the sequence of subsets of
Definition 3.1. Ranked alphabet.
(i) [Xlo = X u I CA I c is a constant in 1: );
A defined by induction:
A ranked alphabet is a set E together with an arity function r: E ~
IN. Every symbol fEE has a rank
or arity r(f) indicating the fixed number of arguments of f. Symbols of arity zero are called constants.
For every n ~ O.
En denotes the subset of 1:consisting of the function symbols of arity n.
•
(ii) LXji+I = [Xli u IfA(aI, ..., an) I aj, ...• an E [Xj], f E
Let [X]
In. n ~ 1 )
= Ui ~ 0 [Xli. [X] together with restriction of the functions to LX) is a subalgebra of A. this
term algebra is denoted [X]. •
- 34
MODEL-TIlEORETIC SEMANTICS
CHAPTER 3
MODEL-TIlEORETIC SEMANTICS
CHAfYfER3
The meaning of the constructions used in the definition of the semantic functions is presented in
Definition 3.6. Subalgebras Freely Generated.
A term algebra IXl is freely generated by X in A iff:
(i) For every non constant f in :E. the restriction of the function fA : Am ~ A to [)(]m is injective.
the following definition.
(ii) For every fA : Am ~ Pt., gA : An ~ A with f, g E :E, f([x]m) is disjoint from g([x]n) whenever
Definition 3.7. Notation.
If ... then .. , else ... : the syntax used to designate a generic function Condl'T] : B x TxT
f"" g and CA ""dA for all constants c ""d.
(iii) For every fA: An ~ A with f E :E and every -oq , ...• xn>
E
[x]n, fA(XI•..., xu) E X.
•
""* T,
which receives a boolean value and two other values of type T and which returns one of the values of
type T depending of the truth value of the boolean parameter.
With the above definitions in hand. we can present the Unique Homomorphic Extension
Theorem. This theorem is the cornerstone of the model-theoretic semantics of formal languages,
let x = e in e' : a syntactic notation meaning that the expression e will be denoted x into expression
e '.
because it can be used to guarantee that once we have defined a semantic interpretation of a formal
A.XI ...Xn. e : a notation for an anonymous function of n arguments.
language, if the syntactic structures of this language are freely generated. then this interpretation is
<el •...• en> : a sequence of n elements.
unique up to homomorphism.
x== <xl> ..., Xn> : another notation for a sequence.
Theorem 3.1. Unique Homomorphic Extension Theorem.
1ti< si, ...• si •...• sn> == Si. if I ~ i ~ n• .is otherwise. A function to select an element of a sequence.
Let A and B be two :E-algebras, X a subset of A. let [X] be the least subalgebra of A containing X.
"J'[
x : a notation for XI, ...• Xn.
and assume that [X] is freely generated by X. For every function h : X
~
B, there is a unique
homomorphism G: [X] ~ B such that:
. (i) For all x
E
X, ~(x)
3.2. Knowledge Representation Formalisms
= h(x);
In this section, we present a "classical" semantics for the three epistemological methods
integrated into the proposed architecture: First-order logic, frames and semantic networks.
(ii) For every function symbol f of arity n > 0, for all <)'1, ...• Xn> E [x]n.
~(fA(XI, ..., xn»
IT ] : the double bracket is used for functions providing models for syntactical expressions. •
= fD(~(X I) •...• ~(xn», and G(CA) = CD, for each constant c.
•
3.2.1. First-Order Logic
In the following section, we define the semantic functions of three knowledge representation
'First-Order Logic was one of the first knowledge representation methods used in artificial
languages. We adopt a more informal way of defining the syntactic structure of our representation
intelligence. In this section we present the Tarskian Semantics of a first-order logic language without
languages: We use a Linear Syntax for purposes of clarity and brevity. A linear syntax consists of a
equality.
The alphabet of a first-order logic languages consists of two parts: a fixed part and a part that
set of expressions of the form:
depends on the intended application of the language, called the non logical part. The fixed part
<non-terminal> ::= <definition I> I .,. I <definitiona>
consists of the following sets of symbols:
Non-Terminals represent syntactic categories. The non-terminals are represented by uppercase
Greek letters (e.g. IT). If we need several instances of a non-terminal of the same category into some
exists) and
Logical connectives: 1\ (and), v (or),
Y
-r
(not), ~ (implication), ~ (equivalence),
3 (quantifier there
(quantifier for aU).
expression, we use the Greek uppercase leiter corresponding to this non-terminal with a natural
Variables: A countable infinite set V = [xj , x2, x3....
number as subscript (e.g. fit. fI2, ...). The meta-symbol "::=" assigns to the non-terminal at its left
Auxiliary symbols: "(" and ")"
I
hand side the alternative definitions at its right-hand side. these definitions are separated by the meta
symbol "I". Each definition is an expression constructed from other non-terminals or from terminals
The non logical part consists of a set L of symbols containing:
of the language. Every undefined symbol in a definition is considered as a terminal of the language.
The domain of the semantic functions are the syntactic categories of the language. The
syntactical categories corresponding to the non-terminals of the syntax are represented by the Greek
Function symbols: A countable, possibly empty set F of symbols and an arity function r : F ~
IN
assigning a nonnegative integer (called the ariry of the function) to every function symbol in F. The
letters associated to these non-terminal surrounded by curly brackets (e.g. to the non-terminal fI
set F can be partitioned into the sets Fo, Ft. F2, ... containing the function symbols of arity 0, 1.2.
corresponds the syntactic category (fI)).
etc. The set Fo is called the set of constants.
- 35 -
- 36
MODEL-THEORETIC SEMANTICS
CHAPTER 3
Predicate symbols: A countable, possibly empty set P of symbols and an arity function r : F -+
CHAPTER3
The following definition is necessary for the definition of the semantics of the first-order logic
IN
assigning a nonnegative integer t9 every predicate symbol in P. The set P can be partitioned into the
MODEL-THEORETIC SEMANTICS
language:
sets Po, PI, P2, ... containing the predicate symbols of arity 0, 1.2, etc.
Definition 3.9. Free and bound variables.
It is assumed that the sets V, F and P are disjoint. The sets of term and formula: of a first-order
language are defined inductively. Let the set
r
be the union of the sets V and F, and let r* be the set
(i) FV(Xi) = [xj ], for Xi e V;
(ii) FV(c) = 0, for c e Fo;
of aU strings constructed over r.
The formal way of defining a term is to introduce a set of functions Cr : (r*)n -+ r*, for every
function symbol f, such that. for all strings TJ, ... , Tn e
• Given a term T. the set FV(T) of Free Variables ofT is defined as follows:
r",
Cr<TI, ..., Tn) = f(TI ...., Tn), The set
of terms can be defined as the inductive closure of the union of the sets V and Fo of constants under
the constructors Cr,
In the following definitions, as stated above, we adopt a more informal way of defining the
(iii) FV(f(TI ...., Tn» = FV(TJ) U ..· U FV(Tn), for fe F n.
• Given a formula <1>. the set FV(<1» of Free Variables of <1> is defined as follows:
(i) FV(P(TI, ... , Tn» = FV(TI) U ... U FV(Tn), for P e P n;
(ii) FV(-' <1» = FV(<1»;
(iii) FV(<1>1 op <1>2) = FV(<1>I) U FV(<1>2), where op e ( /\, v, ::::), ~ }
syntax of our representation languages, but it should be noted that a formal definition based on the
(iv) FV( 3 x <1» = FV(<1» - (x)
inductive closure principle is always possible and is assumed as if it was stated. Next we define the
(v) FV(Vx <1» = FV(<1» - (x)
syntax of the first-order logic language.
• Given a formula F, the set BV(F) of Bound variables of F is defined as follows:
(i) BV(P(TJ, ... , Tn» = 0;
Definition 3.8. Syntax of the first-order logic language.
(ii) BV(" <1» = BV(<1»;
Formulae:
(iii) BV(<1>1 op <1>2) = BV(<1>I) U BV(~), where op e ( /\, v,::::),
<1>::=
Pn(TI, .... T n)
(iv) FV( 3 x <1» = FV(<1» U (x)
-'<1>1
(v) FV(V x <1» = FV(<1» U (x) •
~
}
<Ill /\ ... /\ <1>n
The semantics of the first-order logic language is based on the concept of a Logical Structure (or
<Ill v··· v <1>n
<IlI::::)~
<Ill ~~
3x<1>
simply a structure). A structure is essentially the concept of a term algebra defined above. A structure
I
I
M is a triplet M = <~, E, ~>, where ~ is a nonempty set called the domain of the structure-, E is a
function called the Environment Function and ~ is a function called the Extension Function. The set of
I
Vx<1>
all structures is denoted LS (we can only define the set of all structures because we restrict ourselves
Terms:
to a unique domain set :Il). The environment function assigns a function in the domain for every
T::=
x]
function symbol in F and the extension function assigns a relation in the domain to every predicate
Cl>n (TI, .... Tn)
•
We state the following theorem without a prooft:
symbol in P.
E: ( CPn ) -+ [~n -+ ~]
~:
( Pn
) -+ ~n
Theorem 3.2. The sets of terms is freely generated from the variables and constants. The set of
formula: is freely generated from the atomic formulas, I
Since a formula may contain free variables. its meaning depends on the assignment of variables
to values of the domain. These assignments are introduced through a Variable Map. A variable map is
a function associating each variable to an element of the domain. The set of all variable maps is called
VM = ( v I v is a variable map ).
.
1For a complete formal presentation of the syntax and semantics of first-order logic languages and the necessary
mathematical background see Gallier (1986).
2We assume that the set ([) is unique. This is totally general, because we can include in this set all the necessary
elements of the domain.
MODEL-TIlEORETIC SEMANTICS
CHAPTER 3
MODEL-TIlEORETIC SEMANTICS
CHAPTER 3
Definition 3.10. Satisfaction. Validity, and Model.
v :V~
m
Given a first-order logic language and a structure M.
(i) Given a formula cI> and an assignment v, we say that M satisfies «II with v iff
J[ «II ] M v = True
We note v[x/d] the variable map defined as 'A.y. ir y = x then d else v(y). Given a Structure
This is also denoted by
M, the variable map can be extended to terms:
M, v ... cI>
m
(ii) A formula cI> is satisfiable in M iff there is some assignment v such that
t[ x ] M v = vex)
t[ 4>n(Tt, ...• Tn) ]Mv=E(4)n)
J[ cI> ] M v = True
A formula cI> is satisfiable iff there is some M in which «II is satisfiable.
(iii) A formula cI> is valid in M iff for every assignment v
J[ cI>] Mv = True
t : (
T ) x LS x VM ~
«r T\ ]Mv..... d
r,
]Mv)
The meaning of the formula: is define through an interpretation function associating each first
order logic formula to an element of the set T = ( True. False) of boolean values. For this function
This is also denoted by
to be a unique definition of the meaning of these formula: we must use the theorem 3.1, and to fulfill
M ...
the conditions of this theorem we must use theorem 3.2 where it is stated that the terms and the
In this case. M is called a model of «II. A formula is universally valid iff it is valid in every
cI>
formula: are freely generated. Having established the formal conditions for our definition to be sound,
structure M.
we proceed, using a less formal notation. with the definition of theinterpretation function. This
This is denoted by
... «II
function is defined as follows:
(iv) A set
J:
{cI>} x LS x VM
1
r of formula: is satisfiable iff there exists a structure M and an assignment v such that
M, v 1= «IIi for every formula «IIi E F;
T
A structure M is model of r iff Mis a model of every formula in
J[ P n (T\, ..., Tn) ] M v = ir <t[ T\ ] M v•..., d Tn ] M v>
E
~(Pn) then
M ... r
True else False
The set
J[ ., cI> ] M v =
tr J[ cI> ] M v then False else True
1\ ... 1\
e, ] M v = ir J[ cI>\ ]
M v lind ... and J[ cI>n ] M v then True else False
J[ cI>\ v·.. v cI>n ] M v = ir J[ cI>\ ] M v or ... or J[ cI>n ] M v then True else False
r
is valid iff M ...
(v) Given a set of formula:
i
J[ cI>\
r. This is denoted by
rr.
r
for every structure M. This is denoted by 1=
r.
r and a formula cI>, cI> is a semantic consequence of I', denoted r
1= cI>
for every structure M and for every assignment v,
ir M. v ... cI>j for every formula cI>i E
r
then M, v ... cI> •
Two important results, concerning the algorithmic methods for testing whether a first-order
logic formula is valid or not, represent the reasons underlying the usefulness of logic as a knowledge
J[ cI>\ ::::) cI>2 ] M v = ir J[ cI>\ ] M v implies J[ cI>2 ] M v then True else False
J[ cI>\
~
cI>2 J M v;: ir J[
cI>\
I M v iff J[
cI>2 ] M v then True else False
representation method and also its limitations. The first, due to Godel, is a positive result.
Theorem 3.3. Godel's Completeness Theorem.
There are logical calculi in which every true formula is provable. Such proof systems are called
J[ 3 xcI>] M v = ir there exists d
J[ V xcI>] M v = ir for all d
E
E
m, J[ cI> ]
m, J[
M v[x/dl then True else False
cI> ] M v[x/dlthen True else False
We can now present the notions of Satisfaction, Validity, and Model, These notions are
introduced in the following definition.
Complete Proof Systems. I
The second result is due to Church and it is a negative result.
MODEL-TIIEORETIC SEMANTICS
CHAPTER 3
MODEL-lHEORETIC SEMANTICS
CHAPTER 3
Theorem 3.4. Church's Undecidability of Validity.
and <1..> represent the bottom concept and role. The operator > represents negation. The operators n
There is no decision procedure for deciding whether a formula is valid, i.e. any algorithmic procedure
and u represent conjunction and disjunction, respectively. The primitive 'v'P: X corresponds to the
for testing whether a formula is valid must run forever when given certain non-valid formule as
input.
KRYPTON (Brachrnan et al., 1983) primitive (ALL P X), restricting the values of the role P to be
contained in the concept X. The meaning of this primitive can be rephrased as: "All entities such that,
I
if they have property P, then this property takes its values in the concept X". Analogously, the
primitive :3 P : X corresponds to the primitive (SOME P), where a restriction has been added to the
3.2.2. Terminological Languages
Terminological languages are an abstraction of several notions originated in the research on
relation P. The meaning of this primitive is: "All entities which necessarily present property P with
frames and on semantic networks. Terminological languages allow the definition of a terminology
values taken from th~ concept X". The primitive P : X corresponds to the KRYPTON primitive
consisting of concepts and roles. The concepts are defined by restricting,. with the aid of a set of given
(RESTR P X) and represents the sub-relation of P with values taken from the concept X.
primiti ves, the possible values of the roles related to them.
The chosen language is a generalization of the language ',J£ introduced by Brachman and
algebra presented above. We define a Terminological Structure (or simply structure) as a triplet
Levesque (1984). The syntax of this language is presented in the following definition.
The semantics of this language is also based in a structured derived from the notion of a term
M = <~, E, ~>, where ~ is a nonempty set called the domain, E is the environment function and ~
is the extension function. The environment function associates to each concept a subset of the domain
Definition 3.11. Syntax of terminological language.
and to each role symbol a binary relation over the elements of the domain. Extension functions allow
Concepts:
to construct extensions for concept and role descriptions based on the values associated to the
X ::=
c I
primitive symbols occurring in them. The set of all terminological situations are called TS. The
*I
signatures of the environment and extension functions are the following:
..1.1
E : ( c ) -+ 2:tl
"'X
E : ( r ) -+ 2:tl x:tl
XI n ..· n Xn
XI U ... U Xn
~ : ( X ) -+ 2:tl
~ : ( P ) -+ 2:tl x:tl
'v'P:X I
:3P:X
The extension function is specified through a set of constraints.
Roles:
P::=
r
• Constraints on the extension functions of concepts:
I
~[
<.> I
<..1.> I
c] ==E(C)
~[ • ] == ~
"'PI
PI n ..· n P n
~[..1.] == 0
PI u ... u Pn
P:X
~[ .., X ] == ~ - ~[ X
Questions:
e ::=
I
XI::::J Xz I
PI::::J Pz I
~[ XI n ... n X n ] == ni=I, ....n ~[ Xi ]
XI=X.2 I
. PI = Pz •
~[ XI u ... u Xn] == Ui=I,....n ~[ Xi]
The meaning of the description primitives of the language is the following: The symbols • and
~[ vr . X] == ( x I for all y E ~, <It, y> E ~[ P ] ~ Y e ~[ X] )
<.>, represent the universal concept and the universal role respectively. Analogously, the symbols..l
- 41
- 42
MODEL-TIIEORETIC SEMANTICS
1;[ 3 P : X ] ;: ( x I there exists y E ID, ex, Y> E 1;[ p]
1\
CHAPTER 3
Y E ~[ X ] )
MODEL-TIIEORETIC SEMANTICS
CHAPTER 3
<concept> ::= <atom> I
(AND <concept>") I
• Constraints on the extension functions of relations:
1;[ r]
(ALL <role> <concept» I
(SOME <role»
'" e(r)
<role> ::= <atom> I
(RESlR <role> <concept»
1;[ <*> ] ;: IDxID
1;[ <.1> ] ;:
-The language :JL- referred to in the first result is the same language except for the primitive
0
RESlR that is deleted from the language. The results are the following:
1;[ ., P ] ;: IDxID - 1;[ P ]
1;[ PI
n ... n Pn ] ;: ni=I .....n ~[ Pi]
~[ PI
U ... U
Theorem 3.5. Subsumption for the language :JL- can be calculated by an algorithm with
complexity O(n 2) in time. •
Theorem 3.6. Subsumption for the language :JL is co-NP-complete. I
P n ] ;: Ui=l .....n ~[ Pi]
1;[ P : X ] ;: ( -cx, Y> I <x, y>
~[ P
E
J 1\ Y E
~[ X ] )
These results rise two conclusions: Subsumption in tenninologicallanguages is very sensitive
to the expressiveness of the language and even a very simple tenninologicallanguage can have a co
Making use of the semantic definition of the language, we can introduce the notion of
NP-complete subsumption problem. Three other results help to clarify the characteristics of the
subsumption. Intuitively one concept subsumes another if all entities belonging 10 the latter also
complexity of the subsumption problem. The first is due to Nebel (1988) and it concerns the
belong to the former. This notions can be extended to roles. The subsumption relation can be used to
classify concepts and roles and also to test disjointedness and equality.
complexity of the subsumption problem in the language :JL- extended with primitives allowing to
express numerical restrictions on the number of role fillers,
To define the subsumption relation we introduce an interpretation function mapping
subsumption and equality questions into the set T of boolean values.
:1': ( e) x TS
:1'[
x,
::J
~
T
Theorem 3.7. Subsumption is co-NP-hard in the strong sense-' for any terminological language
with the expressive power of :JL- extended by ATLEAST, ATMOST and the possibility to express
that there are at least a certain number of role fillers of a certain concept. I
X2 ] M ;: if 1;[
x, ] ~ ~[ X2 ]
then True else False
The next result is due to Schmidt-Schauf (1988) and concerns the complexity of the
:1'[ PI::::l P2 ]
M ;: if
1;[ PI ]
2
1;[ P2 ] then True else False
subsumption problem for a language called KL-ONE· which is a subset of the language implemented
in the KL-ONE system. This language allows the negation of concepts, being slightly more
:1'[
x, = X2 I M
:1'[ PI = Pz ]
;: if 1;[ XI ] =
M ;: if
1;[ X2 ] then True else False
1;[ PI ] = ~[ P2 ] then True else False
Five important results about the complexity of algorithms to calculate the subsumption relation
should be mentioned. The first two result are due to Brachman and Levesque (1984) and concerns the
subsumption relation of a simplified terminological language called :JL. this language is a subset of
the language presented above and is described by the following linear syntax:
_ L1~
expressive that :JL (although it is also a subset of the language presented above).
Theorem 3.8. Subsumption in KL-ONE* is undecidable.
I
The final result is a very recent one, and is due to Patel-Schneider (l989b). It concerns the
complexity of the subsumption problem for the language NIKL. This language. besides the usual
operators of the :JL language, also contains restrictions on the number of role fillers, an inverse
3When a problem involving numbers (the number restrictions on Role fillers in the case of the considered language) is
proved to be (co-)NP-hard, it might still be lraclable in a weak sense: Solvable by an algorithm with pseudo-polynomial
complexity (Garey and Johnson. 1979), i.e. it can be solved in time proportional to the numbers appearing in the
problem description. If this possibility is ruled out. we say that the problem is (co-)NP-hard in the strong sense:
44
MODEL- THEORETIC SEMANTICS
CHAPTER 3
CHAPTER 3
MODEL-THEORETIC SEMANTICS
operator for roles, and a role composition operator. It is used as the terminological module of the
default logic. This logic is also the base of the semantics defined by Touretzky (1984) for semantic
system KL-lWO (Vilain, 1985).
networks.
Theorem 3.9. Subsumption in the NIKL terminological language is undecidable. I
presented in section 3.2.1 as the base for our default logic. We assume all the syntactic and semantic
Default Logic is an extension of the first-order logic. We should consider the first-order logic
definitions related to this logics as stated.
The solutions to face these facts are either to restrict the expressiveness of the language in such
a way to obtain computationally tractable algorithms or to accept incomplete algorithms with all the
semantic problems that can arise when we use such algorithms. A third way is to use an expressive
A Default is an expression of the forrrr':
A(x) : BI(X), ...• Bm(x)
w(x)
language and to define a non classical semantics, less intuitive than the usual Tarskian semantics, but
able to assure the tractability of the subsumption problem. This last solution, initially proposed by
Patel-Schneider (1986b), has been adopted in this thesis.
where A(x), Bi(X). and w(x) are all first-order logic formula: whose free variables are among those
in x = Xl ..... xn. A(x) is the Prerequisite. and w(x) is the Consequent of the default. The Bi(X) are
called the Justifications of the default. A default is closed if none of A(x), Bj(x), and w(x) contain
3.2.3. Semantic Networks
free variables.
Semantic networks have been used as a knowledge representation method since the early days
Defaults presenting only one Bi are called Normal Defaults, if B(x) = w(x). and are called
= w(x) 1\ C(x) for some C(x). Almost all defaults used for knowledge
of artificial intel1igence. Many different syntaxes and semantics have been proposed for semantic
Seminormal Defaults. if B(x)
network systems. We limit ourselves to the analysis of semantic networks as a tool for representing
representation are of one of these two types.
inheritance of properties. The adopted syntax is based on the work of Etherington and Reiter (1983)
A Default Theory is a pair <D, W> where D is a set of defaults and W is a set of closed first
and contains seven types of links. This syntax is chosen because the sets of links provided by almost
order logic formulse. Besides the usual first-order logic inference rules, in default theories, defaults
all other semantic network systems are subsets of Etherington's link set.
are used as rules of inference or conjecture. These inference rules allow to conclude their consequents
The syntax is presented in the following definition.
if their prerequisites are known and the negations of their justifications are not provable. If these
justifications are denied at some future time, the consequents should be revised. The fact that new
Definition 3.12. Syntax of the Semantic Network Language (the text following the ";" consists of
information may invalidate previously derived conclusions establishes the nonmonotonic character of
comments)
default inference rules.
Nodes:
N "=
The theorems of a default theory are defined by a fixed-point construction. This construction is
al
; primitive objects
x
; classes
a ee x I
; membership
Let D = <D,W> be a closed default theory. For any set of first-order logic formula: S,let T(S) be the
; strict IS-A
smallest set satisfying the following properties:
(i) W~
introduced in the following definition.
Links:
A "=
Definition 3.13. Default Logic Extension.
Xl ~x2
I
a =P x I
XI
=P X2 I
; strict IS-NOT-A
(ii) I'(S) is deductively closed, denoted Th(r(S» = T(S);
(iii) For each default
XI ~x2
I
; default IS-A
-It x2
I
; default IS-NOT-A
xj
X "~
A
rrs»
; nonmembership
A(x) : BI(X).... , Bm(x)
w(x)
; exception link •
Etherington (1982) presents a semantics for the above language based on Default Logic(Reiter,
1980). This semantics is important because it was the first sound semantic approach proposed to
if A
E
E
D,
I'(S) and" BI, ..., ., B m l!' T(S) then w
E
T(S).
define inheritance with exceptions. Before presenting this semantics, it is necessary to introduce the
4Following Etherington (1987) we omit the symbol "M" preceding each of the Hi. The status of "belief' of these
formula: being implicit in lheir position.
- 45·
- 46
MODEL-TIffiORETIC SEMANTICS
CHAPTER 3
CHAPTER 3
MOOEL-lHEORETIC SEMANTICS
A set of closed first-order logic formula E is an Extension for D iff F(E) = E. i.e. iff the set E is a
fixed point of the operator r.
+
S[
x --~ A ] = if A
An extension can be thought of as a set of beliefs which are justified in light of what is known
if A
=xj -7 X2 then S[ Xl -7 x2 ]
= xj -h X2 then S[
about the world. The restrictions for a formula to belong to an extension are analogous to those which
= <{
x l (V) : X2(V) /\., x(v)}
X?(v)
• 0> else
Xl -h X2] = < {xl(V) : ., X2(V) /\ .. x(v) } 0>
., X2(V)
•
define the theorems of a first-order logic. this implies that extensions are both grounded and
complete. One problem with extensions is that default theories can have many different extensions.
This semantics presents the property that all acyclic networks correspond to ordered theories.
only one or none. No syntactical characterization of default theories having or not extensions are
but only if all the seven links are used. Most semantic network systems allow less link types, fo:
known. but there are some sufficient conditions which guarantee the existence of extensions.
• A theory with no default has a unique extension.
these systems the above semantics can generate theories with several different extensions. The explicit,
exception links (x .. ~ A) are redundant: The necessary information about the exceptions is already
• Any theory containing only normal defaults must have at least one extension.
present in the IS-A and IS-NOT-A links. These exception links are seldom permitted in semantic
• Any ordered seminormal default theory has at least one extension.
network systems and, when they are present, they are automatically generated in a preprocessing step
The last condition is the less restrictive and the most useful condition. It mentions ordered
to allow the inheritance algorithm to produce the desired results (Fahlman et al., 1981). Another
seminonnal theories. The defmition of an ordered theory is very technical but intuitively an ordered
problem with the exception links is that their semantic interpretation causes the change of the semantic
theory has no potentially unresolvable circular dependencies. The problem of deciding whether a
interpretation of a different link. in this way each time a new exception is added to the network the
formula belongs to an extension of a given theory is generally not semidecidable, but Etherington
semantic interpretation of an already present link should be changed. Because of this the semantic
(1982) presents a procedure which can generate all the extensions of an arbitrary finite default theory.
interpretation of links is not local: In different networks the same link can have different semantic
interpretations.
A finite theory consists of finitely many variables. constant symbols, predicate letters, and defaults.
Etherington defines a semantics for the semantic network language presented above using the
Touretzky (1984) proposes a solution for this situation with the notion of Inferential Distance.
default logic formalism. The basic idea is to establish a correspondence between the semantic
The language used by Touretzky contains only defeasible links and their semantics uses only normal
defaults:
networks and a default theory. Each primitive object is associated to a logical constant. each class in
the network is associated to an unary predicate and inheritance is associated to correct inference in the
default theory. In this way. an individual a inherits the properties Pl ..... Pn if and only if PI (a)....,
~[ x i
-7
!;[
-h x2 ] = <{ xl(V) : .. X2(V) }.0>
X2] = <{ Xl(V) : X2(V) } 0
X2(v)
• >
Pn(a) belong to a common extension of the default theory.
The semantic function
S associates
each link in the language to a default theory. the
xi
., X2(V)
interpretation of a network is the union of the default theories of all its links.
S: ( A ) -7 (
<O.W>
The inferential distance is a partial order over the defaults representing an inheritance hierarchy.
I
S[ a =) ~ I = <0. ( x(a)
To define this partial order. let OJ and OJ be the following defaults:
}>
S[ xj x2 ] = <0. ( Vv. Xl(V) ~ X2(V) }>
S[ a=p x I =<0. ( .. x(a)}>
=)
1;[ Xl =p x2 ] == <0. ( Vv. Xl(V)
-7 ..
OJ =
P(x) : PI(X) and OJ
Pl(X)
Q(x) : Q,(x)
Ql(X)
x2(v) }>
We say that OJ < OJ. according to the inferential distance. if and only if there is a default
1;[ XI -7 X2] == <{ Xl(V)X2(V)
: X2(V) } 0
,>
D = P(Xb(xq(X) or there is another default Ok such that OJ < Die and-Dj, < OJ-
1;[ Xl -h X2] == < {xl(V) : ., X2(V) }.0>
network are supponed by proof sequences consisting of defaults. According to the definition above
The conclusions contained in each extension of a default theory associated to a semantic
.. X2(V)
when OJ precedes OJ in some proof sequence. then OJ < OJ- We can extend the above partial order to
proof sequences considering that a sequence Sj < Sj if and only if the maximal default in Sj is less
than the maximal default in Sj. Now we can use the ordering of proof sequences. as a filter over the
48
MODEL- TIlEORETIC SEMANTICS
CHAPTER 3
set of possible extensions: We reject as invalid any extension in which a conclusion depends on a
proof sequence Sj such that there is a contradictory sequence Sj < Si.
MODEL-TIlEORETIC SEMANTICS
CHAPTER 3
Definition 3.1S. Skeptical Inheritance.
Let r be a network.
This new semantics also presents the property that every acyclic inheritance network has a
(i)
constructible finite extension. The use of only two types of links and the absence of exception links
(ii)
r
1= n iff" E r
Let degr{ll) = n, and consider settled whether r 1= 11' for all path 11' such that degr{Il') < n.
I. if 11 = XI -+ X -+ Xn-t -+ Xn then
makes this semantics a better proposal than the previous one.
A different approach to the defmition of multiple inheritance reasoning in semantic networks has
theory leads always to a unique extension. Differently of other approaches, the skeptical theory is
(b) Xn-I -+ Xn E
(c) XI ~ Xn E r
based on a bottom-up approach to inheritance reasoning. This allows an inductive definition of
(d)
been proposed by Horty et al. (1987). Their approach is called Skeptical Theory ofInheritance. This
preempted in a network when this network provides the materials for constructing a conflicting
V x', r
r
1= Xl
-+ x' -+ x' with x' -it xn e F, 3 x", x" -+ Xn E
2. if 11 = x I -+ X -+ xn_1 ~ Xn then
r
such that:
r
r
such that:
1= 11 iff
(a) r 1= XI -+ X -+ Xn-I
argument based on more specific information. This is based on the intuition that arguments based on
(b) Xn-I ~ X n e
more specific information should be allowed to override arguments based on less specific
(c) XI -+ Xn E
information.
(d)
To define the skeptical theory of inheritance, we should before introduce some preliminary
1= 11 iff
x" = XI or r 1= Xl -+ XI -+ x" -+ X2 -+ x'
inheritance. The central idea of the theory is the notion of Preemption. Preemption is a technical
definition of when one path in a hierarchy should neutralize another. Roughly a path will be
r
(a) rl= XI -+ X -+ Xn-I
V x', r
r
r
1= XI -+ x'
-+ x' with x' -+ Xn e F, 3 x", x" ~ Xn E
x" = XI or r 1= XI -+ Xl -+ x" -+ X2 -+ x' •
definitions.
Definition 3.14. Preliminary definitions.
A Network, denoted T, is an acyclic graph with two types of edges: The Positive Links, denoted
,,+ = XI -+ X2, and the Negative Links, denoted ,,- = XI
~
A Positive Path is a path consisting only of positive links: x
X2
=XI -+ X2 -+ ...-+ Xn-I -+ Xn
Besides the property of generating only one extension, the skeptical inheritance presents some
interesting properties: (i) The reasoner is sound in the sense that it supports simultaneously XI -+ X2
and XI ~ X2 only if both XI -+ X2 and XI ~ X2 belong to the inheritance network. (ii) The reasoner is
stable with respect to redundant atomic statements, i.e. given an atomic statement ", if a network
supports", then for any statement n', r u {,,} supports n' if and only if T supports n'.
The skeptical inheritance strategy is adopted in this thesis, but its semantics is defined using a
An Inheritance Path is a path of the form: 11 = XI -+ X2 -+ ...-+ Xn-I -+ Xn or 11 = XI -+ X2 -+ ... -+
Xn-I ~ Xo
recursive defmition based on the four-valued semantic approach.
A Generalized Path is a path consisting of any type of link in an arbitrary order.
The Degree of an Inheritance Path is the length of the longest generalized path in T from the initial
3.3. Four-Valued Semantics
node of IJ. to its end node. The degree of the path 11 in network r is denoted degr{Il). •
r
In the previous section, we present a possible semantics for three of the most commonly used
knowledge representation formalisms. This semantics is based on a model-theoretic approach. The
With these definition in hand, we can define the skeptical inheritance, denoted 1=, inductively
problem with this semantics is that the algorithms for the inferences associated to the different
on the degree of paths. This is done in two Steps: Initially we defme the basis clause for the induction
formalisms are in general intractable. To obtain a tractable algorithm we can simplify the
and next we define by cases the inductive clause. More formally:
representation language or rise the completeness requirement. Simplifying the language means
loosing expressive power and is not a good option from an artificial intelligence point of view.
Incomplete algorithms can be fast but their answers have not a well understood meaning: We cannot
formally describe which answers we can obtain and which we are loosing.
A third solution is to define a Weak Logic, whose semantics guarantees the tractability of the
algorithms even when adopting the completeness requirement with respect to this new semantics.
This solution is adopted in our work. It was first proposed by Belnap (1975 and 1977), his four
valued logic has a less intuitive semantics but the entailment relation in this logic can be made
decidable. In this section, we introduce the four-valued logic approach.
- 49
- 50
MODEL-TIIEORETIC SEMANTICS
CHAPTER 3
CHAPTER 3
MODEL-TIiEORETIC SEMANTICS
Belnap proposed his four-valued logic as a basis for a question-answering system able to
obtained from a variety of different sources all of which, although not completely infallible, is
These truth values can be interpreted as follows: ( T ) - positively true, ( F ) - positively false,
0- ignorance and I T, F ) - inconsistency. This set of truth values naturally forms a lattice under the
supposed on the whole trustworthy, This means that the system would have to cope with incomplete
lattice-ordering "approximates the information in", and it is indeed a complete lattice according to the
and, perhaps, contradictory information. The idea is that the system continues to reason correctly
definition above where the partial order is the set containment relation. This lattice, called the A4
even in the presence of contradictions, discovered or not, besides that, the system should report any
lattice, is showed in figure 3.1. We denote its partial order by SA4.
perform some kind of deduction. In the situation proposed, the knowledge available to the system is
discovered contradiction. In classical logic, contradictions infect all knowledge base, allowing the
{ T, F}
reasoner to deduce anything, thus the use of an alternative semantics: The four-valued semantics.
The mathematical foundations of the four-valued approach is manly based on the ideas of Dana
/'"
,,/
Scott and Christopher Strachey (Stoy, 1977) about the theory of lattices. In the following definitions,
we introduce the some notions of the lattice theory that would be used in the description of the four
{T}
valued semantics.
Deflnltion 3.16. Complete Lattices.
e
Given a set A and a partial order SA on the elements of A, we say that the set ~ forms a complete
lattice with respect to the panial order SA iff "IX ... A, there exist the greatest lower bound of X, n X
E
A, and the least upper bound of X,
U
X E A. •
A complete lattice A is called an Approximation Laitice if it satisfies, besides the mathematical
definition of a complete lattice, a further, nonrnathematical condition: It should be appropriate to read
x SA y, as "x approximates y".
{F}
Fig. 3.1. The Lattice A4 of Truth Values
In the case of finite lattices, like the lattice A4, the continuous functions are simply monotonic
functions, i.e. functions f such that x !iO y ~ f(x) ~ f(y). Given this information and the above
approximation lattice, we would like to define the meaning of the four-valued logic connectives as
The interesting function between two complete lattices are the continuous functions, i.e. the
function that preserve non-trivial directed unions. Noncontinuous functions violate the nature of
monotonic functions from this lattice into itself. i.e. functions from an n-tuple of truth values to a
truth value: t : A4 n -t A4. The partial order ~A4 can be component-wise extended to order n by
complete lattices as approximation lattices (Belnap, 1975 and 1977). Continuous functions can be
the following rule:
formally defined as:
a SA4 P, where a
= <at, ..., an»
and P
= <PI, ..., Po>, iff ai SA4 Pi for all i = I,
..., n.
Deflnitlon 3.17. Continuous Functions.
Given two approximation lattices A and A', a function f: A -t A' is continuous if
feu X) = u
I f(x) I x EX} for all directed X 'i A, where we say that a set X is directed if every
finite subset of X has an upper bound in X..•
To defme the functions associated to the logic connectives, the following rules are applied:
• The four-valued truth tables should be an extension of the classical truth tables, i.e. the values of the
logic connectives on the classical two-values (T and F) should be the same as in the classical logic.
• The logic connectives should be monotonic functions.
In the proposed question-answering program, each item the program is told to be true is marked
with a truth symbol (T for instance), and each item told to be false with a falsity symbol (e.g. F). As
the input comes from different sources it is possible that some item ends up marked with both T and
F. We suppose also that items not told to be neither true nor false are marked with the Don't know
symbol (e.g. 0). This leads to a set of truth values consisting of the power set of the usual set of two
• The following ordering relations should be satisfied by the four-valued
A 1\ B = A iff Av B = B
A
1\
B
1\
and v connectives:
= B iff Av B = A
The two first rules are quite intuitive, the third rule, although arbitrary is equivalent to other
choices of relations between logic connectives. These rules applied in the order shown are not enough
truth values:
to complete all truth tables of the logic connectives, but if we apply the nonmonotonicity rule after
$ = 2T = 21
T, F
J = I IT, F
J, IT J,
IF J, 0
J
- 51
applying the third rule we can fill in all the truth tables.
- 52
MODEL--TIlEORETIC SEMANTICS
CHAPTER 3
CHAPTER 3
MODEL-TIlEORETIC SEMANTICS
Below, we present the complete truth tables for the logic connectives .., 1\ and v. Each box in
1\
the tables presents a different pattern according to the way it was filled in. The meaning of the pattern
e
is presented in figure 3.2.
o
Truth table
~
Monotonicity
o
o
{T,F
Fit between "and" and "or"
Fig. 3.4. The AND connective
Monotonicity after the fit between "and" and "or"
V
Fig. 3.2. The Rules for Filling in Truth Tables
e
The simplest logic connective is the NOT (.. ) function, its truth table can be extended to the
four-valued case using only the monotonicity rule. For example, we know that 0 S;;A4 (F ), by the
(F
e
( F)
( T ) (T,F)
,,,
~ fJ ~ fJ~ .('T')' ( T )
""""
P?':?9'1?
(F) ( T )
)rE]
,,,
( T ) :{. ~ J ( T )
,,,
monotonicity rule we must have that .. 0 !&A4 .. (F ), i.e... 0 S;;A4 (T ). This implies that the
~
only possible value for" 0 is 0. Analogous arguments lead to the value of" (T, F). The truth
{T,F ( T )
table of the connective" is presented in figure 3.3.
Jl;!l
(T) 1." ~" "J:"
,,,,
,,,
{T,F) '{ 'T' f {T:'F}'
" " ,'"
Fig. 3.5. The OR connective
,
The rules used to extend the truth tables of the logic connectives to the four-valued case,
although theoretically sound are not very intuitive. Using the question-answering program
Fig. 3.3. The NOT connective
abstraction, we can provide a much more intuitive ground for this extension. Consider a program
and OR (v)
which has been told ~at a certain set of atomic propositions are truth and that a different set, not
necessarily disjoint, of propositions are false. The behavior of the program consists in marking the
function s. To fill in all the boxes we must invoke the third rule. For example, for looking at the truth
table of 1\ extended using the monotonicity rule, one can see that T is an identity element, i.e.
propositions with (T ), ( F ) or (T, F ) according to what it has been told. The question is: What
The monotonicity rule is not enough to complete the truth tables of the AND
(1\)
A 1\ T = A, for all A. So if conjunction and disjunction fit together according to the third rule, we
should the program answer in the case ofa nonatomic propositional question? An intuitive way of
deciding this is given by the rules below:
must have A v T = T, for all A. This can be used to fill in two boxes of the v table. Similar
arguments allow to fill all boxes except the two comers in each table. To fill up these last two boxes,
we mu st invoke the monotonicity rule on the partially filled in tables. The truth table of the 1\
connective is presented in the figures 3.4, and the truth table of the v connective is presented in the
figures 3.5.
• .. A should be answered with at least a F if A should be answered with at least a T, and should be
answered with at least a T if A should be answered with at least a F.
•A
1\
B should be answered with at least a T if both A and B should be answered with at least a T,
and should be answered with at least a F if one of A or B should be answered with at least a F.
• A v B should be answered with at least a T if one of A or B should be answered with at least aT,
and should be answered with at least a F if both A and B should be answered with at least a F.
These three rules are enough to complete all the truth tables of the
give results equivalent to the more theoretic approach presented above.
- 53
- 54
1\,
v and" connectives, and
MODEL-TIIEORETIC SEMANTICS
CHAPTER 3
The truth tables for the logic connectives extended to the four-valued case form a complete
lanice, the L4 lattice, with conjunction as meet and disjunction as join. The partial order of this lattice
MODEL-TIIEORETIC SEMANTICS
CHAPTER 3
false to the false. Given the definition of entailment, we finally have a Logic., i.e, a canon of
inference to use in making inferences involving conjunction, disjunction and negation.
is denoted lOlA. This lattice is presented in figure 3.6.
A proof-theoretical account of the above logic can be presented. The group of principles below
{T }
has been proved to be semantically valid and complete. For reasons of clarity and usefulness, it is
also redundant. Let A ~ B signify that A entails B, and A H B signify that A and B are semantically
o
/'"
{ T,
equivalent.
AI A ... A An -t BI v··· v B m, provided 3 i, Ai =
F}
,,/
{ F }
(A v B)
A
~
~
C iff A
~
C and B
~
B],
C
(B A C) iff A -t B and A -t C
A -t B iff ., A -t ., B
AvBHBvA
AABHBAA
Fig. 3.6. The Logical Lattice L4
A v (B v C) H (A v B) v C
A A (B A C) H (A A B) A C
The lattice L4 can be used as the base of a model-theoretic semantics for a propositional logic
A A (B v C) H (A A B) v (A A C)
. language allowing the A, v and ., connectives. This semantics is defined in the usual way: Let S be a
A v (B A C) H (A v B) A (A v C)
v : V -t :II a variable map. and
(B v C) A A H (B A A) v (C A A)
an arbitrary set-up. We can extend the mapping t to all propositional sentences in P,
(B A C) v A H (B v A) A (C v A)
set of propositional symbols, V a set of variable symbols,
t :S ~
:1\
compounded from variables, propositional symbols, negation, conjunction and disjunction, in the
standard inductive way:
t:P~:I\
""AHA
., (A A B) H
.,
A v ., B
... (A'v B)
.,
A
if A
~
H
B andB
A .,
~
B
C,lhen A -t C
if A H Band B H C. Ihen A H C
t[ A ] v = t[ A I, for all A e S
t[ x ] v =v(x), for all x e V
t[ ... P ] v = ., t[ P ] v
A -t B if A H (A A B) iff (A v B) H B
t[ PI A ... A P n ] v = t[ PI Dv and ... and t[ P n ] v
t[ PI v··· v Pn ] v = t[ PI ] v or .., or t[ P n ] v
program based on it to cope with contradictions. In this logic the following expressions are NOT
The logic above present two important properties which would help a question-answering
valid:
Given the above semantics, we can define the notion of Entailment. We say that the sentence A
AA"A-tB
entails the sentence B just in case for all variable maps and for all set-ups, the value of A does not
A-tBv"B
exceed the value of B in the L4 lattice, that is:
On the other hand, the well known Modus Ponens inference rule is invalid, i.e. in this logic the
v v, V t, t[ A ] v 5lA t[ B ] v
This definition has the intuitive properties of preserving truth, the entailment relation never leads
expression below is also NOT valid:
(A v B)
A .,
A -t B
from the true to the absence of true, and preserving nonfalsity, never leads from the absence of the
- 56
MODEL-TIIEORETIC SEMANTICS
CHAPTER 3
Until now, we suppose that set-ups mapping propositional symbols into truth values are
enough to represent the knowledge state of the question-answering program, but if we allow the user
MODEL-TIIEORETIC SEMANTICS
CHAPTER 3
We can associate to each formula two special elements of E that characterize the formula. For
each formula A, we define the truth-set of A and the/alsity-set of A as follows:
to input not only atomic sentences but also composite sentences, like A v B 1\ C, these set-ups are not
enough anymore. The standard way of represent such knowledge states is to use a set of set-ups, or
Tset(A) = ( tiT EAS t[ A ] )
an Epistemic State. Given SU the set of all set-ups, we define an epistemic state as a nonempty
collection of set-ups, i.e, E c;; SU and E 0. Let E be the set of all epistemic states. If the present
Fset(A) = ( t I F EAS
tl
A] )
*"
state of knowledge is represent by the epistemic state E, then the world is accurately, but perhaps
incompletely, described by at least one tEE.
The value of a sentence in an epistemic state can be defmed using the lattice theory. Let A be a
sentence and E an epistemic state, then the value of A in E, denoted E(A) is:
The goal of all these definitions is to provide the theoretical foundations for the definition of the
meaning of a nonatomic formula as input. Considering that the knowledge state of the question
answering program is represented by an epistemic state E, a natural meaning for an input formula is a
function from epistemic states to epistemic states. The result of this function applied to E is the
epistemic state representing the new knowledge state of the program, taking into account the new
E(A) = n A4 ( tit E E )
information contained in the input formula.
The intuition behind this definition is that we want E(A) to be contained in each set-up forming
it, i.e. E(A) EA4 tl A 1 V tEE, and we also want E(A) to be maximal, this is why we chose the
formula A when it is affirmed or denied as input to the program. The following principles are used to
greatest lower bound of the set E.
• The input should be used only to increase information, and never to throw information away, i.e,
Given a formula A, we call A+ : E --+ E and k: E --+ E the functions associated to the
It should be noted that the set SU, together with the partial order -AS, defined as t liiAS t' iff,
forall atomic sentences A,
tl
A ] liiA4 t'[ A ] forms an approximation lattice, denoted AS. This
lattice of set-ups is infinite, but it presents the important property that, if we define a finite set-up as
one where only a finite number of atomic sentences are given values different from 0, then each set
up can be represented as the limit of a set of finite set-ups, i.e. t = uA4 X, with X a directed set of
define the functions A+ and A-:
E
~AE
A+(E).
• The new state should say no less than the affirmation of the input formula, i.e, TsettA) EAE A+(E).
• The new state should be the Minimum Mutilation of the present state that renders A at least true.
These principles suppons the following definition for the functions A+ and k:
finite set-ups.
We can also define an approximation lattice based on the set of epistemic states E. The natural
partial order to associate with this lattice is E ~AE E' iff V ':1' E E', 3 tEE, t -AS r', The
A+(E) = E UAE Tset(A)
k(E) = E uAE Fset(A)
problem with this partial order is that it is not anti-symmetric, and thus it does not yield a lattice. Two
approaches are possible to obtain a complete lattice for epistemic states. We can define an equivalence
These functions present the following propenies:
relation between epistemic states, in such a way that E is equivalent to E' iff each one approximates
• They are continuous.
the other. The equivalent classes of this relation and the partial order above do form a complete lattice.
The other approach is to define a closed upward epistemic state as an E where t liiAS r' and tEE
• They are ampliative, i.e, they preserve information because E EAE A+(E) and thus I liiAE A+,
implies that t' E E, and to define the set CE of all nonempty closed upward epistemic states. Again
• They are permanent, i.e. once a function A+ or A-has been applied it does not need to be applied
this set, together with the partial order above is a complete lanice.
where I is the identity function.
never more because if A+(E) EAE E' then A+(E') = E'.
To preserve finiteness, we define AE as the set E supplied with the partial order above, and also
with lattice-like operations which give results equivalent to those obtained by passing through the
The next step is to extend the above logic to full first-order logic, i.e. predicate logic with
complete lattices defined above. These operations are meet and join, and are defined, respectively, as:
quantifiers. In the tarskian semantics, each n-ary predicate symbol is associated to a single model
contained in ~n, where ~ is an arbitrary set of domain objects. The fact that we have only one model
E nAE E' = E U E'
E
U AE
E' = ( t
U
allows the definition of the interpretation of the predicates by j.ust stating when they are true, the other
t' I tEE and t' E E'
cases receiving the value false. This kind of semantic defmition has been presented in section 3.2.1.
In the.case of a four-valued semantics each predicate receives two models: The Positive Model,
representing the entities having the propeny associated to the predicate, and the Negative Model,
- 57 -
- 58
MODEL-TIfEORETIC SEMANTICS
CHAPTER 3
CHAPTER 3
MODEL-TIfEORETICSEMANTICS
representing the entities that do not have this property. To define the semantics of a first-order logic
consider quantified formulee, in undecidable. This is stated in the following theorem relating the
based on the four-valued approach, we can use the same formalism presented in section 3.2.1 with
entailment relation in this four-valued logic to the first-order logic satisfaction problem. which is
the exception that the extension function. ~. of the logical structures M = <m. E. ~> is redefined in
undecidable:
the following way:
Theorem 3.10.
Let Pl •...• P n be all the predicates in the predicate set. let q be an arbitrary first-order logic formula
and let 'P = (3 x PI(X) A ., PI(X» v ... v (3 x Pn(X) A" Pn(x».
Extension function:
~;;; <~+. ~->
mn
n
~- : { Pn J -+ m
~+ : {
Then 1= q iff for all M T E J'[ q v 'P ] M I
Pn J -+
In chapter 5. we present the semantics of a decidable first-order logic based on the four-valued
Using this new set of logical structures'i, call it LS'. and given a variable map VM. we can
define the semantics of the first-order logic formule {cI> J presented in section 3.2.1.
J' : (cI> J x LS' x VM
~
approach. This language is based on the work of Patel-Schneider (1985). and has been extended to
allow the defmition of predicates.
:Ii
TE J'[ Pn(TI •...• T n) ]Mviff VSE S.<dTI ]Mv•...•
FE J'[ P n (Tlo .... Tn) ] M v iff V s E
s. <d Tl
d
Tn]Mv>E ~+[ PnJ
] M v•...• t[ Tn ] M v> E ~-[ P n ]
T E J'[ ., cI> ] M v iff FE J'[ cI> ] M v
F E J'[ ., cI> ] M v iff T E J'[ cI> ] M v
T E J'[ cI>1
A
A
cI>n ] M v iff T E J'[ cI>1 ] M v and .., and T E J'[ cI>n J M v
FE J'[ cI>1
A
A
cI>n J M v iff FE J'[ cI>1 ] M v or ... or F E J'[ cI>n ] M v
T E J'[ cI>1 v··· v cI>n ] M v iff T E J'[ cI>1 ] M v or ... or T E J'[ cI>n ] M v
FE J'[ cI>1 v··· v cI>n ] M v iff FE J'[ cI>1 ] M v and .., and F E J'[ cI>n J M v
T E J'[ 3 xcI>] M v iff there exists d E m. T E J'[ cI> ] M v[x/dl
FE J'[
3 xcI>] M v iff for all d E m. F E J'[ cI> ] M v[x/dl
T E J'[ V xcI>] M v iff for all d Em. T E J'[ cI> ] M v[x/dl
FE J'[ V xcI>] M v iff there exists d E m. F E J'[ cI> ] M v[x/dl
The above logic has been used. in its propositional form. as a model for implicit and explicit
belief (Levesque. 1984a) and also as a model for the semantics of inheritance in monotonic semantic
networks (Thomason et al., 1986). The problem of using the above sernanr.c-, in a first-order logic
module for a knowledge representation system is that the entailment rel.n ion in this logic. if we
5Again the fact that we have a unique set of domain elements :b allows the definition of the set of all logical structures.
co
-60
CHAPTER 4
THE LANGUAGE
Abstract type KBase
Functions:
Chapter 4
New-Base: ---. KBase
Tell: KBase x Fact ---. KBase
The Language
Ask: KBase x Query ---. Boolean
Execute: KBase x { <Query. Fact> + } ---. KBase
end type.
The Query and Fact abstract types provide the Module Access Primitives. These primitives are
Before presenting the semantics of the proposed knowledge representation language, we
associated to the epistemological methods, and are used to represent domain knowledge. The Execute
introduce informally the characteristics of the language. Initially, we present a general description of
function provides the heuristic methods used to apply a set of rules to modify a given knowledge
the language and next we describe each of the modules composing it, and present some examples.
base. Every knowledge representation method integrated into the language is characterized by a set of
defmitions and a set of questions. Definitions and Questions are primitives allowing the utilization of
4.1. General Description
The upper level specification of the language is to provide a flexible knowledge base facility to
be integrated into knowledge-based systems. We adopted an open architecture incorporating several
the method to represent knowledge. Given a method M. characterized by the definitions
do..... do
and the questions qo...., qm, the syntax of the module access primitives corresponding to the facts
and queries associated to M is the following:
interconnected formalisms, The division of the language into several formalisms has two advantages:
the computability problems associated to each formalism can be solved independently and the
integration of new formalisms to the language is facilitated.
Fact ::= to-M(d1) I ... I to-M(dn)
Query ::= trorn-Mtqj ) I ... I from-M(qm)
The language can be thought of as an Abstract Data Type allowing the creation and manipulation
of knowledge bases. The knowledge bases consist of a set of knowledge base partitions. each
These facts and queries allow the utilization of method M as an independent knowledge
associated to an independent formalism. Knowledge is stored into the knowledge base partitions.
representation method. The interaction of this method with other methods in the language is provided
Each formalism is used to store knowledge only into the partition associated to the formalism, but
by taking into account the knowledge associated to other methods when answering questions
queries can be directed to this partition or to a combination of two or more partitions of the knowledge
associated to method M. Given a different method Mo. the interaction between this method and the
base. The answer to a query directed simultaneously to more than one knowledge base partitions
method M is defmed by the following module access primitives:
should take into account the knowledge stored in all these partitions. The interaction of one given
formalism with the other formalisms in the language is defined by semantically specifying how the
Query ::= from-M-M o(q1) I ... I from-M-Mo(qm)
knowledge associated to the knowledge base partitions of the other formalisms affects the answers to
queries associated to the given formalism.
Each knowledge representation method introduced into the language is provided with a
Two design requirements guided the specification of the formalisms integrated into the
semantics that defines the intended meaning of its definitions and questions. This semantic account is
language: The semantic motivation of their features and the tight interconnection between them, in the
used to define the semantics of all module access primitives involving the definitions and questions
sense that the inference mechanisms provided by each formalism should be aware of the knowledge
associated to each method.
associated to all other formalisms. The following abstract data type summarizes the specification of
the language:
Module access primitives are used to construct production rules. These rules are joined together
into production systems. These prod~ction systems, when executed. can be used to modify their
associated knowledge bases according to specific domain knowledge or to shadow the existence of
multiple representation methods by directing the user's queries and facts to the appropriate methods.
The architecture of the system reflects the above specification. This architecture consists of three
levels: the epistemological level. the logical level and the heuristic level. Presently, the epistemologic
and logical levels are already implemented. The heuristic level, although semantically specified in
TIlE LANGUAGE
CHAPTER 4
chapter 5, has not yet been implemented. Figure 4.1 presents the general architecture of the language.
THE LANGUAGE
CHAPTER 4
Example 4.1. Assertional Module.
Robln(Tweety)
In the following sections, each of the three levels of the architecture are presented.
Size(Tweety, Small)
Circus-Elephant(Clyde)
Production Systems
Implemented
Size(Clyde, Big) •
I
I
I
I
Logical Level
Inference
KBase Management
I
I
Epistemological Level
I
I
Logic
-:
II
Frames
I
I
Although the definitions and questions of this module are expressions with the same syntax of a
full first-order logic, the entailment mechanism provided by. the language is much weaker than the
first-order logic implication. In particular, this mechanism, called Tventailment (Patel-Schneider,
1985) or Knowledge Retrieval (Frish, 1987a), excludes the chaining between independent facts, thus
..
Ir
...
ruling out modus ponens as an inference rule. Because of this the stated facts can be seen as being
I
SNet
I
stored in some kind of data base, where the input language is first-order logic. On the other hand, the
language does allow quantifiers providing a very powerful query language for these data bases.
To give an idea of the results of the entailment calculation, we sketch the algorithm performing
Fig. 4.1. Architecture of the System
this calculation, whose formal definition of the algorithm is presented in chapter 5. Given a set of
stated facts, Fj, and a question Q = Ai Qi. The algorithm search for the set of all substitutions such
that, for each Qi in the query, there is at least one Fi which implies, according to the classical
4.2. The Epistemological Level
The first level consists of three modules: an assertional module, based on a decidable first-order
logic language, a frame module, based on the terminological box of KRYPTON, and a semantic
network module, providing inheritance with exceptions. The primitives of the modules of this first
level define the epistemological primitives of the language. These primitives are not complete
expressions of the language but are used as parameters of the module access primitives, which form
the Fact and Query abstract data types used in the Ask and Tell primitives of the logical level. In the
following sections, each module of the first level is introduced and some simple examples of their
utilization for knowledge representation are presented.
semantics, this Qi when one of the substitutions is applied. Once this set is calculated the algorithm
tries to find a compatible subset, i.e. where the same variables are substituted by the same terms. If
this subset is not empty then the Fi are said to entail Q.
Besides the usual functionalities provided by data bases management languages, the language of
this module allows the representation of negative information, attributes with multiple values and
disjunctive information. The following example should help to demonstrate the use of this module.
Example 4.2. Using the Assertional Module.
Consider a knowledge base containing the following facts (the sentences in italics are comments):
4.2.1. Assertional Module
·This module consists of a first-order logic language allowing the statement of facts and the
verification, given a set of stated facts, of the entailment of an assertion by this set of facts. The
number(nO), flrst(nO,
Paul), name(nO, Smith), sex(nO. male), profession(nO, lawyer),
maried(nO), address(nO. Madison41)
semantic of the entailment relation is defined using a four-valued semantics (Belnap, 1975 and 19n).
The advantage of adopting this approach is the existence of a decidable algorithm for the calculation of
this entailment relation, which is sound and complete with respect to the defined semantics. This
semantics, presented in chapter 5, is weaker than the classical tarskian semantics for first-order logic,
number(n 1), f1rst(n1,Paul), narnetm , McCarthy). sextnt , male), prolession(n 1, singer).
maried(n1), address(n1, Abbeyroad72)
Representation of negative information:
number(n2), first(n2, Mary), name(n2, Funny), sex(n2, female), profession(n2, singer),
which is presented in chapter 3.
This module is intended to be used to express assertional knowledge about the domain. The
first-order logic syntax is a well adapted language for the expression of knowledge concerning facts
about some domain. The following example gives an idea of how facts are expressed in this
, maried(n2). address(n2, Sunset77)
Representation of multiple values:
number(n3). first(n3.
AI), narnema, Capone), ssxma. male), profession(n3, lawyer),
protesslontns, gangster), -maried(n3)
language.
£'l
·64
ras LANGUAGE
CHAPTER 4
CHAPTER 4
THE LANGUAGE
4.2.2. Frame Module
Representation of disjunctive information:
number(n4), first(n4, Mac), name(n4, Theknife), sex(n4, male), profession(n4, gangster),
(address(n3, Sunset77) v address(n3, Docks12))
The definition of concepts and their interrelations, i.e. a terminology, is an important pan of the
knowledge representation task of knowledge-based systems. The Terminolog!cal Languages, first
introduced into the system KL-ONE (Brachman, 1978), are formalizations of the notion of frames
The following type of questions are possible using the assertional module, and they receive the
(Minsky, 1975) and of related notions associated to semantic networks. These languages are pan of
answers below (again the sentences in italics are comments):
several knowledge representation systems, e.g. KRYPTON (Brach man et al., 1985), KL-lWO
All entitles which are male or female:
(Domini and Lenzerini, 1988).
(Vilain, 1985), KANDOR (Patel-Schneider, 1984), BACK (Luck et aI., 1987) and TERMLOG
Usually, terminological languages consist of a set of primitives allowing the description of
3 x sex(x, male) v sex(x, female)
Concepts and Roles given some set of primitive concept and role symbols. These languages are given
(ex, nO», (ex, n2», (ex, n3», (ex, n4»
a semantics where concepts are associated to sets of elements of an arbitrary domain of world objects
The name of all entities whose profession is gangster.
and roles are associated to binary relations over this domain, such a semantics has been presented in
3 n profession(n, gangster) " 3 x name(n, x)
section 3.2.2.
Using the terminological language introduced in section 3.2.2, we can define many interesting
(ex, Capone», (ex, Theknife»
concepts such as "a person with at least one child, and each of whose sons is a lawyer and each of
The name and address of all entities which have these two attributes assigned:
whose daughters is a doctor":
3 n 3 a address(n, a) " 3 x name(n, x)
Person
n
3 Child : (*)
(ex, McCarthy>, <a, Abbeyroad72>, -en, nt»),
n
V ( Child: [Male) ): (Lawyer)
(ex, Funny>, <a, Sunset??>, -en, n2»
n
V ( Child: [Female) ): (Doctor)
«x, Smith>, <a, Madison14>, -en, nO»,
The numbers of all entities with first name ·Paul" and with profession ·'awyer" or "singer·:
3 n first(n, Paul) " (profession(n, lawyer) v professlon(n, singer))
Terms like the definition above can be automatically classified according to the subsumption
relation. We say that a concept or a role subsumes another if all instances of the laner are necessarily
instances of the former. In fact, any other meaningful relationship between concepts and relations can
«n, nO», «n, nh)
be reduced to subsumption (Luck and Owsnicki-Klewe, 1987).
The addresses and numbers of all non maried entities whose profession is ·singer":
3 n -rnarledtn) " 3 a aooressm, a) " (profession(n, lawyer) v profession(n, singer))
As has been commented in chapter 3, a problem with subsumption in tenninologicallanguages
is that its computational complexity, and even its decidability, is extremely sensitive to the choice of
the primitives of the language. A solution for the complexity problem has been proposed by Patel
«a, _Sunset??>, -en, n2»
Schneider (l986b): To adopt a four-valued semantics that does not allow all of the subsumptions but
The name and number of all non. maried entities which have one or two addresses and whose
provides a semantically motivated tractable subset of the "classical" subsumptions. We have adopted
profession is ·'awyer· or ·singer·:
and extended this solution.
3 n -martedm) " 3 al 3 a2 (address(n, al) v address(n, a2)) " (profession(n, lawyer) v
We propose a terminological language analogous to the language introduced in section 3.2.2,
but in which the notion of role has been extended to allow arbitrary N-Place Relations between
profession(n, singer))
concepts. This extension allows the direct representation of relations which are naturally n-place,
«a2, Sunset77>, -en, n2»
(eat, Sunset77>, -en, n2»
without panitioning them into binary relations as it is the case in the usual terminological languages.
«a2, Sunset77>, eat, Docks12>, -en, n3»
One example of such a relation is the meaning of the English preposition between (Woods, 1975): X
«a2, Docks12>, eat, Sunset77>, -en, n3»
is between Y and Z. Using our extended language we can represent the concept of all cities between
•
Karlsruhe and Grenoble by:
- 65
- 66
THE LANGUAGE
City
n
CHAPTER 4
V (Between: [City, City) ) : [Karlsruhe, Grenoble)
CHAPTER 4
THE LANGUAGE
The four-valued semantic definition of a terminological language, and a sound and complete
algorithm to calculate subsumption in this language are presented in chapter 5. The use of the four
This can be read as: "All the entities that are cities and if they appear as a first elements of a tuple
valued semantics makes the proposed subsumption algorithm incomplete. with respect to the
of the relation 'between', with the second and third elements of the tuples restricted to be cities, then
"classical" semantics presented in chapter 3. This means that some of the subsumptions sanctioned by
the second and third element of the tuple are Karlsruhe and Grenoble". Other relations for which
the standard two-valued semantics are not calculated by the proposed algorithm. One the other hand,
finding natural binary decompositions can present difficulties, as it was noticed by Woods (1975), are
the set of subsumptions sanctioned by the four-valued semantics is a subset of the valid subsumptions
the act primitives of Schank and Rieger III (1985), used to represent English sentences.
according to the standard semantics, i.e. the proposed algorithm is sound according to the standard
Another advantage of allowing n-place relations is the possibility of a smooth integration
between the terminological language and the assertional module language based on first-order logic.
semantics.
The subsumptions supported by the standard semantics but not calculated by the proposed
where n-ary logic predicates are associated to n-place relations. The integration of terminological and
algorithm are those involving reasoning using the law of the excluded middle or modus ponens. The
assertional modules is typical of hybrid systems. In these systems, concepts are usually associated to
following example presents one of such cases.
unary predicates and roles are associated to binary predicates, leaving all the higher arity predicates
without correspondence in the terminological language. This situation is not very satisfactory,
Example 4.4. The incompleteness of the subsumption algorithm.
principally if n-place relations have been partitioned into binary roles to which no meaningful
Subsumptions calculated by the algorithm are those where all the components of the descriptions are
predicate corresponds.
independent, such as:
The proposed terminological language has some additional characteristics usually not present in
the terminological languages of the hybrid systems: (i) it presents a rich set of primitives, including
Person
n
V (Child: [Male» : [Doctor) Subsumes
Person n V Sex: [Female) n V Child: [Doctor n 3 Speciality: [ • II
disjuction and negation of both concepts and relations, (ii) it provides special symbols for the
universal concept. for the bottom concept. for the universal relation and for the bottom relation. A
The valid subsumptions according to the standard semantics which are not calculated by the algorithm
concept or a relation is universal when it subsumes all other concepts or relations, and it is a bottom
involve descriptions with interdependent components, such as:
when it is subsumed by all other concepts or relations, (iii) it includes tests for subsumption and for
V Child: [Doctor) n V (Child : [Doctor» : [Lawyer) Does not subsumes
equality between concepts and between relation, and finally, (iv) it introduces a new syntax, the Lisp
V Child : [Lawyer)
oriented syntax resulting in clumsy expressions when n-place relations are allowed.
Terminological languages are used to provide intensional descriptions of classes of objects.
These intensional descriptions are used in many Artificial Intelligence applications. All domains
In the proposed four-valued semantics, an entity can be and, simultaneously, not be a doctor. In such
a situation, the above subsumption is not valid. •
presenting hierarchically structured categories, like biological classification, geographical data,
juridical information, etc, are good candidates to be represented using this formalism. The following
example:, provides some insight on how the primitives of this module can be used to define a
4.2.3. Semantic Network Module
Semantic networks have been used in many different ways: As a different syntax for First
terminology in the domain of animal taxonomy.
Order Logic, as a basis for Object-Oriented Programming, as a data structure for representing search
Example 4.3. Frame Module.
problems and as a representation for the inheritance of properties in knowledge representation
systems.
Bird := Animal n V Blood: [Warm] n V Reproduction: [Oviparous)
In this module the semantic networks are used as a representation tool for the inheritance of
Mammal := Animal n V Blood: [Warm) n V Reproduction: [Viviparous)
properties. The semantic networks provided by this module are Bipolar, Nonmonotonic ,
Robin := Bird n V Size: [Small) n 3 Organ : [Wing)
Homogeneous, Multiple Inheritance semantic networks. A semantic network is said to be bipolar if it
Elephant := Mammal n V Food : [Vegetal) n 3 Organ: [Trunk)
allows positive .(IS-A) and negative (IS-NaT-A) links. A semantic network is nonmonotonic if it
Carnivore := Animal n V Food : [Animal)
allows exceptions to inherited properties, i.e. if its links are not all strict. A semantic network is
Herbivore := Animal n V Food : [Vegetal) •
homogeneous if all its links are strict (and then it is necessarily monotonic) or if all its links are
defeasible. Heterogeneous semantic networks allow both types of links. Finally, a semantic network
- 68
TIlE LANGUAGE
CHAPTER 4
allows multiple inheritance if each node can have several predecessors in the hierarchy represented by
TIlE LANGUAGE
CHAPTER 4
approach has the advantage of avoiding multiple extensions.
In chapter 5, we propose a semantic structure which can be refined to correspond to different
the semantic network I.
Early systems allowing multiple inheritance and exceptions were defined through its inference
inheritance strategies. We present three panicular strategies: A monotonic strategy corresponding to
procedures and were theoretically unsound, e.g. FRL (Roberts and Goldstein, 1977) and NETL
the inheritance relation defined in Thomason et al. (1986), a credulous strategy and a skeptical
(Fahlman, 1979). More recently, several theoretically sound definitions of multiple inheritance have
strategy corresponding to the skeptical inheritance strategy defined in Horty el al. (1987).
The following example shows how the primitives of this module can be used to define a
been proposed, e.g. Etherington (1986), Touretzky (1986), Sandewall (1986), Horty et al. (1987)
and Doheny (1989). Some of these definitions have been presented in chapter 3. These defmitions do
hierarchy. The expressions of the example 4.5 define the hierarchies of figure 4.3.
agree in all cases where our intuitions are sure but differ in more ambiguous cases. Our approach is to
provide a model-theoretic semantics for inheritance based on the four-valued logics introduced by
Example 4.5. Semantic Network Module.
Belnap (1977). This approach has already been applied to the monotonic case (Thomason et al.,
Color :- Elephant
1986) and seems to be quite suitable to capture the meaning of specific propenies of semantic network
Circus :- African-Elephant
-4
Gray Ell Royal-Elephant -4 Gray
-4
Elephant Ell Royal-Elephant
-4
Circus-Elephant
inheritance, like the possibility of direct contradictory links.
This module provides a language for defining inheritance hierarchies and for questioning these
Color:
hierarchies about the relations between their classes. No distinction is made between objects and
r
.»:»;
Circus:
Gray
classes: The nodes allowed in the hierarchies are all classes. This is due to fact that the assertional
module provides the object to class relations through the logical predicates.
Two situations where Shortest Path inheritance systems, based on breadth first or depth first
Elephant
Elephant Ell
Royal-Elephant
-4
r
Elephant
/
......... Royal-Elephant
African-Elephant
Royal-Elephant
tCircu~-Elephant
search procedures, failed to provide sound answers are: networks with redundant links and
ambiguous networks. These two situations can arise in multiple inheritance networks and are
presented in figure 4.2 through the classical "the color of Clyde" and "the Nixon diamond" networks.
In these examples, simple arrows are default links, and arrows cut by a stroke are exception links.
Ctt)E~hMl
Gray
Quaker
-, /·ROP"~"O
Royal-Elephant
Clyde
/.~'
Nixon •
•
Fig. 4.3. Defined Hierarchies
•
4.3. The Logical Level
The second level introduces the notion of knowledge base. The proposed knowledge
representation language can be thought of as an abstract data type whose access functions are the
primitives of this level. Two types of primitives are provided, Tell and Ask. these primitives are used,
respectively, to store facts and to interrogate knowledge bases. These primitives receive two
parameters: A knowledge base and a module access primitive, i.e, the functions of the form to-M(d)
and from-M(q). These module access primitives are the interface between the logical level and the
primitives associated to the first level modules.
The Ask primitives are defined in such a way that new facts can be inferred from evidence
Fig. 4.2. Example of Inheritance Hierarchies
provided by the knowledge acquired only by one or by a combination of two of the first level
modules. The weak first-order logic module assures decidability, and the terminological and semantic
The intuition explaining why Clyde should be non gray. even in the presence of the redundant
link from Clyde to elephant, is that more specific classes should be consider before less specific
network modules are used to increase the inference power of the language.
In the following example, we present the use of the primitives of this level.
classes when deciding about the inheritance of some property. In the Nixon case there are two equally
valid paths and two approaches are possible: The Credulous Inheritance approach, to consider both
paths in different extensions, and the Skeptical Inheritance, to refuse any conclusion. The skeptical
1See Touretzky et aI. (1987) for a detailed survey about the different types of inheritance systems and their properties.
- 69
- 70
TIlE LANGUAGE
CHAf'fER4
TIlE LANGUAGE
CHAPTER 4
Example 4.6. The Logical Level.
• Logic and semantic networks: uses a given hierarchy as an explicit notation for implication:
• Definition and manipulation of knowledge bases.
Ask(K, from-logic-snet(Color Ell Circus, 3 x (Size(x, Big)
1\
~ Gray(x)))) ~ T
Because:
K:=New-kbaseO
Tell(K, to-Iogic(l:», where l: are the expressions in example 4.1.
LOGIC: Size(Clyde, Big) and Circus-Elephant(Clyde)
Tell(K. to-trarnetzj), where 1: are the expressions in example 4.3.
SNET: Color Ell Circus: Circus-Elephant
~
Royal-Elephant H. Gray
• Frame and semantic networks: uses a given hierarchy to store the subsumption relation.
Tell(K, to-snet(l:», where 1: are the expressions in example 4.5.
Ask(K, from-frame-snet(Circus, Animal
• Inference using only the assertional knowledge: a weak logical entailment where no chaining of facts
is allowed.
::J
African-Elephant))
~
T
Because:
FRAME: Animal ::J Elephant
Ask(K, from-Iogic( 3 x Size(x, Small)
Robin(x)))
1\
~
T
SNET: Circus: African-Elephant
~
Elephant
•
Because:
4.4. The Heuristic Level
LOGIC: Size(Tweety. Small) and Robin(Tweety)
Ask(K. from-Iogic( 3 x Size(x, Small)
~
Circus-Elephant(x)))
1\
F
Finally, the third level consists of primitives allowing the definition of production systems
(Lenat and McDermott, 1977). The logical and epistemological levels form an abstract data type for
• Inference using termiriological knowledge: the subsumption relation. A concept subsumes another if
the manipulation of knowledge bases. The functions allowing the manipulation ofthis abstract data
all instances of the latter are also instances of the former.
type are the Ask and Tell primitives of the logical level. These two functions use. as parameters the
Ask(K, from-lrame(Herblvore
::J
Elephant))
~
module access functions, i.e, the functions of the form to-MId) and from-M(q). The idea behind
T
the heuristic level is to allow the definition of a new function allowing the manipulation of the
Because:
FRAMES:
Elephant := Mammal
n
V Food: [Vegetal) n 3 Organ: [Trunk)
Herbivore := Animal n V Food; (Vegetal)
Ask(K, from-frame(Mammal
::J
Robin))
~
knowledge base abstract data type. This function, denoted Execute, is intended to execute a
production system where the rules are constructed using the module access functions. This primitive
would then be able to automatically manipulate the above knowledge bases. Conflict Resolution
F
strategies and Flow Control strategies can be explicitly chosen by special primitives. The rules can be
• Inheritance: the existence of a path between two classes of objects inside a hierarchy, taking into
used to state facts about the domain knowledge or to control the interaction between the different
account the explicit exceptions,
modules of the first level. Below we present some examples of both types of rules.
~
Ask(K.from-snet(Color Ell Circus:Circus-Elephant H Gray»
T
Example 4.7: Heuristic programming.
Because:
SNET: Color Ell Circus; Circus-Elephant
~
Ask(K,from-snet(Color Ell Circus:African-Elephant
Royal-Elephant H Gray
~
Gray))
~
Introduction of special instances of modus ponens:
Because:
SNET: Color Ell Circus; African-Elephant
~
Ask(K,from-snet(Color Ell Circus:Circus-Elephant
Elephant
~
~
~
Gray))
R1 : {from-logic(Man (x)),
Gray
to-loglc(Mortal( x»}
F
Hierarchy transitive closure calculation:
• Interaction between modules.
• Logic and frames: uses the subsumption relation as a implicit implication.
Ask(K. from-Iogic-frame( 3 x(Size(x, Small)
1\
Animal(x))))
Because:
LOGIC: Size(Tweety, Small) and Robin(Tweety)
FRAMES: Animal ::J Bird ::J Robin
• Rules about the domain:
T
~
T
R2 : {from-snet(Greater(x, y»
AND from-snet(Greater(y. z)),
to-snet(Greater := Greater Ell x ~ zll
THE LANGUAGE
• Rules 10control the interaction betweenmodules:
Storage of subsumption relation in a hierarchy:
11 : {from-frame(y ::I x).'
10-snel(S := S E9 x
~
y)}
Transfer of knowledge from frame
to
logic:
12 : (from-Snel(P::I all AND from-logic(P(a».
to-Iogic(a(a»}
Transfer of knowledge from semantic network: to logic:
/3 : {from-snet(I(P ~ a» AND from-logic(P(a».
to-Iogic(a(a»}
•
-73
CHAPTER 4
THE SEMANTICS
CHAPTER 5
Definition 5.1. Syntax of the primitives at the Assertional Module.
Chapter 5
Formulee are constructed with-the usual first-order operators:
<1>::=
Pn(Tl •...• Tn)
.... <1>1
The Semantics
<1>1
A ..• A
<1>n
<1>1 v··· v <1>n
3x<1>
I
'v'x<1>
In this chapter. the formal syntax and semantics of the knowledge representation language
Terms are variables, functions or constants (O-ary functions):
T::=
x]
introduced in chapter 4 are presented.
5.1. The Epistemological Level
CPn (Tlo ...• Tn)
Definition:
1:( ::=
This level consists of three modules. each containing a different type of knowledge structure: an
assertional module. a frame module and a semantic network module. Each module is constructed
around some epistemological notions. The notions involved are: in the assertional module. predicates.
functions and constants; in the frame module, concepts and relations and, finally, in the semantic
network module classes and hierarchies.
Syntactically. each one of the three modules consists of a set of primitives. These primitives are
of three types: manipulation. definition and question primitives. The Manipulation Primitives are used
to construct descriptions of some epistemological notion. The Description Primitives allow the
statement of some fact about the domain or the definition of some term, Finally, the Question
Primitives permit the interrogation about the present state of knowledge.
The definition and question primitives are the only interface between each module and the rest
of the language. The semantics of the knowledge bases and of their storage and query functions is
defined using these primitives.
It should be noted that the primitives at this level are not valid expressions of the language. they
should be used as parameters of the primitives of the logical level to have a meaning with respect to a
knowledge base. Next, the three modules of the first level are described.
5.1.1. The Assertional Module
This module contains primitives allowing the definition of assertional knowledge: These
primitives correspond to' the usual operators of the first-order logic languages. The definition and
questions of this module are just logical formula. Its important to highlight the role of definitions and
<1> I
P n (x 10 .... xn) := <1>
Question:
8t ::=
<1>
•
The formula andterm expressions are the usual first-order logic expressions. The meaning of
the predicate definition primitive. P n (X1o .... xn) := <1>. is to associate the formula <1> to the predicate
Pn. the variables Xl, .... Xn should be the only free variables in <1>. and the predicates should be
defined only once. These definitions should not be directly or indirectly recursive. This primitive is
just a tool used to give a name to a formula, It is useful when defining the interaction between the
different modules.
The semantics of the assertional module is based on Logical Situations. A logical situation
correspond to the Models of the classical Tarskian semantics for first-order logic and consists of a
triplet containing a non empty set of domain objects. an environment function and an extension
function. We assume a unique set of domain objects.
:D, what is totally general because we can
include in this set all relevant elements of the domain. The environment function
associates each
and the classical semantics for first-order logic, presented in section 3.2.1, is the extension function
definition: This function consists of a pair of functions associating to each predicate a Positive
Extension. the tuples in the domain known to possess the property represented by the predicate, and a
Negative Extension. the tuples known not to possess this property. More formally:
questions: they are the only interface between the module and the rest of the language. The following
definition presents the syntax of these primitives.
E
function symbol to some function in the domain. The main difference between this semantic definition
Let :;[) be a unique non empty set, the domain objects. and
$ = 2{ T, F } = ( ( T), ( F ), ( T. F ), 0 ) be the set of truth values.
We define a Logical Situation s = <:;[), E. ~> E LS, where:
- 76
TIlE SEMANTICS
CHAPTER 5
THE SEMANTICS
CHAPTER 5
tI'
:".
Using the fact that we have a unique set of domain objects, we can define the set of all compatible sets
Environment function:
~
"
e : ( c/ln
I -+ [~n -+ ~ I
of logical situations:
LL = ( SIS is a set of compatible logical situations
Extension function:
~;;
I
<1;+. ~->
~+ : ( Po
~- : ( Po
I -+ ~n
I -+ ~n
We can now introduce the interpretation function for the first-order logic language.
Interpretation function for predicates with respect to SeLL and v e VM:
Variables are introduced through a variable map. associating each variable to an element of the
domain. This variable map is extended to terms in the usual way:
We defme the set of all Variable Maps: VM = ( v
I. where:
v:(xl-+~
j : (<I> I x LL x VM -+
:ll
r» ]Svirf forallse
S.<tl T\ ]sv
t[ Tn]sv>e ~+[ Pn]
Fe j[ Pn(T\ ..... T n) ]Sviff forallse S.<tl T\ ]sv
tlT n ]sv>e ~-[ Pn]
Te j[ Pn(T\ •...•
The following notation is adopted: v[x/d] == AY. if Y= x then d else v(y).
Interpretation function for first-order logic formulse without quantifiers with respect to SeLL and
We define a Term Map with respect to a logical situation s and a variable map v, as follows:
t : (
T I x LS x VM -+ $
d
x
I S v== v(x)
d
cj)n(Tt..... Tn) ] s v == £($n) (t[ T\ ]
ve VM:
Te j[., <1>] Sv iff Fe j[ <1>] Sv
SV.....
tl Tn ]
SV)
Fe j[ ., <I> ] S v iff T e j[ <I> ] S v
The fact that predicates possess two different extensions gives rise to four different truth values,
T e j[ <1>\
A
A
<l>n ] S v iff T e j[ <1>\ ] S v and
corresponding to the situations where a given tuple in the domain belongs: to the positive extension
Fe j[ <1>\
A
A
<l>n ] S v iff :3St ..... Sn. S = S\ U
Fe j[ <1>\ ] S\ v and
only. to the negative extension only. neither to the positive nor to the negative extensions and. finally,
to both extensions. These situations correspond. respectively. to the following truth values: ( T I
positively true. ( F I - positively false. 0 - ignorance and ( T. F I - inconsistency. These truth
values have been introduced by Belnap (1977).
Even in this weak logic the entailment relation. if we consider quantified formulee, is
and T e j[ <l>n ] S v
U
s, and
and F e j[ <l>n ] Sov
Te j[<I>\v"'v<l>n]Sv iff :3S\ •...• Sn.S=S\U···USnand
T e j[ <1>\ ] S\ v and and T e j[ <l>n ] So v
Fe j[ <1>\ v ... v <l>n
I
S v iff Fe j[ <1>\ ] S v and
and Fe j[ <l>n ] S v
undecidable. as it is stated in theorem 3.9 relating the entailment relation in a four-valued logic to first
order logic satisfiability, which is undecidable.
To achieve decidability of the entailment relation between logical formule it is necessary to
prevent the equivalence of quantification to infinite disjunctions or conjunctions. This can be obtained
The consequences of the above definition can be better understood through an example.
Consider the standard first-order logic tautology: -, P(a) v P(a). We can define the following
compatible set of logical situations:
by given the quantifiers an intuitionistic reading, under which the interpretation of the formula :3xP(x)
would be read "there exists a known individual for which P is true". This is formalized by
s = ( s I and s = <$. e, ~> where
introducing sets of compatible situations. i.e. situations sharing the same environment (and also the
~+[ P ]
same set of domain objects), to interpret the logical formule:
~-[
= (bl
p] = [b]
In this case:T E j[ P(a) ] S v and F E j[ P(a) ] S v and also
Compatible Set of Logical Situations:
T E j[ -, P(a) ] S v and F E j[ -, P(a) ] S v implying that
S = ( Sx I Sx = <~. e, ~x > ))
T E j[ -, P(a) v pea) ] S v and FE j[ -, Pea) v P(a)] S v
- 77 -
·78
TIlE SEMANTICS
CHAPTERS
We are now ready to define the entailment in this semantics:
This means that tautologies, in the sense of formula whose interpretation contains always the
value true, are not defined in this semantics. Consider now the following standard first-order logic
unsatisfiable formula: --, P(a) 1\ P(a). We define the following compatible set of logical situations:
Given two forrnulte
If)
S
TIlE SEMANTICS
CHAVfER5
If)
and
If)',
we define T -Entailment by:
-+1 If)' iff for all SeLL and for all v e VM, if T e J[
If) ]
S v then T e J[
If), ]
S v
= ( s ) and s = <m, E, ~> where
~+[P]=(a)
We define also a stronger form of entailment, called TF-Entailment, by:
~-[
If)
p] = (a)
-+Lf If)' iff for all SeLL and for all v e VM,
From the same type of arguments we can conclude that:
T e J[ --, P(a) 1\ P(a) ] S v and F e J[ --, P(a) 1\ P(a) ] S v
What means that classical unsatisfiability are also undefmed in this semantics. Finally, consider
the classical modus ponens hypothesis: --, P(a) v Q(a) and P(a). The reason why we can infer, using
if T e J[
If) ] S v
if F e J[
If)' ]
then T e J[
If)' ]
S v then Fe J[
If) ]
S v and
Sv
We define also the relation T-Equivalence by:
iff If) -+1 If)' and If)' -+1 If).
If) ¢:>I If)'
a standard semantics, that Q(a) is true is that ... P(a) and P(a) cannot be simultaneously true. In the
defined semantics this is not true as it is demonstrated by the following compatible set of logical
The t-entailment relation presents the following properties:
situations:
P(a)
-+t 3 x P(x): An instance entails an existential.
S = ( s ) and s = <m, E, ~> where
\Ix P(x) -+t P(a): A universal entails an instance.
~+[ P ] = (a)
~-[
p] = (a)
\I x P(x) -+1 P(a) 1\ P(b): A universal entails a conjunction.
P(a) v P(b) -hI 3 x P(x): A disjunction does not entail an existential.
~+[
Q]
Q(b)
-ht P(a)
P(a)
1\ ...
~-[
= (b)
Q] = (a)
In this case, we have T e J[ (--, P(a) v Q(a» ] S v and T e J[ P(a) ] S v but
v ... P(a): A classical tautology is not entailed by an arbitrary formula,
P(a) -ht Q(b): A classical contradiction does not entail an arbitrary formula,
\Ix (... P(x) v Q(x»
1\
P(a) -ht Q(a): Modus Ponens is invalid.
TE J[ Q(a)] Sv
Now we can define the semantics of the definitions and questions of the assertional module.
We conclude that modus ponens is not a valid inference rule in this logic. In fact, in the
Formulai can be used as definitions or as questions, in these cases the semantics of the definition or
proposed semantics the only formula that can be infered from the modus ponens hypothesis,
(--, P(a) v Q(a» 1\ P(a), is (--, P(a) 1\ P(a» v Q(a). This can be read as "under the given
question is just the interpretation of the formuhe. It remains to define only the semantics of the
predicate defmition primitive:
hypothesis we can conclude that either Q(a) is valid or the value of P(a) is a contradiction".
We can now define the semantics of the quantified formula,
Interpretation function for the first-order logic definition with respect to to SeLL and v e VM:
J : ( 1:1 ) x LL x
VM
J[ P n (XI, ... , xn)
:=If)] S ==
-t
$
Interpretation function for quantified first-order logic formula with respect to SeLL and v e VM:
T e J[
3 x If)
]
S v iff there exists d e
m, T e
Fe J[ 3 x If)] S v iff for all de m,F e J[
J[
If)]
If) ]
S v[xfd)
(ifTe J[ P n (XI, ..., xn)] Sv then Te J[ If)] SV) 1\
(if T e J[ If) ] S v then T e J[ P n (XI, ..., xn) ] S v )
SV[xfdl
A decidable algorithm to calculate the entailment relation is presented and proved sound and
'v'x If) ]S v
Fe J[ 'v' x If) ] S v
T e J[
m, T e J[ If) ]S v[xfdl
there exists de m, F e J[ If) ] S vlx/d]
iff for all d e
complete with respect to this four-valued semantics in Patel-Schneider (1985). The algorithm consists
iff
of two parts: The transformation of the expressions into normal form and the calculation of the t
entailment between two normal form expressions.
- HO·
THE SEMANTICS
Consider the t-entailment problem cJ>
~t
CHAPTER 5
cJ>', the conversion of this problem to normal form
consists of converting cJ> to cJ> 3 NF and cJ>' to cJ>'VNF. The formula cJ> 3 NF is obtained by the
transformation of the original formula cJ> into clausal normal form and then by skolemization of all
CHAPTER 5
THE SEMANTICS
prenex normal form according to the classical algorithm and it is left to the user to avoid these special
formula: which do not have VNF normal forms.
The algorithm for calculating the t-entailment problem l1> 3NF~t l1>'vNF is the following:
existentially quantified variables, and the formula cJ>\fNF is obtained by transforming <1>' into clausal
the QNF normal form for quantifier Q is the following:
T-ENfAILMENf(cJ>3NF, <1>'VNF) ==
Let <1> 3NF = V Z Aj llj and cJ>'VNF = 3 x Ai ~i, where x and Z are verctors of variables.
1. Rename the variables in z () x in such a way that z and x be disjoint.
NORMAL-FORM(cJ>, Q) :;
2. For alllli and for all <Xj calculate eij, the set of all substitutions a such that llja c: Pia.
normal form and by skolemization of all universally quantified variables. The algorithm for obtaining
I. Distribute the negations over the other logical operators, until each such operator applies to a single
., (<1> /\ '1')
~t
cJ> v 'I'
., (cJ> v '1')
~t
cJ> /\ 'I'
3. In eij, rename every variable of z with a new symbol not appearing nowhere else.
4. Calculate 'l'i = Uj eij- If'l'i is empty for some i, return clash failure.
sentence, using the following rules:
., .,cJ> ~t cJ>
5. Calculate the set ( 1:k l1:k = ( 9t, 92, ..., an )/\ 6j
E
'l'i ), where n is the number of'l'i's, i.e .
the number of disjunctions in the clause cJ>'VNF.
6. Calculate the set Q
"Vx cJ> ~t 3 x cJ>
= ( CJ I 3 1:1t = ( 9.. 92, .•., 9 n
)/\ 9tCJ
= 92CJ = ... = 9nCJ
). Each C1 is a
possible solution for the t-entailment problem.
7. If Q is not empty return True else return False .
., 3 x cJ> ~t Vx cJ>
2. Rename the quantified variables if they appear more than once, in such a way that each quantifier
The soundness and completeness of this algorithm is established in the following theorem:
has a unique variable.
3. Skolemize all Q quantifiers introducing new skolen function where necessary. Drop all the
remaining quantifiers.
4. Put the expression into conjunctive normal form, i.e. a conjunction of disjunctions of literals,
using the following rule:
<1> v ('1'1\ X) ~t (cJ> v '1')
Theorem 5.1. The above algorithm is complete and sound for calculating the t-entailment relation
cJ> ~t cJ>' of a pair of arbitrary first-order logic formulae, <1> and cJ>', with the restriction that <1>' could
be transformed into cJ>'VNF, preserving the four-valued logic interpretation. I
1\
(cJ>
V
X)
This theorem, as a special case of the theorem including the right-hand normal form test, is
The t-equivalence rules appearing in this algorithm are all proved in Patel-Schneider (1985),
with the exception of the step 3. In fact, it is proven that if cJ> and cJ>' are two arbitrary formula: than:
<1>
~t
cJ>'
proved in Patel-Schneider (1985). Although decidable, the worst-case complexity of the above
algorithm, even on formula: already in conjunctive normal form, is very bad. In the worst case eij
contains I ~i II <Xj I elements, each of which can be computed in time I llj I + I ~i I. Thus 'l'i has
irr cJ> 3NF ~t cJ>'.
But a similar theorem for the right-hand side of t-entailments does not exist. The reason for this
is that there are some formula: which do not present a VNF, for instance, the formula:
V y 3 x P(x, y) v Vy' 3 x' Q(x', y') does not have a normal form, because the classical first
~j Illi II llj I elements and calculating Q could take 1I i I 'l'i I unifications, each taking time
proportional to the size of the chosen elements of'l'i. The worst case running time is thus exponential
in I cJ> I . I<1>' I. This exponential worst-case behavior is unavoidable) because theta-subsurnption is
order logic normal form of this formula, 3 x P(a, x) v 3 x' Q(a', x'), where a and a' are skolen
NP-complete (Garey and Johnson, 1979), and V z <X ~t 3 x Pif and only if II theta-subsumes ~, for
constants, is not t-equivalent to the original form. This is due to the fact that the normal form
<X and
Pclauses. But, as has been noted by Patel-Schneider (1985), this worst-case wont be exhibited
transformation has the effect of placing both existential operators in the scope of both universal
in a normal knowledge base presenting the following characteristics: (i) being in conjunctive normal
operators, and, because of the intuitionistic interpretation of the or operator, this changes the meaning
form, (ii) each fact of the base is short, (iii) the knowledge base present many different predicates,
and (iv) queries are small compared with the knowledge base size. Under these assumptions the
of the formula.
An algorithm taking this effect into account is proposed in Patel-Schneider (1985), but as this
running time of the algorithm will be of the order In k . (In k ln k) which is acceptable. In contrast,
effect is relevant only to the questions (the right-hand side or the t-entailment) and not to the facts
these assumptions do nothing to improve the worst-case behavior of standard first-order logic
them selves (the left-hand side of the t-entailment), and as it complicates the algorithm, we adopt a
deduction.
simpler algorithm which is valid for prenex normal form questions. All questions are transformed to
I Unless P = NP.
- 81
- 82
TIlE SEMANTICS
CHAPTER 5
CHAPTER 5
THE SEMANTICS
r:=P I
5.1.2. The Frame Module
r:>P I
The primitives of this module allow for the defmition of a terminology consisting of the purely
r:<P
intensional description of categories of objects. These categories are described by restricting the
values of the properties of the objects forming them. The categories of objects are called Concepts and
Questions:
the properties are called Relations. The notion of Relation is an extension of the notion Role usually
8r::= Xl::lX2 I
present in terminological languages: roles are restricted to be binary relations and relations are
Pt::l P2 I
arbitrary n-place relations. This extension allows for the expression of some natural relations between
x, =X2
concepts. like the meaning of verbs needing a subject, an object and a complement. This extensions
PI = P2 •
I
allows also a more tight integration of the terminological module with the assertional module: n-place
The meaning of the description primitives of the language is the following: The symbols * and
relations corresponding to n-ary predicates.
The principal operation provided by this module is the subsumption operation, which verifies if
<*>, represent the universal concept and the universal relation respectively. Analogously, the
a concept or relation description subsumes another concept or relation description. In fact, any other
symbols .1 and <.1> represent the bottom concept and relation. The operator" represents negation.
meaningful relationship between concepts and relations can be reduced to subsumption (Luck and
Owsnicki-Klewe, 1987). The following definition presents the syntax of the primitives of this
The operators n and u represent conjunction and disjunction, respectively. The primitive
VP: [Xj , ..., Xnl corresponds to the KRYPTON (Brachman et al., 1985) primitive (ALL R C),
module.
where the role R corresponds to the relation P and the concept C, restricting the values of the role R.
corresponds to the set of concepts [XI, .... Xnl, restricting the values of the n-place relation P. The
Definition 5.2. Syntax of the primitives of the Frame Module
meaning of this primitive can be rephrased as: "All entities such that, if they have property P, then this
Description of concepts:
property takes its values in the concept list [X l, ... , Xnl". Analogously. the primitive
X ::=
I
* I
c
3 P : [XI, ... , Xnl corresponds to the primitive (SOME
.11
"X
property P with values taken from the list of conceptsDij, ..., Xnl". The primitive P : [X I•...• Xnl
added to the relation P. The meaning of this primitive is: "All entities which necessarily present
corresponds to the KRYPTON primitive (RESTR R C) and represents the sub-relation of P with
Xj n
n X n
u Xn
Xj u
values taken from the list of concepts [XI, ..., Xnl.
I
VP: [Xl,
, Xnl
3 P:
, X n]
[Xj ,
Description of relations:
P::=
r I
Six different definition primitives are provided: c:=X, used to associate a concept description to
I
an identificator, co-X and c:<X, used to associate an identificator to a description specifying that this
identificator represents a concept subsuming or being subsumed, respectively, by the description. The
primitives r:=P, r:>P and r.<P, are analogous to the first three primitives above with the difference
that they apply to relations.
The question primitives provided by the language are the subsumption between concepts,
<*>
XI
<.1> I
::I
X2, the subsumption between relations. Pj
and for relations, Pl
"PI
Pj n
n P
n
PI u
u Pn
::I
P2 and the equality tests for concepts, Xj = X2,
=P2.
To avoid the tractability difficulties associated to the subsumption problem, we define the
I
semantics of the above language using the same four-valued approach used to define the semantics of
P:[XI~· ..,Xnl
the assertional module. This approach, first proposed by Patel-Schneider (1986b and 1989a), allows
Definitions:
1:[ ::=
R), where a set of restrictions has been
c:=X
co-X
c:<X I
the definition of a tractable subsumption algorithm even for a very expressive language.
The semantics of this module is based on a structure similar to the logical situations called
Frame Situations. A frames situation is also composed by an environment function and an extension
function. Environment functions associate positive and negative models to each concept and relation
TIlE SEMANTICS
CHAPTER 5
THE SEMANTICS
CHAPTER 5
symbol. Extension functions allow to construct positive and negative extensions for concept and
• Constraints on the extension functions of relations:
relation descriptions based on the models associated to the primitive symbols occurring in them:
We define the set of all Frame Situations as: FF = ( sis = <m, e, 9-), where
~+[ r] == e+(r)
m is a non empty set representing domain objects,
e;: <t:+, EO> is the environment function with the following signature:
e+, e- : ( c ) -+ 2 1fJ
1fJn
e+. e- : ( r ) -+ 2 • and
~-[ r] == e-(r)
~+[
<*>] ;: mxm u .mxmxm u ..,
~-[ <*>] ;: 0
~ == <~+. ~-;> is the extension function with the following signature:
~+[ <..1.>] == 0
~+, ~- : ( X ) -+ 2 1fJ
~+, ~_ : ( P ) -+ 2 1fJn
~-[ <..1.>] == mxm u mxmxmu ...
The "classical" interpretation can be obtained by restricting e+ and e- to be disjoint and to cover their
~~~P]==~[p]
domain.
~~~p]==~[p]
The extension function is specified through a set of constraints.
~+[ PI n
• Consttaints on the extension functions <:>f concepts:
~+[ c ] == e+(c)
~-[
c ] ==e-(c)
~+[
*]
*]
~-[
== m
== 0
~-[ PI n
n P n] == ni=I ....•n ~+[ Pi ]
n P n] == Ui=I .....n ~-[ Pi ]
~+[ PI
U
u P n] == Ui=I
n ~+[ Pi ]
~-[ PI u
u P n] == ni=I
n ~-[ Pi ]
~+[ P: [X), ...• XnJ] == ( <x, Y),
Yn> I <X. YI
~+[ P : [XI •...• XnJ] == ( <x, YI,
, Yn> I <X, YI,
Yn> E ~+[ p]
A
Yi
E
~+[ Xi] )
Yn> E ~-[ P] v Yi E ~-[ Xi] )
~+[ ..1. ] == 0
~-[ ..1. ] == m
The definition primitives of this module allow the association of concept and relation
descriptions to identificators. The semantic interpretation of these primitives is a function mapping
~~'X];:~[X]
frame situations to truth values. This function associates true values to frame situations where the
~[,X];:~~X]
environment values of the identificator appearing in the definition correspond to the values of the
extension function applied on the associated description. The semantics of these primitives is given
~+[ X 1-n
n X n] ;: ni=I
n ~+[ Xi ]
~-[ XI n
n X n] ;: Ui=I, ,n ~-[ Xi ]
below.
Interpretation function for the frame definitions with respect to a frame situation s E FF:
~+[ XI
U
U
X n] ;: Ui=I
n ~+[ Xi]
~-[ XI
U
U
X n] ;: ni=I
n ~-[ Xi ]
J : ( Lf ) x FF -+ :II
J[ c:=X ] s == ( (e+(c) = ~+[ X ]) and (e-(c) = ~-[ X
~+[
~-[
V P : [XI, XnJ] ;: ( x I for all Yi E m, <x, YI, ..., Yn> E ~-[ p] v Yi E ~+[ Xi ] )
V P : [XI , XnJ] ;: [ x I there exist Yi E m, <x, YI, ..., Yn> E ~+[ p] A Yi E ~-[ Xi] )
~+[ 3 P : [XI, ..., XnJ] == ( x I there exist Yi E m, <x. YI, ... , Yn> E. ~+[ P]
~-[
3 P : [XI ....• Xii]] ;: ( x I for all Yi E m. <x, YI, ..., »>
- 85
E
~-[ P ] v Yi
A
Yi E ~+[ Xi] )
E
~-[ Xi ] )
J[ c:>X ] s == ( (e+(c) ;? ~+[ X ]) and (e-(c)
;:J[ c:<x ] s == ( (e+(c)
h)
5 ~-[ X ]) )
5 ~+[ X ]) and (e-(c);? ~-[ X
- 86
h)
TIlE SEMANTICS
CHAPTERS
THE SEMANTICS
CHAPTER 5
J[ r:=P ] s == ( (e+(r) = ~+[ P ]) and (e tr) = ~-[ P ]) }
<and-concept> ::=
J[ r:>P ] s == ( (E+(r) 2 ~+[ P ]) and (E-(r) S ~-[ P ]) }
<simple-concept> n <and-concept>
<primitive-concept> ::= <atom> I ' <atom> I * I .1
I) and (E-(r) 2
J[ r:<P ] s == ( (E+(r) S ~+[ P
~-[ P
I) }
<simple-concept> I
• Canonical form for relations:
<relation> ::= <restricted-relation> I
<restricted-relation> u <relation> I
Finally, the interpretation function for subsumption and equality questions concerning concepts
and relations, with respect to a frame situation s E FF is defined as:
<restricted-relation> n <relation>
<restricted-relation> ::=
<primitive-relation> I
<primitive-relation> ::=
<relation> : [cconceptc-j, ..., <conceptx.]
<atom> I ' <atom> I <*> I
<.1>
J : ( 8r } x FF -t :II
J[
X I :::> X2 ] s == ( ~+[ X I
J[ PI:::> P2 ] s == (
I2
~+[ X2 ] } and ( ~-[ X I
IS
~:-[ X2
I }
e-r PI ] 2 e-r P2 I } and ( e-r PI ] e-r P2 ] }
Ii
J[ XI = X2 ] s == ( ~+[
x, I
= ~+[ X2 ] } and ( ~-[ XI ] = ~-[ X2 ] }
J[ PI = P2 ] s == ( ~+[ PI ] = ~+[ P2
I } and
( ~-[ PI ] = ~-[ P2 ] }
The algorithms for calculating subsumption between concepts and between relations consists of
To convert a concept or relation description into a canonical form the following rules should be
used.
• Rules to convert the concept and relation descriptions into canonical forms:
(0)
(1)
two main steps: (i) the concept and relation descriptions involved in the subsumption question are
associativity and commutativity of the primitives n and u.
PI: [XI, ... , X n] n P2
(PI n P2): [XI, ... , X n]
converted into a canonical form and, (ii) the subsumption relation between the canonical descriptions
is calculated.
(2)
(P: [AI, ... , An]): [BI, ... , Bnl
P : [ A I nB I, ... , Ann B n]
In the canonical form, negations are applied only to atomic concepts and relations, conjuncts
and disjuncts of concepts and relations are not themselves conjuncts and disjuncts and, finally. the
concepts appearing as arguments of the primitive
V
do not contain conjunctions and those appearing
(3)
as arguments of the primitive 3 do not contain disjunctions. The canonical form can be formally
V
P: [MilEll (Xlil)' ... , MjrnElrn (Xmjrn)]
MilEl!, ... ,jrnEJrn
(V P:
[Xljl' ... , Xmjrn])
presented by the following grammar.
• Canonical form for concepts:
(4)
3 P: [UilEl! (Xlil)' ... , UjrnElm (Xmjrn)]
uilElI, ... ,jrnElrn (3 P: [Xlh' ... , Xmjrn])
<concept> ::= <simple-concept> I
<simple-concept> u <concept>
<simple-concept> n <concept>
<simple-concept> ::=
(5)
3
(P: [AI, .... AnD: [BI .... , B n]
3 P: [A In BI, ... , An n B n]
<primitive-concept> I
V <relation> : [cor-concepc-r, , -cor-concepc--]
3 <relation> : [cand-conceptc-j, , -cand-concepe--]
<or-concept> ::= <simple-concept> I
<simple-concept> u <or-concept>
(6)
, (V
P: [XI
3 P : [, X
I,
, XnJ)
, '
X n]
, (3 P: [XI
V
P: [, XI,
,X n])
, ' XnJ
TIlE SEMANTICS
, (P : [X I, ... , X n ])
(7)
(8)
<P
"
U
"
X
[A I...., Anl through the recursive application of the following rule:
P
VPI: [AI ....• VPj: [BI.···.Bml.... ,Anl
V (PI: [* .... , 3 Pj : [*, ...• *], .... *j): [A I •...• V Pj : [B 1,.. :,Bn],···.Anl
P
.
'-1
, <.>
, <-1>
*
<-1>
<.>
-1
THE SEMANTICS
CHAPTER 5
where PI' is part of the concept CI'= VPI' : [AI', ...• An'l obtained from the concept CI = \lPI :
<*>: l " XI, .... ' Xnl
X
,
(9)
CHAPTER 5
An example should help to understand the meaning of this rule. Consider the concept:
V Son: [ V Daughter: [ Rich]], i.e. "the entities whose all sons' daughters are rich".
These rules deserve some comments. The rule (0) consists only of the associativity and
This concept is transformed by rule (II) into the concept:
V (Son: [3 Daughter: [ .]) : [V Daughter: [Riehl], i.e. "the entities whose all sons.that have
commutativity properties of the primitives n and u. The rule (I) collects relations of the same arity
daughters. have rich daughters".
under the same set of restrictions. The rule (2) combines the restrictions applied to the same relation.
The extensions of both concepts are the same. the reason for the transformation is that the first
The rules (3) and (4) split restrictions consisting of disjunctions and conjunctions in such a way that
3
the concepts appearing as arguments of the primitives V and
do not contai~ conjunctions and
disjunctions. respectively. The rule (5) is necessary because the primitive
3 P:[A}, .... Anl
can also
concept restricts all sons. even if they do not have daughters. to have rich daughters. This has no
effect on the extension of the concept but can preclude the subsumption of this concept by some other
concept where the son relation is more restricted. just like the second concept above.
be expressed as 3 (P:[A I..... A n]):[· •...•• l. this rule being used to unify these two expressions in
the canonical form. The rules (6)-(7) distribute negations over the other primitives in such a way that
• Algorithm for subsumption between relations:
all negations are applied only to atomic concepts and relations. The rule (8~ is used to eliminate double
SUB-R(R}, R2) =
negations. Finally. rule (9) is used to eliminate negated universal and bottom concepts or relations.
The second part of the subsumption calculation is the algorithm which determines the
subsumption relation between two canonical descriptions.
if RI = <.> v R2 = <-1> then T else
if RI
E
<primitive-relation>
A
R2 E <primitive-relation> then RI = R2 else
R2m then VR2j 3 Rli SUB-R(Rli. R2j) else
Rln
A
R2 = R21 U
U
ifRI = Rll n
n Rln
A
R2 = R21 n
n R2m then VRli 3 R2j SUB-R(Rli. R2j) else
• Algorithm for subsumption between concepts:
if RI = RII
U
U
Rln
A
R2 = R21 n
n R2m then 3 R2j 3 Rli SUB-R(RIi. R2j) else
SUB-C(CI. C2) =
ifCI =. v C2 =-1 then Telse
if RI = RII
U
U
Rln then SUB-R(RII. R2) v··· v SUB-R(Rln. R2) else
if R2 = R21
U
U
R2n then SUB-R(RI. R21) A
if CI e <primitive-concept>
ifCI = CIl u·.. U Cln
A
A
if RI = RIl
C2 E <primitive-concept> then CI = C2 else
C2 = C21 U
.. • U
C2m then VC2j
3 Cli SUB-C(Cli. C2j) else
ifCI = Cn n
n Cln
A
C2 = C21 n ... n C2m then VCli 3 C2j SUB-C(Cli. C2j) else
if CI = CII
U
U
Cln
A
C2 = C21 n ..: n C2m then
if CI = CII
U
U
Cln then SUB-C(CII. C2) v··· v SUB-C(Cln. C2) else
ifC2 = C21
U
U
C2n then SUB-C(CI. C21) A'"
3 C2j 3 Cu SUB-C(Cli. C2j) else
A
SUB-C(CI. C2n) else
A ... A
U
U
... A
SUB-R(RI. R2n) else
A •.. A
SUB-R(Rln. R2) else
if RI = RII n
n Rln then SUB-R(RI}' R2)
if R2 = R21 n
n R2n then SUB-R(RI. R21) v·.. v SUB-R(RI. R2n) else
if R] = <primitive-relation>
if R] = POI: [AI ..... Anl
A
A
R2 = P2: [BI
R2 = P02: [BI
Bnl then SUB-R(RI. P2) else
Bnl then
SUB-R(POI. P02)
A
SUB-C(Ai. Bi)i = I, .... n else F
if CI = CII n
n Cln then SUB-C(CII, C2)
SUB-C(Cln. C2) else
The equality test can be implemented by verifying if two concepts or relations subsume each
ifC2 = C21 n
n C2n then SUB-C(CI, C21) v ..· v SUB-C(CI. C2n) else
other, These algorithms can be executed in time proportional to the square of the sum of the sizes of
ifCI = 3 PI: [AI ...., Anl
A
C2 = 3 P2: [BI ..... Bnl then
SUB-R(PI. P2)
irCI = VPI : [AI ...., Anl
A
SUB-C(Ai. Bi)i = I..... n else
A
C2 = VP2: [BI •...• Bnl then
SUB-R(P2, PI')
A
SUB-C(Ai. Bi)i = I, .... n else F
- 89
the two expressions involved in the subsumption question. but the conversion of the descriptions into
canonical form can exponentially augment their sizes and this situation is worse in the case of n-place
relations.
We are now in the condition 10state the main result of this section:
- 90
THE SEMANTICS
CHAPTERS
THE SEMANTICS
CHAPTERS
Theorem 5.2. The algorithms SUB-C and SUB-R correctly compute subsumption between
are allowed in the language: H(kl ~ k2), to verify if class kl is a sub-class of class k2. in hierarchy
concepts and between relations, respectively, i.e. the algorithms are both sound and complete
H, and H(kl
according to the four-valued semantics presented above. I
The semantics of the language is based on Semantic Network Situation. A semantic network
situation consists of three elements: a set of domain objects ($), an environment function (E) and an
~
k2), to verify if class kl is not a sub-class of class k2 in hierarchy H.
The proof of this theorem is quite long because of the many cases that should be treated, but it
extension function (~). The environment function associates to each class identificator, independently
is not very complicated. The proof is divided into two parts: The proof of the correctness of the
of the hierarchies in which it participates, two sets: the positive model and the negative model. The
canonical form transformation rules with respect to the subsumption relation and the proof of the
models are subsets of the set of domain objects. In a given situation, the positive model can be
correctness of the algorithms themselves. The complete proof is presented in appendix A.
interpreted as the set of objects known to belong to the class and the negative model as the set of
objects known not to belong to the class.
5.1.3. The Semantic Network Module
The environment function also maps each hierarchy identificator into two models. The positive
This module manipulates the notions of Classes and Hierarchies. The hierarchies can be
model of a hierarchy consists of a set of pairs of classes, represented by a pair of class models. If a
explicitly created by defining links between classes. Two types of links are provided: Default links
pair of classes belongs to the positive model of a hierarchy, we say that the hierarchy supports the
and Exception links. The hierarchies are used as inheritance paths between classes. The main
positive link between the first and the second classes of the pair. Analogously, the negative models of
inference procedure of this module calculates the Subclass relation taking into account the explicit
a hierarchy is a set of class pairs denoting the negative links supported by the hierarchy.
exceptions. The following definition presents the syntax of the primitives of the language.
The extension function associates each hierarchy description to a pair of hierarchy models.
These models are determined by the models of the class and hierarchy identifiers occurring in the
Definition 5.3. Syntax of the primitives of the Semantic Network Module
k
K::=
description. More formally:
I
KI ffi ...ffi Kn
Given a set $ of domain objects, we define the following sets:
2 m, the set of class models.
J( ;: 2 mx 2 m= ( x, "I, "2, ... ), the set of classes.
Description of relations:
hi
H::=
kl ~ k2
I
2 XxX, the set of hierarchy models.
~ ;: 2 XxX x 2XxX = ( 11,11 J, 112, ... ), the set of hierarchies.
kl ~k2 I
HI ffi '" ffi
n,
In figure' 5.1, the class and hierarchy models are presented diagrammatically. Each class is
Defmitions:
z, ::=
k:=K
I
associated to a set partitioned into its positive and negative models, this set is represented by an ellipse
h:=H
divided into two sections. The hierarchies are represented by directed graphs, where the nodes consist
of classes and the edges can be of two kinds: the default nodes, denoted ~, and the exception nodes,
Questions:
8 s ::=
H(kl
~
H(kl
-1+ k2) •
denoted
k2) I
The meaning of the primitives of the language is the following: The infix operators
~
and
-1+
take two classes and construct a hierarchy consisting of a single positive or negative link,
respectively. The infix operator ffi, applied to classes, create a new class which is more specific then
the given classes. When applied to hierarchies, the operator ffi takes two hierarchies and construct a
new hierarchy consisting of all positive and negative links occurring in these hierarchies.
Two definition primitives are provided: k:=K, used to associate a class description to an
identificator and h:=H, used to associate an hierarchy description to an identificator. Two questions
-1+.
TIlE SEMANTICS
CHAPTERS
THE SEMANTICS
CHAPTERS
~+[ kl -1+ k2 ] : '"
~-[ kl -1+ k2 ] : { <el kj
Lel
k2
J> j
~+[ HI $
$ Hn ] : Ui=I..... n ~+[ Hi ]
1'-[
HI $
..,
$
iI n ]: U'=I
1'-[
1
, •.. ,n'"
RI
I
The semantic effect of a hierarchy is to increase the information about the classes belonging to
it. Each hierarchy can be thought of as a possible world. where some relations between the classes are
valid. A special Extended Model Function (M) is defined to capture this second level of information
about classes belonging to a hierarchy. The positive extended model function maps a given class and
Fig. 5.1. Class and Hierarchy Models
Next, we define the set of Semantic Network Situations as SS = ( s I s=<~, E, ~> j, where
Environment function:
a given hierarchy into a extended class model, denoting the elements of the domain known to belong
to the class, considering the usual class models and the links supported by the hierarchy.
Analogously, the negative extended model function maps the classes and the hierarchies into the
elements known not to belong to the classes. More formally:
E = <e+, E->
We define M = <M+, M-;., the extended model function.
e:(kj-tJ(
M:'3exJ(~J(
E+. E-: ( k j -t 2m• and d k ] : <e+[ k ], E-[ k ]>
M+, M- : '3e x J( ~ 2 m, and M(T\, Ie)': <M+(T\. x), M-(T\, Ie»
E:(hj-t'3e
E+, E- : ( h j -t
2J(xJ(, and d h ] :
<etI h L e-[ h J>
Extension function:
~ = <~+, ~->
The adopted condition is based on the intuitive relations that should hold between the models of two
~:(Hj-t'3e
~+. ~- : ( H j -t
The goal of the semantic definition of inheritance is to define conditions that hold if and only if
a class is, or is not, a sub-class of another class, considering the links supported by some hierarchy.
2J(xJ(, and ~[ h ] :
<~+[ h
J, ~-[
h ]>
The extension function should respect the following constraints:
and B-. If this is all the information we have about the classes A and B. we can say that the class A is
1\
B- s A-, i.e, if all elements of A are also elements of B and if
all elements that are not in B are also not in A. In the same way, we can say that A is not a sub-class
~~k]:e-[k]
of B iff A+ s B- 1\ B+ s A-. i.e, if all elements in A are known not to be in B and all elements in B
~+[ KI ED ... $ x, ] : ni=I
~-[ KI ED .,. $ Kn ] == Ui=I
are known not to be in A.
n ~+[
Hi]
n ~-[ Hi]
In the case of a hierarchy. we have two sources of information: the models of the classes
belonging to the hierarchy and the models of the hierarchy itself. To determine if a class is a sub-class
of another class, we verify if the set of all the elements of the class, the elements of its models. are
~[h]:~[h]
included in the set of elements of the other class, but now we do not use the usual model of the class
~~h]:e-[h]
~-[ k, ~ k2 ] ==
For example, consider the set A+ whose elements belong to the class A and the set A-whose
elements do not belong to this class and, analogously, consider the class B represented by the sets B+
a sub-class of class B iff A+ s B+
~~k]:~[k]
~+[ kj ~ k2 ] == ( <d kl
classes in order to one class to be a sub-class of the other.
but the extended models which takes into account the information provided by the hierarchy. The
I. d
other containment conditions are treated analogously and the final conditions are the following:
k2 ]> j
e
- 93
- 94
THE SEMANTICS
CHAPTERS
IS-A(H. kj, k2) == e-I kj ] C;; M+(~[ H I. d k2 ]) and e-[ k2 ] ~ M-(~[ H I. d kj ])
IS.NOT-A(H. kj , k2) == e+[ kj ] ~ M-(~[ H I, d k2 ]) and e-I k2 ] ~ M-(~[ H I. E[ kj ])
The functions IS-A 'and IS-NOT.A clearly depends on a semantic network situation. if the
CHAPTERS
THE SEMANTICS
M+(1'\. IC) == e+[ IC] U VlCj 4 IC E
1\1-(1'\. IC) == e-[ IC] U VlCj -h IC E
U V IC ~ ICj E
U VIC -h ICj E
1'\. M+(1'\. ICj)
1'\, M+(1'\. ICj)
1'\. M-(1'\. ICj)
1'\. M+(1'\. ICj)
situation is not specified in the context we should specify explicitly the situation as an exponent: IS
A(H, kj , k2)s. The reason why we need two models for each class is the necessity of having a
The semantic described by the above definition is monotonic. in the sense that the relations
semantic interpretation for inheritance hierarchies like the one represented in figure 5.2. In this case.
described by the links are true without exceptions. and it is equivalent to the semantic proposed by
we have two direct links stating that A is a sub-class of B and that A is not a sub-class of B. We
Thomason et aI. (1986). A first attempt to transform our semantic in a nonmonotonic one is to
intend to interpret this situation in such a way that the answer to both questions - "Is A a sub-class of
preclude the positive inheritance in presence of a direct negative link and the negative inheritance in
B?" and "Is A not a sub-class of B?" - should be yes.
the presence of a direct positive link. This is obtained by the followin~ definition:
M+(1'\, IC) == etI IC ] U V ICj ~ IC E 1'\. e+[ ICj ] U
V lei ~ IC E 1'\. if ICj -h IC l! 1'\ then e+[ ICj ]
M-(1'\, IC) ;;; e-[ IC ] U V ICj -h IC E 1'\. etI ICj ] U
~
A •
• B
~
1'\, if ICj ~ ICj E 1'\ 1\ ICj -h ICj l! 1'\
U VIC 4 ICj E 1'\, e-[ ICj ] U
VIC ~ ICj E 1'\. if IC -h ICj l! 1'\ then e-[ ICj ]
U VIC-h ICj E 1'\. e-l-[ ICj] U
Fig. 5.2. Contradictory Links
V lei -h IC
E
. V IC ~ ICj
E
1'\. if ICj -h ICj
E
1'\
1\
IC -h ICj l! 1'\
1\
ICj ~ IC l! 1'\ then e+[ ICj ]
1\
IC
~ ICj l! 1'\ then e+[ ICj ]
In a single model semantics. where the sub-class relation is represented by set containment
between the models. it is impossible for the model of A to be and, simultaneously, not to be contained
.The inheritance strategy of the above definition can be classified as a Credulous Inheritance
into the model of B. With two models semantics, there is no problem for finding a model for the
Strategy. because it allows contradictory paths to be simultaneously supported, We can isolate in the
contradictory situation. it is enough that the two conditions IS-A and IS-NOT-A, stated above, be
above definition the panicular inheritance strategy. prohibit the inheritance in the presence of an
simultaneously valid. Before proceeding its necessary to define some notations. This is done in the
opposite direct link. and define it as a separate function.
following definition.
Definition 5.4. Semantic network notation.
Positive Link with respect to hierarchy 1'\; <E[ 1C()1 d ICI]>
Negative Link with respect to hierarchy 1'\: <E[ IC()],
d
E
~+[ 1'\ ]. Notation: IC() ~ ICI
ICI]> E' ~-[ 1'\
1
1'\
Notation: IC() -h ICI E 1'\
E
•
1\
ICj -h 1C2
ICI -h ICj l! 1'\
1\
ICI
1\
ICI -h 1C2 l! 1'\ then True else False
4
E
1'\ 1\
1C2 l! 1'\ then True else False
Using this definition we can rewrite the extended model function:
Positive path with respect to hierarchy 1'\:
«e[ 1C()1 e[ ICI i-, <E[ 1C21 d 1C3]>.....
C (1'\, ICI ~ 1(2) == if ICI ~ 1C2 E 1'\
C(1'\. ICI -h 1(2) == if ICI ~ ICj E 1'\
«r ICn-ll -r ICn ] »
C;;
e-r 1'\ ]. Notation: ICO ~ ICn
M+(1'\. IC) == e+[ IC ] U V ICj ~ IC E 1'\, e+[ ICj ] U
V ICj, if C(1'\. IC
The behavior of our inheritance definition depends on the extended model function M.
Knowing that. if the link ICI ~ 1C2 belongs to the hierarchy then ICI should be a sub-class of 1C2 and
that if the link ICI -h 1C2 belongs to the hierarchy then ICI should not be a sub-class of 1C2, then the
natural way to define the extended model function is the following:
4
ICj) then e+[ ICj ]
TIIE SEMANTICS
CHAPTER 5
M-(11. K):= e-[ K] U V Ki -1+ K E 11. E+[ Ki ] U
Interpretation function for the semantic network descriptions with respect to a situation s E SS:
V Ki, if (:(11, Ki ~ K) then E+[ Ki ]
U V K ~ Ki E 11. E-[
V Kj, if C(T\, K ~
U VK -1+ Ki E 11. E+[
V Ki, if C(11. K -1+
THE SEMANTICS
CHAPTER 5
':1 : (1:s J x SS
-+ $
Ki ] U
':1[ k:=K I s := ( (E+(k)= ~+[ K ]) and (c(k) = ~-[ K ]) J
':1[ h:=H ] s := ( (E+(h)= ~+[ H ]) and (E-(h) = ~-[ H I) J
Ki) then E-[ Ki ]
Ki ] U
Ki) then E+[ Ki ]
Interpretation function for inheritance questions with respect to a semantic network situation s E SS:
This last definition can be thought of as the generic definition of inheritance with exceptions in
':1 : ( as J x SS
-+ $
our formalization, The function C defines the specific strategy of inheritance and provides the
connection between the model-theoretic semantics and the operational semantics of inheritance. The
inherent non locality of the nonmonotonic inheritance with exceptions makes it more appropriate to
':1[ H(kl ~ k2) ] s :=IS-A(H. kj , k2) s
':1[ H(kl -1+ k2) ] s == IS·NOT-A(H. kl. k2) s
define the inheritance strategy recursively or inductively. In chapter 3. we define the skeptical
inheritance strategy (Horty et al., 1987) inductively. Here. we define recursively a similar inheritance
In the logical level. the semantic network and the logical modules are interconnected. The
strategy. This strategy when incorporated to our semantic definition provide the same results as the
defined integration of these two modules uses inheritance between classes of the semantic network
skeptical inheritance. with two exceptions: (i) In our semantics the relation IS·NOT·A is symmetric.
module to represent the implication relation between predicates of the logic module.
thus if we have IS-NOT-A(H. kj , k2) we also have IS-NOT-A(H. k2. kj) and (ii) the IS-A
The possibility of explicitly representing exceptions allows the introduction of nonmonotonic
reasoning in the logical module. Also the fact that inheritance in the semantic network module is
relation is reflexive. i.e. IS-A(H, k, k) is always true. The strategy function for the skeptical
calculated with respect to a given hierarchy allows for the representation of a set of possible worlds,
one corresponding to each hierarchy.
inheritance is the following:
C(T\, KI
~
K2) == if KI ~ K2 E 11 then True else
An algorithm for the monotonic strategy is defined in Thomason et al. (1986). For the
if KI -1+ K2 E 11 then False else
credulous strategy. it is necessary to create a mechanism to separate the different extensions supported
if 3 K ~ K2 E 11 /\ C(T\. KI ~ K) /\
by the semantics. We describe here an algorithm for the skeptical strategy defined by the above
semantics. Our algorithm is in many ways similar to the algorithm presented by Harty et al. (1987).
V K' ~ K2
E
11. C(11. KI ~ K') ~
3 K ~ K2
OO
E
11/\ C(11. KI ~ K") /\ C(11. K" ~ K')
then True else False
C(T\. KI -1+ K2) :=if KI -1+ K2 E 11 then True else
In describing the algorithm we assume the availability of the following abstract data types:
if KI ~ K2 E T\ then False else
if
but in our case we provide a unique algorithm for both types of links and also take into account the
fact that the IS·A relation is reflexive and the IS-NOT-A relation is symmetric.
Graph, used to represent hierarchies and containing at least a function for verifying if some labelled
3 K -1+ K2 E 11 /\ C(11. KI ~ K) /\
edge is present in a given graph, and Link used to represent the link types (default and exception) and
V K' ~ K2 E 11. C(T\. KI ~ K') ~
containing at least a function to invert the link labels. A possible signature of these types. where
3 K" -1+ K2 E 11 /\ C(11. KI ~ x") /\ C(11. K
OO
~ K')
Hierarchy and Class are just sub-types of the Identifier type, is the following:
then True else False
Type Graph
With this last definition in hand, we can present the semantics of the definition and question
primitives of the semantic network module.
Functions:
Is-edge : Hierarchy x Class x Class x Link
~
Boolean
End Type.
- 97
·98
THE SEMANTICS
CHAPTER 5
CHAPTER 5
THE SEMANTICS
5.2. The Logical Level
Type Link = (Default, Exception)
. At this level, the knowledge bases, and their manipulation functions, the primitives Ask and
Functions:
Tell, are introduced. These primitives receive two parameters: A knowledge base description and a
Invert: Link --} Link
module access primitive. These module access primitives are the interface between the Ask and Tell
primitives and the definitions and questions of the modules of the first level. The module access
End Type.
primitives also provide the information about which module should be affected by the specific Ask or
The algorithm consists of two functions: The SUB-CLASS function and the SKEPTICAL
Tell primitive. The following defmition introduces the syntax of the primitives of this second level.
function. The SUB-CLASS function is the main function, it takes into account the symmetry of the
relation IS-NOT-A and the reflexivity of the relation IS-A, and it calls the function SKEPTICAL.
The function SKEPTICAL follows the recursive defmition of the skeptical strategy:
Definition 5.5. Syntax of the primitives of the logical level.
The non-terminals 1:(, l:cand
l:s represent, respectively, the definitions of the assertional, frame
and
semantic network modules and the non-terminals 8), 8c and 8 s represent the questions of these same
modules. Finally, the non-terminal H represent the hierarchy descriptions of the semantic network
SUB-CLASS(H, K), K2, LINK) =
if LINK = Default and K) = K2 then True else
if SKEPTICAL(H, K), K2, LINK) then True else
if LINK = Exception then SKEPTICAL(H, K2, KI' LINK)
module.
Knowledge base declaration:
D ::=
<kbase-identifier>:=B
Knowledge base creation and update:
B ::=
New-kbaseO I Tell(B, 'Ptell)
SKEPTICAL(H, K}, K2, LINK) =
if Is-edge(H, K}, K2, LINK) then True else
if Is-edge(H, K), K2, Invert(LINK» then False else
if 3 K, Is-edge(H, K, K2, LINK) and SUB-CLASS(H, K), K, Default) and
VK', Is-edge(H, K', K2, Invert(LINK» and SUB-CLASS(H, K}, K', Default) =>
Knowledge base query:
A ::=
Ask(B, 'Pask)
Module access primitives:
'Ptell ::=
3 K", Is-edge(H, K", K2, LINK) and
SUB-CLASS(H, K), K", Default) and
SUB-CLASS(H, K", K', Default)
then True else False
The soundness and completeness of the above algorithm is established in the following
theorem:
lo-loglc(1:I) .1
lo-frame(1:f) I
lo-snel(1: s) I
'Pask ::.
from-logic(81l1
from-frame(8f) I
from-snel(8 s)
I
from-logic-frame(81) I
from-loglc-snel(8" H) I
from-frame-snet(8f, H) •
Theorem 5.3. The above algorithm is sound and complete for the computation of the skeptical
inheritance relation defined above. That is:
(i) SUB-CLASS(H, K), K2, Default) iff V s E SS, j[ H(k( --} k2) ] s
Formally, a knowledge base is defined as a set of partitions, one for each knowledge
representation module of the epistemological level.
(ii) SUB-CLASS(H, K), K2, Exception) iff V s E SS, j[ H(k) -h k2) ] s
Proof. The proof is done by induction on the length of paths in the hierarchy H. The SKEPTICAL
function of the algorithm and the strategy function for the skeptical inheritance' correspond line by
line. The only details that should be verified is the reflexive property of the relation k) --} k2 and the
symmetric property of the relation k j -h k2. These properties are taken into account by the SUB
CLASS function of the algorithm. Due to its triviality, we do not present the complete proof. I
Semantics of the primitives of the logical level:
[ New-kbaset) ] == <BI...o, BFo, BSo>
[ Tell(B, 'Ptell) ] == [ 'Ptell ] ([ B ])
[ Ask(B, 'Pas0 ] == [ 'Pask ] ([ B ])
THE SEMANTICS
CHAPTER 5
Notation:
L«BL, BF, BS»
The semantics of the frame primitives are the following:
= BL
F(<BL, BF, BS» = BF
S«BL, BF, BS»
THE SEMANTICS
CHAPTER 5
[ to-frame(I.t) ] ;: AB. <L(B), ( sis e F(B) ATe 'J[ I.t ]
= BS
[ from-frame(8f) ] ;: AB. if
Next, the semantic interpretation of the Ask and Tell primitives are defined. These primitives
S
I. S(B»
V s e F(B). T e 'J[ 8f ] S then T else F
5.2.1.3. Semantic Network Knowledge Bases
can be separated into two classes: the primitives corresponding to each module independently and the
Analogously, a semantic network knowledge base consists of a set of semantic network
primitives defining the interaction between two modules. The semantics of the primitives of each of
these classes is defined in the following sections.
situations. and an empty semantic network knowledge base consists of all possible semantic network
5.2.1. Isolated Modules
BS ;: S is a semantic network knowledge base. where S C;;;; SS, the set of all semantic network
The epistemological modules can be used independently, through the use of the module access
primitives to-M and trorn-M, where M is the name of a module. To define the semantics of this
situations. More formally:
situations.
BSO;: SS is an empty semantic network knowledge base.
independent utilization it is enough to present the semantics of these two primitives.
The semantics of the primitives allowing the manipulation of semantic network knowledge
5.2.1.1. Assertional Knowledge Bases
bases is the following:
Assertional knowledge base partitions consist of a set of sets of compatible logical situations.
[ to-snet(l:s) ] ;: AB. <L(B), F(B), ( sis e S(B) ATe 'J[
An empty assertional knowledge base consists of all possible sets of compatible logical situation,
more formally:
[ from-snet(8 s) ] ;: AB. if
BL;: S is an assertional knowledge base, where S C;;; LL.
5.2.2. Interaction between Modules
BLo ;: LL is an initial assertional knowledge base.
Vs e
z, ] S I>
S(B), T e 'J[ 8 s ] s then T else F
The main advantage of a unified semantics is the facility for the definition of the interaction
between different modules. The idea underlying the interaction between the three modules is to use
The semantics of the primitives allowing the manipulation of assertional knowledge bases can
be constructed using the previous definitions:
the functionalities of one module to increase the inference power of another. Our first-order logic
module, due to the four-valued semantics, provides a very weak entailment relation. More precisely.
it does not allow any chaining of facts in the inference procedure, thus not allowing modus ponens as
[ to-logic(1:) ] ;: AB. « SIS e L(B) ATe 'J[ 1:1 ] S v }, F(B), S(B»
an inference rule (Frisch, 1987b). The frame and semantic network modules are then used to
where v is arbitrary because the formula: 1:)are restricted to be in closed form.
reintroduce chaining between predicates in a controlled way. On the other hand. the results of
[ from-Iogic(SI) ] =< AB. if
V S e L(B). T e 'J[ 81 ] S v then T else F
subsumption tests can be stored in a semantic network hierarchy, in such a way that, if this same
subsumption relation is asked again the result can be given directly.
5.2.1.2. Frame Knowledge Bases
The symbols associated to the epistemological notions defined in a given knowledge base are
Frame knowledge bases consist of a set of frame situations, again
an empty frame
knowledge
joined together into sets that are manipulated by the interaction functions. These sets are the
base contains all possible frame situations. More formally:
following:
BF;: Sis a frame knowledge base, where S C;;;; FF, the set of all frame situations.
(PIK - the set of all predicate symbols.
BFo =< FF is an empty frame knowledge base.
(c IK - the set of all concept symbols.
(rn}K = ( rn I rn e (r) IK - the set of all symbols associated to relations of arity n.
(PnlK - the set of all predicate symbols of arity n.
(f)K = (C}K U [Ui=2.....~( (rnIK)] - the set of all frame entities.
- 101
- 102
TIlE SEMANTICS
CHAPTER 5
THE SEMANTICS
CHAPTER 5
I k I K - the set of all symbols associated to classes.
IkhlK _the set of all class symbols occurring in the hierarchy h.
Where K is the name of the knowledge base. This name is omitted when it is clear to which
knowledge base the symbols belong. The interaction between two different modules is provided by
module access primitives of the form frorn-M-N where M and N are module names. The semantic
definition of these primitives makes use of functions, denoted MN, allowing the construction of a
LF : BL x BF --+ BL
LF(BL, BF)==letn= (PII n (cl U [Ui=2.....oo«(Pnl n (rn))] in
( SI S e BL 1\ V'XI en. V'X2 e (f), (V'se BF, Te J[ x2:::1 XI] S)
::::) (~+[ Xl ] S ~+[ xd 1\ ~-[ X2]
S ~-[
XI] ) I
The set n contains the symbols which are defined simultaneously as predicates and as concepts
new knowledge base partition for module M taking into account the knowledge stored in the
or relations. The definition simply states that if the subsumption X2:::1
knowledge base partition associated to module N. Once this new M partition is constructed, questions
belonging to the frame knowledge base, then we chose to belong to our new assertional knowledge
base only the compatible logical situations which support the t-entailment XI --+t X2.
of the module M can be formulated to be answered using the knowledge stored in this new partition.
Using these MN interaction functions we can define the semantics of the module access primitives
xj
is valid in all frame situations
Given the above definition, we can define an algorithm that takes as input a first-order logic
formula, an assertional knowledge base, consisting of a set of formula: in 3 NF normal form, and a
primitives corresponding to the interaction between modules-:
frame knowledge base, consisting of a set of defined frame entities, and returns true if this formula is
t-entailed by the modified knowledge base defined by the function LF. The algorithm is the
following:
[ from-MN(e m) ] == AB. [ from-M(el) ] (MN(M(B), N(B) [, H)))
Where M(B) is the partition of the knowledge base B associated to the module M. The
expression "[. H]" in the parameters of the function MN means that in some cases an hierarchy
LF-QUESTION(~,
BL, BF) ==
symbol is also necessary for the definition of the interaction function. In the following sections, the
I. Calculate ~VNF using the algorithm NORMAL-FORM(~, V).
possible interactions between the different modules are analyzed. Nine interaction functions are
possible: : Logic-frames. logic-semantic network, frame-semantic network, frame-logic. semantic
2. Define P<I> as the set of all predicate symbols appearing in ~.
3. For all symbols p e P<I> n IflBP calculate the list of symbols associated to frame entities
network-logic, semantic network-frame, logic-frame-semantic network. frame-logic-semantic
subsumed by p using the algorithms SUB-C and SUB-.R. Call it Sp.
4. Calculate T-ENTAILMENT«( ~'I~' e BL), ~VNF) but in step (2) of the algorithm:
network and semantic network-logic-frame. The semantics of all these interactions are defined, but
algorithms are provided, and proved sound and complete with respect to the semantic definition, only
"For all Pi and for all <Ij calculate eij, the set of all substitutions e such that <Ije S Pie."
for the first three interactions. The theorems establishing the soundness and completeness of the
Instead of using the normal unification algorithm for calculating e, use a modified algorithm that
accepts two predicate heads PI and P2 as non clashing whenever PI = P2 v PI e SP2 v P2 e Spl'
interaction algorithms are an original contribution of this thesis, their proofs are presented in the
appendix B. The first three interactions have been implemented and integrated into the hybrid system
5. Retum the result ofT-ENTAILMENT.
for knowledge representation described in chapter 6.
The properties of this algorithm are established in the following theorem:
5.2.2.1. First-Order Logic and Frames
In this interaction, we need to construct an assertional knowledge base taking into account the
knowledge stored into a frame knowledge base. To achieve this, we associate unary predicates to
concepts and predicates of arity n ~ 2 to n-place relations. We consider the assertional knowledge
Theorem 5.4. The above algorithm is sound and complete to calculate the interaction between the
first-order logic and frame modules defined above, i.e.:
LF-QUESTlON(~, BL, BF) iff [ frorn-logictsp) ] (LF(BL, BF)).
I
base constructed from all the compatible logical situations that belong to the assertional knowledge
base which SUPP1>rt the t-entailrnent of predicate X2 by predicate
xj ,
if the frame knowledge base
The proof of this theorem is presented in the appendix B.
supports the subsumption of concept or relation XI by the concept or relation X2.
This can be formalized by the definition of a function mapping assertional and frame knowledge
bases into the desired assertional knowledge bases. This definition is the following:
5.2.2.2. First-Order Logic and Semantic Networks
The interaction of the assertional knowledge base with semantic network knowledge base is
very similar to the interaction of the assertional and frame knowledge bases. We only consider the
2The interaction functions between three modules are analogous, we just have In consider a from-MNL function.
TIIE SEMANTICS
CHAPTER 5
inheritance relation over a given hierarchy in place of the subsumption relation of the frame
knowledge base. What we need is an assertional knowledge base constructed from all the compatible
THE SEMANTICS
CHAPTER 5
5. Calculate T-ENTAILMENT«( <1>' 1<1>' E BLl. <1>VNP) but in step (2) of the algorithm:
"For all Pi and for all Uj calculate 8ij, the set of all substitutions e such ~hat Uje S Pie."
e, use a modified algorithm that
logical situations belonging to the given assertional knowledge base which support the t-entailment of
Instead of using the normal unification algorithm for calculating
predicate X2 by predicate
accepts two predicate heads PI and P2 as non clashing whenever PI = P2 v PI E SP2 v P2 E SPI
xj ,
if the given hierarchy supports the subclass relation between class Xl and
class X2. Besides this, in the semantic network module, we have the possibility of a class not being a
subclass of another class. In this case, our assertional knowledge base should contain the compatible
v (PI =
PN /\ P2 E
Np) v (P2 =
PN /\ PI
E Np)
6. Return the result ofT-ENTAILMENT.
logical situations which do not support the t-entailment between the classes.
This definition can be formalized by the following function. The function maps the assertional
The properties of this algorithm are established in the following theorem:
knowledge bases, the semantic network knowledge base and a given hierarchy, defined in the
semantic network knowledge base, into the desired assertional knowledge base.
Theorem 5.5. The above algorithm is sound and complete to calculate the interaction between the
LS : BL x BS x H -+ BL
LS-QUESTION(<1>, H, BL, BS) iff I from-Iogic(<1» ] (LS(BL, BS, H».
first-order logic and semantic network modules defined above, i.e.:
LS(BL, BS, H) :;; let n = (Ui=I,...,oo(Pn))
(SIS e BL/\ V'XI En, V'X2E (kHI,
(V's E BS, T E j[ H(x I -+ x2>.
(V's e BS, T e j[ H(x I
I
-1+ X2) ]
n (kHI
in
The proof of this theorem is presented in the appendix B.
S) ~ ( ~+[ XI ] <;; ~+[
xz ] /\ ~-[
x2 ] S ~-[ Xl ] ) /\
S) ~ (~+[ XI ] S ~-[ X2 ] /\ ~+[ X2 ] <;; ~-[ .xI ] ) I
5.2.2.3. Frames and Semantic Networks
In the frame and semantic network interaction, we use a hierarchy as an explicit representation
In the function definition, n contains the symbols defined simultaneously as classes and
of the subsumption relation. We construct a frame knowledge base supporting the subsumption of a
predicates. The first part of the conjunction states that if the hierarchy H supports XI -+ x2, according
concept
to the semantic network knowledge base, then the compatible logical situations which supports the t
knowledge base, that XI is a subclass of X2.
entailment XI -+t x2 belong to the new assertional knowledge base. The second part states that if H
supports XI
-1+ X2, then the chosen compatible logical situations do not support XI -+t x2.
xj
by a concept X2 if the given hierarchy supports, according to the semantic network
The fact that in the semantic network module it is possible to represent explicit exceptions and
that in the frame module this possibility does not exist introduces some problems in the definition of
The algorithm to calculate this interaction is very similar to the previous algorithm used to
this interaction. The main idea is to include all subsumption relations defined into the frame module as
calculate the assertional frame interaction. It takes as input a first-order logic formula, a hierarchy
links of the given hierarchy, and use the inheritance algorithm to decide about the subsumption
symbol, an assertional knowledge base, consisting of a set of formula in 3 NF normal form, and a
relation of the interaction.
semantic network knowledge base, and returns true if this formula is t-entailed by the modified
We must use the inheritance algorithm because the fact that we include exceptions among the
subsumption relation may. differently of the other interactions, invalidate previously valid
knowledge base defined by the function LS. The algorithm is the following:
subsumptions. This cas~ arise when we introduce, through the given hierarchy, an explicit exception
LS-QUESTION(<1>, H, BL, BS):;; .
link between two entities belonging to a subsumption relation in the frame module. In this case, we
I. Calculate <1>VNF using the algorithm NORMAL-FORM(<1>, 'I).
will have two contradictory links, and by the definition of the skeptical inheritance we will conclude
2. Define P<1> as the set of all predicate symbols appearing in <1>.
that the subsumption is no more valid.
3. For all symbols p E P<1> n
lklns calculate,
using the algorithm SUB-CLASS, the set of symbols
On the other hand, we cannot define the new frame knowledge base only through Ihe semantic
associated to subclasses of p in hierarchy H, denoted Sp, and the set of symbols associated to non
values of the inheritance relation of the given hierarchy, because it can be the case that a previously
subclasses of p, denoted Np.
4. Substitute each literal of the form ., P(XI, ..., xn) in <1>VNP, by PN(XI, ..., xn) where
predicate symbol not appearing anywhere.
valid non subclass relation, due to a negative inheritance path and not to a direct link, become
PN is a new
preempted by the introduction of a direct link representing a subsumption relation. This arguments
show that the only solution is to define the interaction through the introduction of an auxiliary
hierarchy containing the given hierarchy and the subsumption relations of the frame module.
THE SEMANTICS
CHAPTER 5
This is formalized by defining a function mapping the frame knowledge bases, the semantic
network knowledge bases and the hierarchies symbols into the desired frame knowledge base. This
function is the following:
FS : BF x BS x H
~
4.IfEI and E2 are relations then:
Let SUB-R-M be a modified SUB-R algorithm where, in the second line of tQe algorithm:
"if RI E <primitive-relation> /\ R2 E <primitive-relation> then RI = R2 else"
instead of the equality test, RI = R2, the following test is used:
"RI = R2 v [SUB-CLASS(U, R2, RJ, Default) /\ ., SUB-CLASS(U, R2, RI, Exception)l"
BF
4.a. For all relations R in the frame knowledge base BF:
If Ell!: [kjj ] /\ SUB-R-M(EI, R) then create a link from R to EI in graph U.
FS(BF, BS, H) ==
let NS = ( s' I s' E BS /\ 'v'XI, X2 E If),
('v's E BF,T E 'J[ x2:J x I ] S) ~ (T E 'J[ H := He XI ~ X2] s')I in
If E2 l!: (ku I /\ SUB-R-M(R, E2) then create a link from E2 to R in graph U.
4.b.IfEIl!: [kjj ] /\ E2l!: [kjj ] /\ SUB-R-M(EJ, E2) then create a link from E2 to EI in graph U.
{sl SE FF/\ 'v'XI,X2E {kHINS,
('v's' ENS, T E 'J[ H(xl ~ X2)
THE SEMANTICS
CHAPTER 5
I
s' /\ F E 'J[ H(xl -/+X2) ] S) => (T E 'J[ x2::1 XI ] S) I
The idea behind the algorithm implementing this interaction is to construct an auxiliary graph
5. Return SUB-CLASS(U, E2, EJ, Default) /\ ., SUB-CLASS(U, E2, EI, Exception).
The properties of this algorithm are established in the following theorem:
consisting in the union of a graph containing the subsumption relation between all frame entities, and
the graph of the given hierarchy. This auxiliary graph is used as the primitive subsumption test
Theorem 5.6. The above algorithm is sound and complete to calculate the interaction between the
between concepts and relations, instead of the equality test, during the subsumption calculations
frame and semantic network modules defined above, i.e.:
necessary for the classification of the entities involved in the current question. DUring the
FS-QUESTION(C2::1 CI, H, BF, BS) iff [ from-frametf'j > CI) ] (FS(BF, BS, H».
classification of this entities we add to the auxiliary graph links representing all the subsumption
relations involving the entities of the current question. In this way, the auxiliary graph becomes an
The proof of this theorem is presented in the appendix B.
explicit representation of all the subsumption relations involving entities declared in the frame
knowledge base and entities of the current question. Finally, the auxiliary graph is used to calculate
5.2.2.4. Frames and First-Order Logic
the subsurnption question through the algorithm SUB-CLASS, allowing the exceptions to be taken
The interaction of a frame knowledge base and an assertional knowledge base consists in
into account. The input of the algorithm consists of a subsumption question, a hierarchy, a frame
answering a subsumption question taking into account the knowledge contained into the assertional
knowledge base and a semantic network knowledge base. The algorithm is the following:
knowledge base. We consider the frame knowledge base supporting the subsumption of a concept XI
FS-QUESTlON(EI :J E2, H, JlF, BS) ==
concept XI. This definition would be useless, if the first-order logic did not allow the definition of
predicates. In this case, the expression 'v' x, P(x) ~t Q(x) would be valid only in the trivial case
by a concept X2, if the assertional knowledge base supports the t-entailment of the concept X2 by the
1. Using the algorithms SUB-C and SUB-R construct a graph G where each node represent a concept
or relation of BF, and where each arrow from nj to n2 means that n2 subsumes
nj.
where P = Q. The following function formalize the definition of this interaction:
2. Calculate the graph U = G U H.
3. If EI and E2 are concepts then:
Let SUB-C-M be a modified SUB-C algorithm where, in the second line of the algorithm:
"if CI E <primitive-concept> /\ C2 E <primitive-concept> then CI = C2 else",
instead of the equality test, CI = C2, the following test is used:
"CI = C2 v [SUB-CLASS(U, C2, CI, Default) /\ ., SUB-CLASS(U, C2, CI, Exceptionj]"
FL : BF x BL
~
FL(BF, BL) == let
BF
n
=
(cl
n (PI) U [{rnl n Ui=2,....~({Pn))l in
{sl SE BF /\ 'v'XI en, 'v'X2E (PI.
('v'S E BL, ~+[ XI ]
S ~+[
X2
h
=> (T E 'J[ x2:J
xj ]
S) I
3.a. For all concepts C in the frame knowledge base BF:
If Ell!: (kul /\ SUB-C-M(EI' C) then create a link from C to Ej in graph U.
5.2.2.5. Semantic Networks and First-Order Logic
In the interaction of a semantic network knowledge base and an assertional knowledge base, we
If E2 l!: (ku I /\ SUB-C-M(C, E2) then create a link from E2 to C in graph U.
should answer a subclass question, given a specific hierarchy, taking into account the knowledge in
3.b. If Ell!: (kUI /\ E2l!: (kU I /\ SUB-C-M(EI, E2) then create a link from E2 to EI in graph U.
30ne or the reasons why the algorithms or this and or other interactions have not been defined is that the predicate
definitions or the assertional module has not been implemented, precluding the introduction or these type or
interactions.
·108
THE SEMANTICS
CHAPTERS
the assertional knowledge base. In this case. no unique intuitive interaction policy is available. We
THE SEMANTICS
CHAPTERS
5.2.2.8. Frames, First-Order Logic and Semantic Networks
chose to consider the t-entailment relation of the assertional module as a global subclass relation valid
This interaction is derived from the frame and assertional knowledge bases interaction and from
in all hierarchies. Like in the case of the interaction of the frame and the assertional knowledge bases.
the frame and semantic network knowledge bases. The formal defmition of this interaction function is
this interaction is meaningful only if the predicate symbols can be defined to correspond to formula;
the following:
The interaction function should construct a semantic network knowledge base in such a way that the
~
given hierarchy supports a positive subclass question if the assertional knowledge base supports the t
FLS : BF x BL x BS x H
entailment between the classes. and that it supports the negative subclass question if the assertional
FLS(BF. BL. BS. H) '" let NS = { s' I s' E BS 1\ 'v' xj , x2 E {fl.
('v'se BF.TE j[ X2::J Xl] S)
knowledge base does not support the t-entailment between the classes.
BF
~ (TE
The following function formalizes this definition:
n=
SL : BS x BL x H
~
1\
'v'XI E
U [(rnl
j[ H:= H Elhl
~ X2] s')),
n Ui=2.....oo({Pn))] in
{sl s e BF 1\ 'v'XI en. 'v'X2e {PI.
BS
SL(BS, BL, H) == let n;; (Ui=I ....•~{Pn))
{ sis e BS
n {PI!
[c]
n, 'v' X2 E
n {kHI
{PI. ( ~+[ Xl ]
('v'S e BL. 'v'v E VM. ~+[ XI ]
in
'= ~+[
x2
I ) ~T E
j[ H(XI ~ X2) ] S) I
'= ~+[
X2 ] ) ~ (T E j[ X2::J XI ] S) I U
{sl SE FF 1\ 'v'x .. X2E {kHINS.
('v's' ENS. Te j[ H(XI ~ X2) ] s'l\ F E j[ H(XI
+ X2) I
S) ~ (T E j[ 'x2::J Xl ] S) I
5.2.2.6. Semantic Networks and Frames
Analogously to the semantic network and assertional knowledge base interaction, we consider
the subsumption relation defined by the frame knowledge base as a global subclass relation valid for
5.2.2.9. Semantic Networks, First-Order Logic and Frames
This final interaction is derived from the semantic network and assertional knowledge bases
all hierarchies. But. as the frame module does not allow for exceptions we consider only positive
interaction and from the semantic network and frame knowledge base interaction. The function
subsumption. The foIlowing function formalizes this notions:
describing this interaction is the following:
SF : BS x BF x H
~
SLF : BS x BL x BF x H
BS
SF(BS, BF. H) == let n = [(Ui=2....•~({rn)) U (c)]
{slsE BS
1\
n {kHI
~
BS
SLF(BS. BL. BF. H) == let nl = (Ui=I .....~{Pn))
in
'v'XI En. 'v'X2e (f). ('v'se BF.Te j[ X2::JXI] S)~Te j[ H(XI ~X2)] S) I
n
n2 = [(Ui=2•....oo({rn)) U
{kHI.
Icll n (kHI
in
{slsE BSI\ 'v'XI e nl. 'v'X2E {PI.
('v'S e BL. 'v'v e VM. ~+[ Xl ]
5.2.2.7. First-Order Logic, Frames and Semantic Networks
The interaction of three modules can be easy derived from the previously described interactions.
In the case of a logical question to be answered taking into account the knowledge stored into a frame
'= ~+[
xz
I ) ~T E j[
H(XI ~ X2)
I
S) 1\
'v'XI e n2. 'v'X2 e (fl.
('v's e BF. T E j[ x2::J Xl
I
S) ~T E j[ H(XI ~ X2)
I
S) )
and a semantic network knowledge bases. the defmition of the interaction function is derived from the
interaction of the logic and frame knowledge bases and from the logic and semantic network
5.3. The Heuristic Level
At this level, the primitives that allow the definition of production systems for the automatic
knowledge bases. The formal definition of the interaction function is the following:
manipulation of knowledge bases are defined. This definition can be thought of as a first specification
LFS : BL x BF x BS x H
~
for the heuristic level which. differently of the other two levels that have already been implemented.
BL
LFS(BL, BF. BS. H) == let n = (PI)
n [c]
U [Ui=2.....~({Pnl
n
has not yet been implemented. The principal primitive at this level is the primitive Execute. This
(rn))] in
primitive extends the knowledge base abstract data type. consisting of the manipulation functions Ask
{SISe BLI\ 'v'XI en. 'v'X2e (f).
(\I s e
BF. T e j[ X2::J xj ] S) ~ (~+[ xj
'v'XI.X2 E {kHI.
(V s e BS. T E j[ H(XI ~ X2)
(V s e
BS. T E j[ H(XI
I '= ~+[
x2 ]
1\
~-[ x2 ]
'= ~-[
xj
J ) 1\
and Tell, to aIlow heuristic or ad hoc programming through the execution of production systems.
Given a set of production rules and a knowledge base. the primitive Execute allows the modification
I
S) ~ (~+[ Xl
+ X2) ]
S) ~ (~+[ xj
- 109
I '= ~+[
] '= ~-[
x2 ]
xz
1\
I 1\
~-[ x2 ] S ~-[ Xl
~+[ x2 ]
'= ~-[
I ) 1\
of the knowledge base according to the instructions contained in the rules.
Xl ] ) I
- 110 .
THE SEMANTICS
CHAPTER 5
The primitives of the heuristic level are divided into two categories: The rule formation
THE SEMANTICS
CHAPTER 5
[ p : (<left>, <right> ) ] B a :; <if [ <left> ](B) == T then [ <right> ](B),
olp +- Ax. if I <left> ](x) == T then [ <right> ](x) ]
primitives and the control primitives. The building blocks used to construct the rules are the module
access functions, i.e. the functions of the form to-M(d) and from-M(q). Using the control
primitives, the rules can be joined together into rule bases, and these rule bases can be used to modify
[ <left> ] : (B) ---) :13
knowledge bases. The conflict resolution strategy and flow control of execution can also be set
through the use of control primitives.
[ '¥ask AND <left> ] :; [ '¥ask ](B)
In the following definition, we present the syntax of the rule formation primitives. In this
definition the symbols '¥ask and '¥lell correspond to the module access primitives defined in section
[ '¥ask OR <left> ]:;
1\ [
<left> ](B)
['¥ask ](B) v [ <left> ](B)
5.2.
[ <right> ] : (B) ---) (B)
Definition 5.7. Syntax of the rule formation primitives of the heuristic level.
[ BEGIN '¥lellt ... >flelln END]:; ['¥lellt]( ... ([ '¥lelln ](B» ...)
Rule definition:
<rule> ::= p I
The control primitives of the heuristic level are designed to allow the construction of rule bases
p : {<Ieft>'-<right> }
<left> ::= '¥ask I
and the definition of the flow control and conflict resolution strategies. The syntax of these primitives
is presented in the following definition.
'¥ask AND <left>
'¥ask OR <left>
<right> ::= '¥ tell I
BEGIN '¥tell, ... '¥lelln END •
Definition 5.8. Syntax of the control primitives of the heuristic level.
Rule base definition:
<command> ::=
The semantic definition of a rule can be easily derived from the semantics of its composing
module access primitives. We consider a global environment function mapping rule identifiers into the
semantic functions associated to the corresponding rules. This environment function can be defined as
<rule-base-identifier>:= <rule-base>
<rule-base> ::= <rule-base-identifier>
I
Rule-base«rule>l ..... <rule>n)
Conflict resolution strategies:
<command> ::= Set-ccnnictreruts-base», <conflict-strategy»
<conflict-strategy> ::= Rule-order(PI ....• Pn) I Recency I Rule-generality I Rule-hierarchy(H)
follows:
o : (p) ---) [( B) ---) (B)], where
Flow control:
(p) is the set of all rule identifiers, and
<command> ::= Set-flow«rule-base>. dlow-control»
(B) is the set of all knowledge bases.
<flow-control> ::= All-rules I First-rule
Execution of a production system:
B ::=
Execute(B. <rule-base» •
We denote o[p +- A.x. F(x)] the environment which is exactly equal to the environment
0
except that the identificator P is associated to the function A.x. F(x). We consider also an initial
environment where all identifiers are mapped into the identity function. The semantics of the rules is a
function of this global environments, and it can be defined by the following expressions:
The semantics of a complete production system language is out of the scope of this thesis. We
are mainly concerned with the definition of epistemological methods and their interactions. The
heuristic level has been introduced only to give the language the global expressiveness of a
[ <rule>'] : (<rule» x ( B ) x ( 0
) ---) (
B )x (
0 )
programming language, although containing also a less expressive kernel where all algorithms are
decidable and where all primitives possess a semantic meaning defined using the model-theoretic
[ P]
B
a :; <o] P ](B), 0>
approach.
112
TIlE SEMANTICS
CHAPTER 5
The control primitives of the heuristic level presented above are just one of the possible sets of
primitives for defining production systems. The semantics of such a language is better expressed
using the denotational
app~oach
(Stoy, 1977) than the model-theoretic approach. We present only an
informal account of the semantics of the two more important control primitives of the heuristic level.
[ Rule-Iistf-crulec-j , ... , <rule>n)] == {[ <rulec-j
[ Execute(B. <rule-base») ] == while chose r
t .... [
E [
<rule>n ]}
<rule-base> ] do
[d([ B])
- 113
THE IMPLEMENTATION
CHAPTER 6
adopted is Grasp (Bittencourt, 1984), a Common Lisp package allowing the manipulation of directed
Chapter 6
graphs.
The final piece needed' to complete the necessary environment for the implementation of the
system is a unification program. In order to allow the integration of the logic module with the other
The Implementation
modules, it was necessary to change the unification algorithm, in this direction we chose to implement
our unification package from scratch, and used the Martelli-Montanari (1982) algorithm which was
implemented in Common Lisp.
In this chapter, we present the implementation of the system MANTRA 1. This system is based
on the hybrid system architecture proposed in the previous chapters. The goal of the implementation
The architecture of the system reflects the formal architecture proposed in chapter 4. It consists
of four tool modules - Kyacc Klex, Common ORBIT, Grasp and Unification - and six system
modules - Interface, Knowledge Base, Logic, Frames, Semantic Networks and Production System.
The interconnection of these modules is described diagrammatically in figure 6.1.
is to provide a test bed for the algorithms that perform the different inferences associated to the three
epistemological methods as well as their interactions. The implementation of an algorithm provides
insights on its structure which are not provided by the theoretic analysis alone.
The symbolic manipulation character of our system makes Lisp or Prolog the logical choices for
I
Log~
•
I
i
the programming language to be used. As an important part of the system consists of programming a
non classical logic and connecting it to other modules, what requires the modification of the
unification algorithm, Prolog has been rejected and Common Lisp (Steele Jr., 1984), the standard
dialect of Lisp, has been adopted.
The hierarchical character of the proposed architecture, with knowledge bases consisting of sets
of partitions, and the logical level consisting of the integration of the different modules of the
epistemological level, makes the object-oriented approach a suitable programming technique. We
chose the system Common ORBIT (De Smedt, 1987), an object-oriented extension of Common Lisp,
as the object-oriented tool to be used. This system is public domain, it is not very big, and, most
important, it presents an applicative orientation, allowing the easy integration of object-oriented and
common applicative functions, a requirement in the implementation of our system.
SUN 3150 - UNIX
Our system implements a knowledge representation language. The system being experimental,
the syntax of this language was expected to change frequently during the implementation of the
Fig. 6.1. The Modules of the System
system. To facilitate the modification and to have a clear account of the syntax of the language, we
chose to use Kyacc Klex (Vigouroux, 1988), a Common Lisp adaptation of the compiler generator
Yacc (Johnson, 1975) Lex (Lesk, 1975), as the input interface to the system.
The implementation of knowledge representation methods such as semantic network and frames
implies the use of complex data structure. As the integration of the different methods is one of the
main goals of the system, we chose to adopt a single data structure representation: Directed graphs
with labelled edges. This data structure presents the necessary expressive power to the
implementation of the different knowledge representation methods. The graphical character of the
graph representation makes it also suitable for implementing interactive systems. The graph package
In the following sections, after describing each module of the programming environment, we
present in detail the modules composing the MANTRA system itself. Each of these modules
correspond to one or more files of Lisp functions.
6.1. The Environment
The programming environment used for the implementation of the MANTRA system consists
of the Kyoto Common Lisp language, the Common ORBIT object-oriented extension of Common
Lisp, the Kyacc Klex compiler generator system, the Grasp graph manipulation package and the
Unification package.
1For Modular Assenional, Semantic Nctwork and Terminological Representation Approach.
116
TIIE IMPLEMENTAnON
CHAPTER 6
TIIE IMPLEMENTAnON
CHAPTER 6
Two types of objects are provided in Common ORBIT: anonymous and named objects. Objects
6.1.1. Common Lisp
Common Lisp (Steele Jr., 1984) is the standard dialect of Lisp. It is a successor to MacLisp
are characterized by a set of aspects. An aspect can be a simple value or a function. For instance,
(Moon, 1974) and has also been influenced by ZetaLisp (Moon et al., 1983), Scheme (Steele Jr. and
using the primitive delobject, we can define the named concept person, which contains a function
Sussman, 1978) and InterLisp (Teitelman et al., 1978).
aspect for calculating the age and two value aspects to store the sex and the birth year:
Common Lisp originated in an attempt to provide a common dialect of Lisp on which different
implementations could be based in order to achieve a maximum compatibility. To attain ponability
Common Lisp intentionally excludes features that cannot be implemented in a broad class of machines
(delobject person
(age :Iunction #'(lambda (sell)
(-
and the included features are designed to be as little as possible dependent on machine-specific
(birthyear
self)(current-year))))
(birthyear :value 0)
characteristics.
Common Lisp differs from previous attempts to provide a Lisp standard, e.g. Standard Lisp
(sex :value nil))
(Marti et ai, 1979), in incorporating more features, including a richer set of data types and more
complex control structures. The efficiency and semantic compatibility of the compiler, known
weaknesses of previous Lisp dialects, are also improvements of Common Lisp.
In developing our system, we use the Kyoto Common Lisp (KCL) implementation (Yuasa and
Hagiya, 1985) running on a SUN 3/50. KCL is a full implementation of the Common Lisp
We can see in this example the use of the convention of how the object argument (self) is
passed to an aspect function (age). We see also how a normal Lisp function (current-year) can be
mixed into the object-oriented code. Considering this definition and using the primitive a. we can
defme an anonymous object:
specification and is provided with a compiler that generates C programs from the Lisp sources.
(a person (sex 'male)(birthyear 1963))
6.1.2. Common ORBIT
Common ORBIT is an object-oriented extension of Common Lisp developed at the University
of Nijmegen, the Netherlands. Object-oriented programming is a paradigm of programming. In this
In fact, we could have defined the anonymous object before defining the named object because
in Common ORBIT all inheritance can be done dynamically.
paradigm the data structures and the manipulation functions are defined in objects. These objects are
separate units which may be created, changed. anderased in the course of the computation. Thinking
6.1.3. Kyacc Kin .
in terms of objects gives a conceptually clearer picture of a complex system because each information
The Kyacc Klex (Vigouroux, 1988) system provides the interconnection between the KCL
is always considered in the context of the object to which it is associated. The independence of the
system and the Yacc Lex environment. The Yacc Lex environment is formed by the Lexical Analyzer
objects leads to a different kind of modularity in programming: Objects can be added or modified
Lex (Lesk, 1975) and the Compiler Generator Yacc (Johnson, 1975). Lex input is a table ofregular
without affecting other existing objects. Some examples of object-oriented languages are: SIMULA
expressions with corresponding programs fragments. This input is used to generate a program able to
(Dahl and Nygaard, 1966), SMALLTALK (Goldberg and Robson, 1983) and FLAVORS (Weinreb
read an input stream, to recognize the strings matching each regular expression and to execute the
and Moon, 1980; Moon, 1986).
corresponding program fragments. Lex can be used for any lexical processing task, but it is specially
In Common ORBIT, an object-oriented style is realized by adopting a convention about the way
suited for writing the lexical analyzer pan of a compiler generated by Yacc.
certain functions take arguments: The fITSt argument of such a function is interpreted as a pointer to an
Yacc (Yet another compiler-compiler) provides a general tool for describing the input to a
object. Because the invocation of a Common ORBIT operation on an object is syntactically identical
computer program. The input to Yacc has the form of a set of grammar rules and corresponding
to a Lisp function call, object-oriented code and conventional code can be easily mixed. Common
program fragments called Semantic Actions. From this input Yacc generates a program which call a
ORBIT provides also a mechanism allowing the inheritance between objects. The approach adopted in
user supplied input routine, the lexical analyzer generated by Lex, to obtain the basic unities forming
Common ORBIT is to consider any object as a potential Prototype, with no distinction between
the input stream. These unities, called Tokens, and their structure are compared with the grammar
classes and instances. Common behavior is achieved by allowing objects to inherit from their
rules and when one of these rules match the corresponding semantic action is executed. Actions can
prototype objects. Common ORBIT supports multiple inheritance tangled hierarchies. Inheritance is
return values and can make use of the values of other actions.
provided through a breadth-first search among the prototype objects. An object which inherits from
The Kyacc Klex system allows the specification of the semantic actions using the KCL
language. This modification has been implemented using the possibility of interfacing a KCL program
another object is called a Client of this object.
with functions written in the C language. The utilization of this tool in the implementation of the
- 117 -
- 1\8
TIlE IMPLEMENTATION
CHAPTER 6
CHAPTER 6
TIlE IMPLEMENTATION
interface of the MANTRA system allowed a modular development of the system. The primitives of
These functions are all written as KCL macros to improve the efficiency of execution. The
each module have been added to the language only when these modules were integrated into the
internal representation of graphs make use of the property lists of atoms in Lisp. This representation
system without any problem of program modification. and with the additional advantage of providing
is based on the work of Pratt and Friedman (1971). The property list of a symbol, representing a
a clear updated documentation of the syntax of the language at each phase of the development of the
node. contains. under each indicator representing a graph. a pair of A-lists. The first A-list represents
system. To give an example of the format of the grammar rules using Kyacc Klex we present the
the successors of the node in this graph. each element of the list is itself a pair containing the symbol
upper level rule of the language:
representing one successor node and the label of the edge linking the nodes. The second A-list
program
e rro r
represented in this structure wasting space, but this redundancy is useful to accelerate the search in
{ (init-syntax)
graphs. a more important feature for our system.
represent. in an analogous form, the list of predecessors of the node. The information is redundantly
oommand
{ (list $1) }
program command
{ (append $1 (list 52}) }
6.1.5. Unification
The unification is a special type of pattern-matching procedure used to compare first-order logic
terms, Essentially. the unification algorithm receives two or more first-order logic terms containing
variables and tries to find the simplest substitution. i.e. an assignment of terms to variables. which
makes all the terms equal.
This rule states that a program is either an error, a command-or a program followed by a
Unification was first introduced by Robinson (1965) as the central step of the resolution
command. The symbol $i means the ith token of the preceding rule. The semantic actions written in
inference rule. Resolution is a complete inference rule and has been used in the implementation of
Lisp are surrounded by curly-brackets. The result of the semantic actions are returned to the calling
several theorem provers. e.g. Chang and Lee (1973). The logic programming language Prolog
function. in our case the interface function.
(Sterling and Shapiro. 1986) is also based on the unification algorithm. Besides these logical
6.1.4. Grasp
languages. in systems using a database organized in terms of productions, in type checkers for
applications the unification algorithms has also been used in systems for the interpretation of equation
In programming knowledge representation methods like semantic networks and frames. it is
programming languages and in term rewriting systems. The unification algorithm plays an important
very useful to have available a data manipulation tool whose structure corresponds to the abstractions
role in the MANTRA system. where it represents a great part of the processing time of the provided
underlying the representation method. The labelled graphs are a very general structure subsuming
inferences. The chosen algorithm is the Martelli and Montanari (1982) algorithm-.
most data structures and well suited to represent semantic network and frames. The chosen tool is the
Grasp system (Bittencourt, 1984), a package for the manipulation of labelled graphs written in KCL.
The system consists of a set of groups of functions joined together according to their functions.
These groups are:
To describe this algorithm it is necessary to introduce some notation. Let F be a ranked alphabet
of function symbols and V a set of variable symbols. The set T of terms is defined recursively as
follows:
(i) if w
E
Fo or w
E
V then
WET.
(ii) if n ~ I and ri. ..., tn E T and f
• Creation functions: Allowing the creation of graphs. nodes and edges.
E F n then f(tl •...• tn) E T.
A Substitution is defined as a function
V ~ T. A finite substitution can be represented by a
e:
e=
• Destruction functions: Allowing to delete edges. nodes and graphs.
finite set of ordered pairs:
• Reference functions: Allowing the access to the internal structure of graphs. Functions are available
defined as a pair of terms: t = 1'. A set of equations is said to be in solved form if and only if it
for obtaining the nodes and edges of a graph. the successor and predecessor nodes of a node in a
graph. the label of a given edge. etc.
• Predicate functions: Boolean function allowing to test properties of nodes and graphs.
• Graph manipulation functions: this group contains miscellaneous function allowing to edit or print a
graph, to make graph union. to explode or collapse nodes. to save and load graphs. etc.
( <ti. x j>, ...• <t m• xm> ) where ti E T and Xi E V. An equation is
satisfies the following conditions:
(i) The equations have the form Xi = tj, for i = I, ..., k.
(ii) For every i ~ j, Xi ~ xjThe substitution
e=
( <tr. Xl>, ...• <tk. xk> ) is a unifier of the set of equations and if there
are other unifiers they can all be represented as
e
0 (J
where (J is a substitution. This property implies
2A comparison between different unificaLion algorithms can be found in Scheidhauer and Sew (1988) .
. 120
TIlE IMPLEMENTATION
CHAPTER 6
that e is the Most General Unifier of the set of equations.
TIlE IMPLEMENTATION
CHAPTER 6
The critical part of the algorithm is which multiequation in U to chose at each step in such way
The next concept to be introduced is the concept of a Multiequation. A multiequation is a pair of
to minimize the size of the solution. This choice is determined by the following property of unifiable
sets S = M, where S is a nonempty set of variables and M is a multiset'' of nonvariable terms. The
solution of a multiequation is any substitution which makes all terms in the left- and right-hand sides
systems: If the system R has a unifier and its U part is nonernpty then there exists a multiequation
S = M such that the variables in S do not occur elsewhere in U. Chosing the right equations implies
identical.
not needing to apply substitutions, because the variables of the chosen equation do not appear in the
The Common Part of a multiset of terms, containing or not variables, is defined as the term
unsolved part of the system. We are now ready to present the unification algorithm:
obtained by superimposing all terms in the multiset and by taking the common part starting from the
root. The Frontier of a multiset of terms is a set of multiequations, where every multiequation is
UNIFY(R = <T, U» ==
associated with a leaf of the common part and consists of all subterms, one for each term of the
repeat
I. Select a multiequation S = M of U such that the variables in S do not occur elsewhere in U. If a
multiset, corresponding to that leaf. If there is a clash of functions symbols between terms in the
multiset, then the multiset presents neither common part nor frontier, and its terms are not unifiable.
In the unification algorithm two operations are performed over multiequation sets: Reduction
multiequation with this property does not exist, stop with cycle failure.
2. If M is empty
and Compactification. Consider a set Z of multiequations containing an equation S = M such that M is
then Transfer S = M from U to the end of T.
nonempty and has common part C and frontier F. The result of the reduction operation over this set Z
else 2.1. Compute the common part C and the frontier F of M. If M has no common part, stop
is obtained by replacing the equation S = M by the union of the equation S = (C) and all the
multiequations of F, i.e. Reduction(Z) = (Z - (S = MJ) u (S = (C) J u F.
A set Z of multiequations is Compact if its equations do not share variables, i.e. V (S = M),
(S' = M') E Z, S n S' = 0. To transform a noncompact set Z of multiequations into a compact set,
with clash failure.
2.2. Transform U using multiequation reduction on S = M and compactification,
2.3. Transfer the multiequation S = (C) from U to the end of T.
until the U part of R is empty.
we calculate the relation R between pairs of multiequations of Z such that (S = M) R (S' = M') if and
only if S n S· = 0. The transitive closure of R, denoted R·, partitions the set Z into equivalence
The two main ideas underlying the algorithm are: Keeping the solution in a factorized form and
classes. To obtain a compact set from Z, all multiequations belonging to the same equivalence class
selecting at each step a multiequation in such a way that no substitution ever has to be applied.
are merged, i.e. they are transformed into single multiequations by taking the union of their left- and
right-hand sides.
Another interesting characteristic of the algorithm is that it fails if there are cycles among variables,
and thus the so-called Occur-Check is built into the algorithm.
The problem solved by the algorithm is the solution of a System of Multiequations. A system of
An efficient way of automatically ordering the multiequations is to associate a counter to each
multiequations is a pair <T, U>, where T is a sequence of multiequations, called the solved or
multiequation. This counter is initialized at the beginning of the algorithm with the number of
triangular part of the system, and U a possibly empty set of multiequations, called the unsolved part
occurrences, in the right-hand sides of the other multiequations, of the variable in the left-hand size of
of the system, such that:
each multiequation. The counters are updated by decrementing them whenever an occurrence of the
corresponding variable appears in the left-hand side of a multiequation in the frontier computed in step
(i) Both T and U are compact sets of multiequations;
2.1 of the algorithm. When two or more multiequations are merged, in the compactification phase, the
(ii) The right-hand sides of all multiequations belonging to T consist of no more than one term;
counter associated with the new multiequation is set to the sum of the counters associated to the old
(iii) The variables belonging to the left-hand side of some multiequation in T can only occur in the
multiequations.
right-hand side of any preceding multiequation in T.
A further improvement in the algorithm can be obtained by requiring that ail terms in the right
hand-side of a multiequation be consistent, for every multiequation. Two terms are said to be
Ixol
Initially, the sequence T is empty and U consists of a set containing the multiequation
=.(t}, ..., in), where t}, ..., tn are the terms to be unified and equations of the form Ixil = 0,
consistent if and only if either at least one of them is a variable or they are both nonvariable terms with
the same root function symbol and pairwise consistent arguments. Consistent term are not necessarily
tn. Every step of the algorithm consists in passing a
unifiable, but this requirement allows the early detection of clashing terms. An efficient representation
muhiequation from the U part to the T part. The algorithm stops when the U part is empty, at this
for consistent terms is proposed: To represent a set of consistent terms by a Multiterm, A multiterm
where xiare all the variables appearing in tj ,
... ,
point the solution can be obtained by substituting backward the variables appearing in T.
can be either empty or of the form f«SJ, MI>, ..., <Sn, Mn» , where Si is a set of variables and M,
a multiterm. Furthermore, S, and M, cannot both be empty.
3A muhiset is a family of elements with no ordering but in which idemical elements may occur.
- 121 -
- 122
THE IMPLEMENTATION
CHAPTER 6
In our implementation of the Martelli-Montanari algorithm we use Lisp structures to Construct
the different data structures necessary in the algorithm: multiterms, multiequations and temporary
equations (i.e. a multiequation without counter appearing as an argument of a multiterm). The
possibility of defining the printing format of structures allow the implemented algorithm, when a
"verbose" option is on, to print all the intermediary results in the format used in the Martelli
CHAPTER 6
THE IMPLEMENTATION
Knowledge Base module:
• Kbase - This file contains the definitions of the knowledge base object and its descendants: The
knowledge base partitions associated to the logic, frame and semantic network modules.
• Interaction - This me contains all the functions related to the interactions between the epistemological
methods.
Montanari article. This options has been very useful during the debugging phase of the
Interface module:
implementation. Our algorithm has also a special characteristic: The function testing the clash between
• Interface - The central part of the interface module, it contains the interface control functions
two function symbols is a parameter of the unification function. This is necessary to allow the
defining the loop menus presented to the user of the system in the interactive operation.
interaction of the different knowledge representation methods. To use the unification function as a
• Prog - This file contains the functions defining the Programming interface to the system.
normal unification it is enough to use the function "equal" (or "eq'') as the clash test function.
• Input - In this file the syntax of the interactive input language of the system is defined in Kyacc Klex
format.
6.2. The System
• Prog-input - In this file the syntax of the programming input language of the system is defined in
Presently, the MANTRA system consists of sixteen files containing KCLfl1nctions. This files,
with the exception of the file lnn, are presented in figure 6.2. The file Inll contains global varibles
definitions and micelaneous functions that are called by functions in several of the other files. In
Kyacc Klex format.
• Syntax - This file contains the definition of the functions and the KCL structures used during the
syntactical analysis of the input languages.
figure 6.2, a file A is connected through an arrow to file B if there are functions in file A which call
Assertional module:
functions in file B. We can see by the picture that there are no cycles in the dependency graph of the
• Logic - This file contains the functions used to manipulate the knowledge base partition of the logic
modules, this facilitates the maintenance of the system. The Kyacc Klex package does not appear in
module and 10 implement the entailment algorithm.
the picture because it is just used for the generation of the parser function for the input languages of
Frame module:
the system. After this parser function has been incorporated to the interface module the Kyacc Klex
• Frame - This file contains the functions used in the manipulation of frames: Management of the
package is not used any more. There is no file corresponding to the production system module
frame partition of the knowledge base, definition of new frames and subsumption tests.
Semantic Network module:
because this part of the system is not yet implemented.
• Snet - This file contains the functions of the Semantic Network module, i.e. the functions for the
manipulation of the knowledge base partition associated to the semantic network module and all
Prog
functions related to the inheritance calculation.
Common ORBIT package:
• Common ORBIT - This file contains the functions defining the object-oriented extension to the
language KCL.
Grasp package:
• Grasp-macros - The central part of the Grasp package, it contains the definition of the graph
manipulation macros.
• Grasp - This file contains the high level graph manipulation functions: Graph printout, operations
I
Corbit
I
over graphs, search procedures, etc.
Unification package:
• Unification - The central part of the Unification package. It contains all functions and KCL
Fig. 6.2. The Files of the System
structures used in the unification algorithm.
• Variable - This file contains the functions related to the definition and manipulation of variables,
We present next a brief description of the contents of each file, before describing the
implementation of the general modules of the system.
In the following sections, we describe in more detail the implementation of the system modules.
TIlE IMPLEMENTATION
CHAPTER 6
6.2.1. The Knowledge Base Module
The knowledge bases used in the system are defined with the help of the object-oriented
extension Common ORBIT. The definition of the prototype object for knowledge bases, in the
Common ORBIT format, is the following:
CHAPTER 6
TIlE IMPLEMENTATION
by the function aspects ap-set-symbol and ap-get-symbol. The function ap-set-symbol is used to
assign a value to a symbol in the knowledge base partition and the function ap-get-symbolis used to
access the value of a symbol.
In every situation the dependency between the symbols is stored in a graph. This graph is the
value of the aspect apograph. The function aspects ap-set-dependency and ap-associated-tacts, are
(defobject ob-kbase
(ap-new :function #'kbase-new)
(ap-show :functlon #'kbase-show)
(ap-frame-graph :value nil)
(ap-Iogic :object (an ob-Iogic))
used to create a link between two symbols and to obtain the list of all symbols related to a given
symbol respectively.
Being clients of the object ob-sltuation, the objects ob-Iogic,ob-frame and ob-snet inherit all
its aspects. Besides these inherited aspects each of the three objects has its own specific aspects. The
definition of these objects in Common ORBIT notation is the following:
(ap-frame :object (an ob-frame))
(ap-snet :object (an ob-snet)))
(defobject ob-Iogic
ob-sltuatlon
In this definition, two programming conventions adopted during the implementation of the
system are used: Object names begin always with the prefix ob and aspect names with the prefix ap,
(ap-create-fact :function "Iogic-create-fact)
(ap-show :functlon #'Iogic-show)
(ap-constant :value nil)
and, when the value of an aspect is a function, the function implementing the aspect is named obJect
aspect, where object is the name of the object and aspect the name of the aspect.
(ap-function . :value nil)
The interpretation of the different aspects of the knowledge base object are the following: ap
new is a function used to initialize an empty knowledge base and ap-show is an interactive function to
(ap-fact :value nil))
(ap-predicate :value nil)
show the contents of the knowledge base. The aspect ap-frame-graph is used to store the
subsumption graph of the frame module, it is initialized when a hybrid question involving the
semantic network and frame modules is processed.
Finally, the three aspects, ap-Ioglc, ap-frame and ap-snet, contain the partitions of the
knowledge base associated to each first level module. The values of these aspects are objects of the
type ob-Iogic, ob-frame and ob-snat respectively. These three objects have a common prototype
object called ob-situation. The definition of this object in Common ORBIT notation is the following:
(defobJect ob-frame
ob-situatlon
(ap-show :function #'frame-show)
(ap-prl-concept :value nil)
(ap-prl-relatlon tvalua nil)
(ap-def-concept :value nil)
(ap-def-relation :value nil))
(defobj~ct
ob-situatlon
(ap-new :function #'situation-new)
(ap-definition :value nil)
(defobject ob-snet
ob-situation
(ap-set-symbol :function "situation-set-symbol)
(ap-show :function "snet-show)
(ap-gel-symbol :function "situation-get-symbol)
(ap-graph :values nil)
(ap-pri-class :value nil)
(ap-pri-hierarchy :value nil)
(ap-set-dependency :function "situation-set-dependency)
(ap-dst-class :value nil)
(ap-associated-facts :function "situation-associated-facts))
(ap-def-hierarchy :value nil))
Like in the knowledge base object the aspect ap-new is used to initialize an empty knowledge
In these definitions, the aspect ap-show is used to interactively present the contents of the
base partition, called here a situation. The aspect ap-definition is a Hash Table where the values of
situation. Differently from the other situation objects, in the object ob-Iogic, the information is not
the symbols are stored. This hash table is initialized by the function aspect ap-new and is manipulated
associated to external symbols, but to logical formulas, These formuhe are given internally generated
TIIE IMPLEMENTATION
CHAPTER 6
names and these names are stored in the aspect ap-fact. The function aspect ap-create-fact is used
CHAPTER 6
TIIE IMPLEMENTATION
Semantic Symbol
Implementation symbols
to input a new fact in the list of facts. The values are associated to the new generated symbols through
:c= for concepts
the same hash table mechanism, defined in the prototype situation object. In the objects ob-frame and
ob-snet this mechanism is used to associate definitions to concept, relation, class and hierarchy
:r= for relations
symbols. The aspects, ap-constant, ap-function, and ap-predicate of the object ob-Iogic contain the
:k= for classes
:h= for hierarchies'
lists of symbols representing the corresponding logical entities. The ob-frame and ob-snet objects
The objects described above are prototype objects. Each time a new knowledge base is created,
~
> or < for concepts
» or «for relations
--->
an instance of each of these objects is initialized. This instantiated knowledge base object can than be
-fi
-f->
used to store information using the primitive Tell.
3
V
IE
6.2.2. The Interface Module
A
&
have distinct aspects to store define and primitive symbols. A mechanism is provided to update all the
::J
symbol definitions when a previously primitive symbol is defined,
The system provides two types of interfaces: The interactive interface and the programming
IV
v
interface. The interactive interface is based on embedded structured menus, and the programming
interface allows the utilization of the primitives Ask and Tell like ordinary Lisp functions. The
.1
programming interface is useful to allow the system to be used as a programming tool to implement
n
& for concepts
more sophisticated knowledge representation methods. In the following sections, the two interfaces
&& for relations
are described.
u
I for concepts
\I for relations
6.2.2.1. The Interactive Interface
EEl
+ for classes
The functions of the interactive interfaceare: (i) to interpret the interactive knowledge
++ for hierarchies
representation language according to the semantics of the language, (ii) to allow the input and output
of programs from the terminal or from files and (iii) to provide a mechanism for the visualization of
the contents of the knowledge bases.
Table 6.1
To allow the input through a computer terminal, the syntax of the expressions of the language
has been adapted to contain. only those symbols present in the terminal keyboard. The correspondence
The interactive language presents two alternative syntaxes: The symbolic form, in which the
between.the symbols used in the semantic definition of chapter 5 and the symbols actually accepted in
expressions are represented according to the syntax of the formally defined language with the
the language is shown in table 6.1.
symbols adapted to the terminal keyboard, and a functional form, in which the expressions are
represented by functions with the list of arguments surrounded by parenthesis and separated by
commas, e.g. Existtx, And(P(x),Q(x») for
3 x, P(x) A
Q(x). Expressions in the language can consist
of a mixture of these two syntaxes. The syntax is quite flexible allowing the first letter of each
function to be written in upper- or lowercase characters, the separating hyphen can be omitted and
several words can be abbreviated like snet for semantic-net, const for constant.fun for functions, pre
for predicate, con for concepts, rei for relation, hie for hierarchy, etc. This flexibility could be
obtained using the lexical analyzer facilities provided by the Klex program.
4The reason for the use of different symbols for different episternologic entities is that we want to have a nonambiguous
grammar as input for the Kyacc Klcx system.
- 128
TIlE IMPLEMENTATION
CHAPTER 6
CHAPTER 6
TIlE IMPLEMENTATION
Although the expressiveness of the implemented language is basically the same as that of the
given knowledge base. These primitives are useful if the user wants to manipulate, in the semantic
formally defined language of chapter 5, the implemented language contains several new primitives.
network module, the entities of the frame module, independently of the provided interaction
These primitives were introduced mainly as "syntactic sugar", to facilitate the execution of
between these two modules.
management tasks. These new primitives, with two exceptions, are all related to the Ask primitive.
Except for the above new primitives the implemented language follows the description of
The new primitives and their functions are the following:
chapter 5. We present in appendix A the complete syntax of the interactive language.
Ask(<knowledge-base>, <entity» - This new ask primitive, differently of the ask primitives defined
The interactive interface also provides the access to the system. This means allowing the input
in chapter 5 which return always boolean values, returns a list of symbols, or of pairs consisting of
of programs from the terminal or from files and the visualization of the defined knowledge bases.
a symbol and its arity. The possible values for the parameter <entitY> are: constant, function,
These functions are achieved through the presentation of menus. These menus are in three levels. The
predicate, pri-concept, def-concept, prl-relation, def-relation, prl-class, def-class, pri
first level propose the following options:
hierarchy and def-hierarchy. The effect of the primitive is to return the list of entities of type
<entitY> defmed in the knowledge base <knowledge-base>.
Descrlba-tcrrnulat-doqlc-emltys-, <formula» - This primitive is a logic question, to be used inside
a from-logic construction. The value of the parameter <logic-entity> can be one of the following
o
Set or reset the verbose flag.
• Input a command.
o
Show the current input buffer.
symbols: Constants, Functions or Predicates, and the value of the parameter eforrnuta» is an
o
Store the current input buffer into a knowledge base.
arbitrary first-order logic formula. The primitive returns a list of the logical entities corresponding to
o
Input a command and store directly.
the first parameter occurring in the formula given in the second parameter.
• Show a knowledge base.
Describe-concept. Describe-relation - These primitives are frame questions, to be used inside a
from-frame construction. They also have two parameters: A symbol corresponding to a frame
entity - prl-concepts, def-concepts, pri-relations or def-relations - and a concept or relation
o
Execute a Lisp conunand.
• Quit the interface.
o
Print this list of options.
description, respectively. These primitives return the list of symbols, associated to the
. The verbose flag controls the printing or not of intermediary results, this kind of mechanism is
corresponding frame entity, occurring in the given concept or relation definition.
Subsuming-concepts, Subsumed-concepts - These primitives, like the previous group of primitives,
useful for the knowledge acquisition phase. The option "input a command" asks the user from where
are also frame questions and should be used inside a from-frame construction. They receive a
the command should be read, if the answer is "from a file", the name of the file should be given,
concept description as input, and they return all the concepts subsuming or subsumed by the given
otherwise an input loop is initiated at the terminal. If the user wants to see the result of the syntactical
concept description.
analysis, the system allows the input to be only syntactically analyzed but not stored in a knowledge
Subsuming-relations, Subsumed-concepts, Subsumed-relations - These primitives are analogous to
base. A escape for the Lisp interpreter is also available.
The option show a knowledge base, after asking for the name of the knowledge base, initiates a
the previous ones, except that they should be applied on relation descriptions.
Describe-class, Describe-hierarchy - These primitives are semantic network questions, to be used
second level menu. This menu presents the following options:
inside a from-snet construction. Analogously to the "describe" primitives for the frame module,
these primitives receive as parameters a symbol representing a semantic network entity - pri-class,
o
Print the list of constants.
def-class, pri-hierarchy or def-hierarchy - and a description of a class or of a hierarchy,
o
Print the list of functions.
respectively. They return the list of symbols, associated to the corresponding semantic network
• Print the list of predicates.
entity, occurring in the given class or hierarchy definition.
• Print the list of concepts.
Concept-hierarchy, Relation-hierarchy - These are the only two new primitives not directly related
• Print the list of relations.
to the Ask function. They are hierarchy descriptions and can be used anywhere where a hierarchy
• Print the list of classes.
description can appear. They receive as parameter a knowledge base name and they generate
o
Print the list of hierarchies.
hierarchies representing, through "default" links, the complete subsumption relation of concepts or
o
Print all entities.
relations, respectively. The concepts and relations are those defined in the frame module of the
• Show the logic situation.
TIlE IMPLEMENTAnON
CHAPTER 6
• Show the frame situation.
• Show the semantic network situation.
CHAPTER 6
TIlE rMPLEMENTAnON
The interpretation of the programming interface language is done by two Cornmon Lisp macros
called Ask and Tell. The parameters of these macros are evaluated, thi~ allows the use of variables as
• Qui t this level.
the name of a knowledge base or of any entity appearing in the expressions of the language. A
• Print this list of options.
variable entity parameters are important for applications intending to introduce a level of
metaknowledge, where knowledge bases symbols of the lower levels are treated as domain
At this level the user can inspect the symbols, and their arities for functions and predicates,
knowledge. The function of the macros Ask and Tell is to call the Kyacc Klex syntactical analysis
associated to the entities defined in the knowledge base. The three options for showing a situation
function, provided with the special syntax for the programming interface, and, if no syntactical errors
initiates a third level of menus. At the third level the options proposed by the menus depend on the
are found, to call the specific command processor functions. In appendix A, the complete syntax of
type of situation being shown. Some of these options are common to all three situation menus, these
the programming interface language is presented.
options are the following:
In the programming interface, the function Ask, when called with a module access primitive of
the form from-logic or from-Iogic-M, returns two values: T or NIL according to the truth valued
• List all the entities defined in the situation.
associated to the question at hand, and a list of substitutions corresponding to the elements of the
• Show the graph of dependencies.
assertional knowledge base which verify the conditions imposed by the question. Because of this the
• Quit this level.
programming interface provides, besides the Ask and Tell functions, some special Lisp functions
• Print this list of options.
designed to facilitate the manipulation of substitutions. These functions are pan of the unification
package and their specification is the following:
The relations between the entities of the knowledge base situation are stored into the graph of
• uni «terms>, <clash-function> [.<verbose>)) - The unification function uni takes as input
dependencies. In this graph, different edges are used to represent different types of relations. e.g, if a
<terms>, a list of terms in Lisp notation possibly containing variables, <clash-function>, a function
symbol is used in the defmition of another, or if a symbol is defined in terms of another. One option
testing if two predicates should clash or not S , and <verbose>, an optional key that causes the
is specific for the logical situation:
function to print intermediary results in the case it receives the value T. The output is a substitution
• Show the list of facts
the string "Clash '" or the string "Cycle I",depending on the problem found, is also returned.
that unifies the terms, or NIL if the unification is impossible. In this case a second value containing
This options allow the inspection of the facts stored in the logic situation. The facts receive a
number and the user can chose one number or inspect all facts. The semantic network and frame
situations have a common specific option:
• apply-subst «term>. <substitution» " This function applies the substitution <substitution> to the
term <term>.
• subst-variables (esubstttutlore- - This function returns the list of variables of substitution
<substitution>.
• subst-projectlon «substitution>, <variables»
• Show the definition of an entity.
- This function projects the substitution
<substitution> into the list of variables <Variables>.
• expand-subst «substitution» - This function expands the substitution <substitution> by applying
This option allows the inspection of the definition of a given symbol. Each knowledge base
situation object disposes of an interactive function, called ap-show, allowing the visualization of their
it over itself from left to right.
" set-variable «variables» - This function declares all symbols in the list <variables> as variables.
contents. The interface call these functions depending on the choices made by the user from the
• reset-variable - This function clears all variable declarations.
proposed menus.
• variable-p «variable» - This Lisp predicate tests if <variable> is a symbol representing a
variable.
6.2.2.2. The Programming Interface
The programming interface has been designed to allow the use of the primitives Ask and Tell
inside a Common Lisp program. The syntax of the programming interface language is identical to the
functional part of the interactive language, except that, in the programming interface language, the
functions are represented in Prefix notation according to the Lisp syntax.
SThe standard unification algorithm is obtained with
<clash-function>.
the function /I'equal as the value
- 13:
of the parameter
TIlE IMPLEMENTAnON
CHAPTER 6
TIlE IMPLEMENTAnON
CHAPTER 6
also used in the normal form transformation of the frame and semantic network modules. They are
6.2.3. The Assertional Module
The main functions of the -assertional module consist of the management of the assertional
defined in the syntax file.
partition of the knowledge bases and the calculation of the t-entailment relation. The assertional
. The implemented t-entailment function, differently of the semantic definition, does not return a
partition of a knowledge base consists of an object of type ob-Iogic. The ob-Iogic objects are clients
boolean value. It returns two values: A boolean value according to the semantic definition and a list of
of the object ob-situation. The assertional knowledge base itself consists of a set of named facts
all substitutions which are a solution for the problem. The substitutions are represented by A-lists,
stored into a hash table. This hash table is the aspect ap-definition of the prototype object ob
i.e. lists of pairs. Special functions are provided for applying a substitution, projecting a substitution
situation. Each fact is represented by a Common Lisp structure of the following form:
into a list of variables and for obtaining the variables involved in a substitution. These functions are
part of the unification package.
(defstruct (st-Iogic
(:print-function
6.2.4. The Frame Module
print-st-logic))
(variable nil)
The functions of the frame module include the management of the frame partition of knowledge
(constant nil)
bases and the calculation of the subsumption relation for concepts and relations. The frame partition
(function nil)
of a knowledge base is represented by an object of type ob-frarns, analogously to the assertional
(predicate nil)
partition, this object is a client of the object ob-situatlon. In the frame module it is possible to define
(expression nil))
concepts and relations. These definitions are stored into the hash table associated to the ob-situation
object.
According to our programming conventions all structure names begin with the symbol sl. The
structure definition mechanism of Common Lisp provides for the definition of a special printing
Each concept or relation definition is represented by a Common Lisp structure. This structure
has the following format:
function for each defined structure. The function prlnt-st-Ioglc is used to print the facts in a more
readable format than the internal Lisp format. The slots variable, constant, function and predicate
are used to store the variables. constants. functions symbols and predicate symbols. respectively,
appearing in the expression stored in the slot expression.
The expressions representing facts are stored in prenex clausal normal form (pCNF). Each fact
(defstruct (st-Irame
(:print-function
(concept nil)
is associated to an internally generated symbol. the name of the fact. The structure representing the
(prl-concept
fact is stored in the hash table under the entry of its name. Each constant, function and predicate
(original-relation
symbol is associated to the facts where they occur through links of the graph stored in the aspect ap
(relation nil)
graph of the object ob-situation corresponding to the assertional partition of the knowledge base.
The implemented language presents a difference from the formally defined language: No
defined predicates are allowed. We chose not to implement the defined predicates to simplify the
print-st-frame))
(original-concept nil)
(pri-relatlon
nil)
nil)
nil)
(expression nil)
(expanded nil))
design of the logical level. If defined predicates are allowed the system should provide all the
mechanisms for the redefinition of predicates and for the expansion of predicate definitions. These
The slots original-concept and original-relation are used to store, respectively, the sets of
mechanisms, implemented in the frame and semantic network modules, would complicate the already
concept and relation symbols appearing in the original defmition of the frame entity. This is necessary
complex logical module and would not augment the expressiveness of the language, because predicate
because of the possibility of a redefinition. If some concept or relation occurring in the definition of
definitions as defined in the proposed language are only used as a naming convention for formula.
an entity are redefined, the definition is reexpanded from its original form, taking into account the
The normal forms and t-entailment algorithms introduced in chapter 5 have been implemented in
new definition of the concept or relation. The sets of original concept and relation symbols are
Common Lisp. The formula: are internally represented by a list structure. The variables, constants,
determined during the syntactical analysis executed by the Kyacc Klex parser. The slots concept and
functions and predicates occurring in the formula: are determined during the syntactical analysis phase
relation contain, respectively, the sets of concept and relation symbols appearing in the expanded
by the Kyacc Klex parser. The PCNF algorithm is implemented by a set of functions each processing
definition of the entity, and the slots prl-concept and prl-relation contain the primitive subsets of
one step of the algorithm. Some functions, like the distributivity and expression flatten functions, are
these sets. A symbol is primitive if there is not a definition associated to that symbol. Finally, the
- 1:'13
- 134
THE IMPLEMENTAnON
CHAPTER 6
slots expression and expanded are used to store, respectively, the original and expanded definitions of
the entity. Analogously to the assertional structure st-loqlc, the function print-sl-frame is used to
CHAPTER 6
THE IMPLEMENTAnON
The original-class and original-hierarchy slots are used to store, respectively, the class and
hierarchy symbols occurring in the original description of the entity. The slots class and hierarchy
print the frame structure in a readable form.
In the assertional module, the facts receive always a new name and there are no problems of
redefinitions. In the frame module, the definitions are associated to the concept and relation symbols,
contain the sets of classes and hierarchies appearing in the expanded description of the entity and the
and these symbols can be redefined. The dependencies between the symbols are stored in the links of
the original and expanded definitions of the entity. Finally, the slot graph contains a symbol
the graph contained in the apograph aspect of the object ob-situalion. Each time a concept or relation
is redefined, the definitions of all other entities related to this entity through the dependency graph
associated to the graph, defined through the functions of the Grasp package, representing the
hierarchy. The slots original-hierarchy, hierarchy, pri-hierarchy and graph are used only for
links are recalculated.
The frame entities are stored in canonical form. The syntax of the canonical form of the
defined in terms of other primitive hierarchies then it is impossible to calculate its graph, and if we can
slots prl-ctass and pri-hierarchy contain the undefined symbols appearing in the definition.
Analogously to the frame module, the slots expression and expanded are used to store, respectively,
hierarchy descriptions. The slots pri-hierarchy and graph exclude each other: If a hierarchy is
concepts and relations descriptions and the algorithms to calculate this canonical form are presented in
calculate the graph of a hierarchy then it is not defined in terms of other hierarchies. The function
chapter 5. The entity descriptions are represented in the form of functions in the lisp notation. The
prmt-st-snet is used to print a semantic network structure in a readable form.
canonical form algorithms have been implemented as Lisp functions that manipulate this
Analogously to the frame module, the semantic network module provides for the possibility of
representation.
Two subsumption functions have been implemented: The concept subsumption and the relation
redefining class and hierarchy symbols. The dependency graph between these symbols is stored in
the apograph aspect of the associated ob-silualion object.
subsumption. These functions are mutually recursive and they calculate the subsumption relation
according to the algorithm defined in chapter 5.
The semantic network entity descriptions are also stored in a canonical form. Due to the relative
simplicity of the syntax of the primitives of the semantic network module, the functions that calculate
6.2.5. The Semantic Network Module
canonical form consists only of the elimination of embedded functions and of the sort of the
the canonical form for class and hierarchy descriptions are very simple. This calculation of the
The semantic network module consists of the functions for the management of the semantic
description elements according to a fixed order.
network partition of the knowledge bases and the functions for calculating the subclass relation
The subclass calculation is performed using the hierarchy graph. The algorithm for calculating
according to a given hierarchy. The semantic network partition is represented by an object of type ob
snet, a client of the object ob-situation. The class and hierarchy descriptions can be associated to
this subclass relation is presented in chapter 5. The functions of the Grasp package are used for the
manipulation C!f the hierarchy graph.
symbols. These descriptions are stored in the hash table contained in the ap-descriptlon aspect of the
object ob-snuation under the symbols to which they are associated. Each description is represented
by a Common Lisp structure of the following form:
6.2.6. The Interaction between Modules
Although belonging to the knowledge base module, the interaction between the modules is
described in this section because we wanted to describe first the three epistemological modules. From
the nine possible interactions only three have already been implemented: Logic-frame, logic-semantic
(detstruct (st-snst
(:prinl-funclion
(original-class nil)
prinl-st-snel))
network and frame-semantic network. To implement the interactions containing the assertional
module as a second element - frame-logic, semantic network-logic, frame-logic-semantic network,
(class nil)
semantic network-logic-frame - it is necessary to implement first the predicate definitions in the
(pri-class
assertional module, without what these interactions are meaningless.
nil)
(original-hierarchy -nil)
(hierarchy nil)
(pri-hierarchy
nil)
(expression nil)
(expanded nil)
(graph nil))
The algorithms for the implemented interactions are presented in chapter 5. In the following
sections we describe the implementation of each of these algorithms.
6.2.6.1. First-Order Logic and Frames
The idea of this interaction algorithm is to determine all the frame entities subsumed by the
predicates appearing in a logical question and to use this subsumed entities as they were predicates r
entailed by the original predicates. The first step of the algorithm is to construct a hash table where the
- 136
TIlE lMPLEMENTAnON
CHAPTER 6
subsumed entities are stored under the predicate symbols. These hash table is a global temporary
CHAPTER 6
TIlE lMPLEMENTAnON
6.2.7. The Production System Module
structure and it is used by a special function called the logic-frame-clash. This function is passed as
The production system module is not yet implemented. Given the programming interface of the
a parameter to the t-entailment function which passes it to the unification function and this function
system, all that is needed is a production system allowing rules in Lisp format. To integrate a
uses it instead of the usual equality test for predicate head clash. This function returns true if the
production system module into the system we have two possibilities: Adopting an existing expert
predicate heads are equal but also if one of the heads is subsumed by the other.
system shell accepting Lisp rules, or implementing a production system from scratch.
6.2.6.2.· First-Order Logic and Semantic Networks
decidable algorithms and clear semantics are risen, because of this there is no problem in adopting an
The production system module is the only module of the system where the requirements of
The interaction algorithm for the assertional and semantic network modules is very similar to the
previous algorithm, but in the present case a hierarchy is used to represent an explicit entailment
existing expert system shell. Although, clearly, a production system implemented from scratch would
be more adapted to the whole system.
relation between first-order logic predicates according to the subclass relation represented in the
Presently, the heuristic level of the system is represented by the Lisp language itself. With the
hierarchy. Two different hash tables are used: One to store the classes which are subclasses of the
programming interface, we can integrate the system primitives in any Lisp function, obtaining the
predicates appearing in the logical question, and other to store those classes which are not subclasses
desired programming language expressiveness.
of these predicates.
In the same way, a function is defined to be used instead of the equality test in the unification
function. This function, logic-snel-clash, is passed to the t-entailment function and from there to the
unification function. Its result is true if the predicate heads are equal or if one is a subclass of the other
or if one occur negated in the question and the other is not a subclass of it. The treatment of the
negation is a little complex: Before passing the question to the t-entailment function it is necessary to
substitute all the negated predicatesv with a non negated new predicate symbol. This symbol,
generated by the gensym primitive of Common Lisp, is stored in a global temporary list, and the
original predicate is stored in its property list. The logic-snel-clash function verifies if a predicate
head is in the new symbol list and in this case verifies if the other head is not a subclass of the first
one.
6.2.6.3. Frames and Semantic Networks
The idea of this algorithm is to explicitly construct the subsumption graph of the frame
hierarchy, and to use the union of this graph and of the given hierarchy graph to calculate
subsurnption of primitive concepts during the subsumption calculation. This graph is stored in a
global variable, but is also stored in the ap-frame-graph aspect of the current knowledge base, in
such a way that, if another frame-semantic network question is asked before the modification of the
frame knowledge base, the same graph could be used without need of recalculation.
Like the t-entailment function, the subsumption function has been modified to use a given
function instead of the equality test when it verifies the subsumption of primitive concepts. The
function frame-snet-clash is passed to the subsumption function and when verifying subsumption it
returns true when the two entities are equal or when the second is a subclass of the other according to
the global hierarchy graph.
6Negations apply always to predicates because the question is in normal form.
- 137
1
CHAPTER 7
CONCLUSION
and relations. Algorithms for these questions are presented and proved sound and complete with
respect to the four-valued semantics of the language.
Chapter 7
The semantic network language allows the definition of bipolar, nonrnonotonic, homogeneous,
multiple inheritance hierarchies. The innovation here is that hierarchies can be given names and can be
Conclusion
manipulated by operators of the language. The semantic definition of nonrnonotonic semantic
networks using the four-valued logic approach is also an original contribution of this thesis. A
recursive algorithm to calculate inheritance in the defined hierarchies is presented, and its
correspondence to the semantics is stated. The adopted inheritance strategy is the Skeptical Inheritance
(Horty et al., 1987), but its definition has been modified to correspond to the defined semantics.
In this last chapter, we summarize the contributions of this thesis, we compare our work with
The interaction between this three knowledge representation languages is semantically defined.
other theoretic propositions and implemented systems encountered in the literature, and finally we
How this integration is done is also an original contribution of this thesis: The idea is to define
discuss some directions for future research.
Module Access Primitives as an interface between the logical level, where all the upper level
commands of the language are defined and each of the specialized knowledge representation
7.1. Contributions
The main contribution of this thesis is the formal definition of an architecture for hybrid
language. To store knowledge, we use the module access primitive lo-M, where M is the name of the
module where the information is to be stored, and to interrogate the knowledge base associated to the
knowledge representation systems. This formal definition has been accomplished through a
module M, we use the module access primitive from-M. If we want to obtain an answer taking into
methodology for the semantic definition of knowledge representation methods which is by itself also
account the information stored in two modules, M and N for instance, we can use the module access
a contribution of this thesis. The principles orienting this methodology are the following: (i) Every
primitive from-MoN. This primitive allow questions associated to module M, the first in the primitive
method integrated into the architecture should be semantically defined using the model-theoretic
name, to be answered taking into account the knowledge stored in the knowledge bases associated to
approach, and (ii) all the algorithms involved in the calculation of inferences should be decidable,
modules M and N. As the order of the modules is important in the definition of the interaction module
sound and complete with respect to the provided model-theoretic semantics. These two requirements
access primitives, we have nine different types of primitives: from-logic-frame, from-Iogic-snel,
exclude the use of a classical logic as a base for the model theoretical semantics. Our choice was to
trom-Irarne-snet, from-frame-Iogic, from-snel-Iogic, from-snel-frame, from-Ioglc-frame
adopt a four-valued approach (Belnap, 1975) as the foundation for the semantics of the architecture.
suet, from-frame-Iogic-snel and, finally, from snel-Iogic-frame. A semantic definition of all
This approach has the advantage of allowing the decidability of all inference algorithms in the
these nine interactions is presented, and algorithms for the first three interactions are defined and
architecture and simultaneously of providing a semantic motivation for all the representation methods.
proved sound and complete with respect to the semantic definition.
This semantic motivation is not so intuitive as the tarskian semantic, but it provides reasonable insight
into the structure of the methods.
The fact that the epistemological and logical levels of the system have been implemented is also
a contribution of the thesis. From a research point of view, the implementation does not represent a
. Other contributions of this thesis concern the specification and semantic definition of particular
great contribution, but we think it is important to know that the presented knowledge representation
knowledge representation languages corresponding to the methods integrated into the architecture.
methods and their interactions can be implemented and that the performance of such an
The logical language is based on the Decidable First-Order Logic introduced by Patel-Schneider
implementation is good enough to encourage a more ambitious implementation. The implementation
(1985). This language has been extended to allow the definition of predicates with the restriction that
of the system has also been a great aid during the design and refining of the inference algorithms.
recursive definitions should be avoided. This extension, although not augmenting the expressive
An early version of the formalism for semantic definition of knowledge representation methods
power of the language, facilitates its use and is very important when the first-order logic is used in
has been presented in Bittencourt (I 988b )1. The implemented system and the possibility of its use as
connection with the other representation methods of the architecture.
an aid to the implementation of knowledge-based systems has been presented in Bittencourt (1989a).
The frame language, based on the KL-ONE (Brachman and Schmolze, 1985) tradition of
A description of the methodology for the semantic definition of knowledge representation methods
terminological languages, allows the definition of n-valued relation instead of just binary roles, as in
and their interactions has been presented in Bittencourt (198~b)2 and the n-valucd terminological
the usual tenninologicallanguages present in hybrid systems. The operator set has also been extended
to allow negation and disjunction of concepts and relations and special symbols representing universal
and empty entities. Thequestions of the language provide subsumption and equality tests for concepts
1 Also published as a "Rapportde Recherche" of the "Institut Polytechnique de Grenoble", France (Bittencourt, 198&:)
2 An extended version of this paper has been published as an "Interner Bericht" at the University of Karlsruhe
(Bittencourt, 1989c).
140
CONCLUSION
CHAPTER 7
CONCLUSION
CHAPTER 7
language has been described in Bittencourt (l989d). The semantic definition of nonmonotonic
the exception links. Our work in inheritance in semantic networks follows the research direction
inheritance with exceptions has been presented in an unpublished paper (Bittencourt, 198ge). This
paper will be submitted for publication in the future. The most important contribution of the thesis
initiated by Etherington and Reiter (1983) and more specifically the work of Horty, Thomason and
Touretzky. The four-valued semantics has first been used to define the sema!1tics of a monotonic
the interaction algorithms and the proofs of their soundness and completeness - are also unpublished
semantic network by Thomason et al. (1986). Our contribution has been to extend the four-valued
yet.
semantics approach to nonmonotonic semantic networks, adopting the skeptical strategy proposed by
Horty et al. (1987).
7.2. Comparison with other Work
.
As far as we know, the theoretic research on the interconnection of knowledge representation
Two different aspects of our work should be compared with the work proposed in the literature:
methods is limited to the interconnection of terminological and assertional languages in hybrid
The theoretic propositions concerning our hybrid architecture for knowledge representation methods,
systems. A description of the relationship between the assertional and terminological "boxes" of the
and the implementation of the MANTRA system. This is accomplished in the following sections.
KRYPTON system is presented in Brachman et a. (1985). This relationship is defined through a
structure called a symbol table. A symbol table is a function from l-place predicates to concepts and
from 2-place predicates to roles. Using this function a knowledge base is defined as a set of
7.2.1. The Theoretic Aspects
The theoretic research presented in this thesis fmd its place in the line of research initiated with
outcomes, where an outcome is a pair consisting of the subsumption relation of the terminological
theKL-ONE system (Brachman and Schmolze, 1985), and proceeded with the so called Hybrid
box, and of a valuation function for the assertional box respecting the definitions stated in the
Systems, e.g. KRYPTON, KL-TWO, BACK and KANDOR. More specifically, our work follows
terminological box.
the proposition of Patel-Schneider (198()a) of using a four-valued semantics to obtain semantically
motivated knowledge representation methods whose inference algorithms are decidable.
Another formal account of the interaction between terminological and assertionallanguages in
the BACK system is presented in Nebel and Luck (1988). The idea is very similar to the definition in
The expressiveness of the proposed knowledge representation language should be compared in
the KRYPTON system: The assertionallanguage is assigned a Model of a World Description, and the
two steps: The expressiveness of each representation method alone and the expressiveness of the
Hybrid Entailment is defined as those models of a world description which respect a given
interactions between the methods.
terminology.
The expressiveness of the adopted assertional language is the same as those of the usual
Other accounts of the integration of terminological and assertional languages are Stock and
languages based on first-order logic. The difference is that the supported inference algorithm, the t
Castelfranchi (1988) and Guarino (1988). Stock and Castelfranehi describe the KRAPFEN system
entailment algorithm, is very weak when compared to the usual theorem provers or logic
but their description of the integration of the different modules of the system are mainly syntactic, the
programming languages. The reason is that our algorithm is decidable, and theorem provers and logic
details of the semantics are not mentioned. Guarino describes the integration of a terminological
programming languages are not. The main characteristic of the four-valued logics is the non chaining
languages into a Prolog system, but this description is oriented more to programming language
property, i.e. facts are not allowed to interact to generate new facts, precluding modus ponens as an
inference rule. Compared with the other decidable first-order logics proposed in the literature - A
aspects than to the semantic aspects of the integration. We should also mention the work of Gert
Decidable First-Order Logic (Patel-Schneider, 1985) and Knowledge Retrieval as Specialized
Inference (Frisch, 1987b) - our language has the advantage of allowing the definition of predicates.
Smolka (1987, 1988a and 1988b) on logic programming with polymorphic ordered-sorted types,
allowing the integration of a special type of inheritance hierarchy, called feature types, with the logic
programming approach.
The terminological language integrated into the architecture provides the union of all the usually
Our approach is analogous to the ones used in KRYPTON and BACK, but it has the advantage
available operators of the terminological languages of the hybrid systems described in the literature.
of providing a framework where any number of knowledge representation methods could be
This language has also the original feature of allowing n-valued relations instead of the usual binary
integrated into the system. This framework, consisting of the module access primitives and of a
roles.
separate logical level where the knowledge bases are defined, allows the semantic definition of the
The proposed semantic network language, differently of many semantic network languages
interactions between the different methods without precluding the independent use of the methods.
described in the literature, e.g. Deliyanni and Kowalski (1979), Fikes and Hendrix (1977) and
McSkimin and Minker (1977), is not directly related to a logical language. Its function is to allow the
7.2.2. The Implementation Aspects
definition of named hierarchies. containing classes and their relationships. These hierarchies allow
The MANTRA system can be compared to two different classes of systems described in the
two types of links: The default links and exception links. The power o.f the representation language
literature: The hybrid systems, in the KL-ONE tradition, and the expert system shells disposing of
resides in the inheritance algorithm, which takes into account the explicit exceptions defined through
several knowledge representation methods, e.g. AGE (Nii and Aiello, Jlncl). OPS-5 (Brownston et
- 141
- 142
CONCLUSION
CHAPTER 7
CRANER 7
CONCLUSION
al., 1985). BABYLON (GMD, 1988). ART (Clayton, 1984), ADVISE (Michalski and Baskin,
logic programming based on a four-valued semantics. The utility of such a tool is an open question
1983), KEE (Kunz et al., 1984), KRL (Bobrow and Winograd. 1977), LOOPS (Bobrow and Stefik,
that deserves some research efforts. The same restriction precluding recursive definitions is presen t in
1983). MORE (Kahn et al. 1984) and many more.
By its goals. to provide a test bed where the different inference mechanisms for knowledge
the tenninologicallanguage, but in this case even the meaning of a concept ~r relation recursively
defined is not clear. Some research is this direction is also necessary.
representation and their interactions could be tested, and by the methodology of its implementation, a
The terminological language integrated into the system does not allow variables. The
system developed in a academic environment using only the high level language Common Lisp. the
introduction of variables in the subsumption questions is a useful improvement to the present
MANTRA system presents much more similarities with the other hybrid systems described in the
language. This extensio.n to the language would allow questions of the form:
literature than with the commercial expert system shell systems.
3 CI•..., cn3 rj , ...• rn E(CI, ..., Cn, rj , ..., rn)::::J E'(cj •..., c n, rj , .... rn), where the Ci and rj
are concept and relation variables, respectively, and where E and E' are frame entitiy descriptions
Compared with those hybrid systems, the MANTRA system presents the particularity of
allowing the integration of three different knowledge representation methods - logic, frames and
containing the variables Ciand rio To solve this type of subsumption problem we must first instantiate
semantic networks - while those hybrid systems usually allow only two methods: The assertional and
the variables appearing in the entity descriptions. These variables take values from the primitive and
terminological modules. Another characteristic of the MANTRA system is the heuristic level: The
defined entities of the knowledge base. and the complexity of this instantiation procedure grows
explicit possibility of defining ad hoc reasoning strategies without loosing the soundness and
exponentially with the size of the knowledge base. Another option is to restrict the values of the
completeness of the epistemological methods defined at the logical level. .
variables to primitive entities, but this would rise the problem of the unification of the entity
The main characteristics of the expert system shells providing several knowledge representation
methods is that they are application oriented, They dispose in general of a powerful user interface,
descriptions in the questions with the descriptions of the defined entities in the knowledge base. The
description constructors n and
U
being commutative and associative. this problem is also intractable.
facilitating the knowledge acquisition phase. Their methods, frequently based on production rules. are
The same extension allowing variables in question can be proposed in the semantic network
usually as expressive as a programming language, allowing the call of user defined procedures inside
module. In this case. the complexity is limited by the fact that each hierarchy is treated separately, and
representation code and providing facilities for debugging and prototype construction, In general, the
that the language used in the descriptions of semantic network entities is much simpler than the
efficiency is the main concern in the implementation of these systems. All these characteristics make
terminological language of the frame module.
this kind of systems and the MANTRA system quite different approaches to the knowledge
The semantic network module provide a quite simple language for the definition of hierarchies
representation problem, but the principal difference between the MANTRA system and these systems
containing classes and their relationships. The possibility of a richer language containing operators
is the reason why to provide several different knowledge representation formalisms: In an expert
allowing the manipulation of classes - class intersection, class difference, etc - should augment the
system shell, several formalism are available to facilitate the task of representing knowledge, the
expressiveness of the representation language of this module.
interactions between the different formalism being in a great extent left to the user, and in the
Another point deserving future research is the possibility of integration of more epistemological
MANTRA system the main goal of the system is to define, through a clear semantics, how the
methods into the system. Some possible methods are: Logic programming languages. data base
different formalism interact in a decidable way.
management systems and computer algebra systems. The methodology of integration of the different
modules into the logical level allows the easy integration of more methods. It is enough to define the
7.3. Future Research
The work described in this thesis can proceed in three different directions: (i) The continuation
definitions and questions of these new methods and how they interact with the other methods through
the corresponding module access primitives.
of the theoretic study of the semantic definition of knowledge representation methods and their
interactions, (ii) the improvement of the MANTRA system, and (iii) the development of applications
using the MANTRA system as a tool for knowledge representation. In the following sections, we
discuss each of these three directions.
7.3.2. The System
The first goal from the implementation point of view is to develop the aspects already formally
defined in the hybrid architecture which are not yet implemented: The predicate definition facility of
the assertional module, the integration of the production systems at the heuristic level, and the
7.3.1. The Theory
implementation of the six interactions between modules which are not yet included in the system.
A first research goal in the theoretic part is to study the consequences of rising some restrictions
Another enhancement to be brought to the system concerns the user interface. Since the main
imposed on the representation methods. In the assertional module. pre?icates can be defined but the
goal of the implemented system was the study of the interactions between the representation methods.
recursive definitions-are forbidden. The possibility of recursive definitions would lead to a kind of
little importance was given to the development of a user-friendly interface. Some immediate
CONCLUSION
CHAPTER 7
improvements to this interface would include extending the representation language with composite
operators that, although not augmenting the expressiveness of the language, would facilitate its use,
and the development of a graphical interface to the system, allowing the inherent graphical character
of the internal representation of knowledge in the form of graphs to be exploited in profit to the user.
Presently, the only way to associate ordinary Common Lisp values to symbols manipulated by
the system is to use the property lists of these symbols. A possible extension to the knowledge
represen tation language provided by the system would allow the direct use of Common Lisp atoms as
constants, primitive frame entities, or semantic network classes.
To improve the time efficiency of the system, a possible enhancement is the reimplementation of
the unification algorithm, knowingly the bottle neck in the execution time of the interaction
procedures, in a language such as C. The language C would accelerate the program execution without
loosing the transportability guarantee by the choice of Common Lisp as the implementation language.
Another enhancement to the system would include an interface 'to a database management
system allowing the storage of the data in the system knowledge bases into secundary storage, e.g.
Mattos (1988). Presently, all data manipulated by the system is stored in the Common Lisp data
structures. This approach is obviously impractical if the system is to manipulate very large knowledge
bases. The fact that the knowledge bases can be named and manipulated as primitive concepts of
higher order knowledge bases facilitates the design of such an interface.
7.3.3. The Applications
A promising application of the system capabilities is the definition of meta-modules for
nonmonotonic reasoning and possible worlds modeling using the capability of the semantic network
module to model logic entailment through the subclass relation in hierarchies. The possibility of
including exceptions in this hierarchies facilitates the task of representing nonrnonotonic reasoning,
and the possibility of manipulating several different named hierarchies allows the implementation of a
possible worlds reasoner, where each different set of beliefs would be represented by a different
hierarchy.
~sently. the
system is being used as the basis of a project for the implementation of a system
for the representation of algebraic knowledge (Calmet et aI., 1990a and 199Ob). This project brings
the system back to its original motivation: To be a system for the representation of mathematical
knowledge.
- 145
PROOF OF TI-IE FRAME METIIOD TI-IEOREM
APPENDIX A
Appendix A. Proof of the Frame Method Theorem
IS. PI: [XI •...• X n] n P2 <=> (PI n P2) : [XI •...• X n]
In this appendix. we prove the theorem 5.2. Initially we prove that the transformation into
canonical form preserve subsumption.
Definition A.I. Let EI and E2 bet two concepts or relations. and s = <m, E, ~> E SF a frame
situation. Then EI <=> E2 iff V s
E
FF, ~[ EI
I = ~[
E2
l
•
2. '
* <=> 1
1- <=> *
U
U
P2 <=> P2
(X2
(P2
[ <x, YI
Yn> I <x, YI
( <x, YI
, Yn> I <x, YI
, Yn> E ~+[ PI ] n ~+[ P2 ]
U
U
IS. PI: [XI,
16. (P: [AI
I
Yi E ~+[ Xi] }
1\
I )
U
<x, YI, ... , Yn> I <x, YI, .... Yn> E ~+[ P ]
Yi E ~+[ Bi
Yi E ~-[ Ai ] ) v Yi E ~-[
I <x, YI, .... Yn> E ~-[ P ] v
a, I }
( <x, Yt. ... , Yn> I <x, YI..... Yn> E ( <x, YI, ..., Yn> I <x, Yt. ... , Yn> E ~+'[ P ]
Yi E ~+[ Ai ]
PI
X3) <=> (XI
U
X2)
U
1\
( <x, Yt. ... , Yn> I <x, YI.... , Yn> E
-cx, YI, .... Yn> I <x, YI, ...• Yn> E ~-[ P ]
X3
Trivially:
, Yn> E ~+[ p]
Yi E ~+[ Ai ]
Yi E ~+[ Bi ] )
Yn> I <x, YI
X n] n P2 <=> (PI n P2) : [XI, .... X n]
, Yn> I <x, Yt.
AnD: [Bj , ... , B n] <=> P: [AI n BI, ..., An n B n]
Which is equal to the extension function applied to the right-hand side.
P2)
U
P3
, jmEJm (VP: [Xljl'
3 P: [WjIEJ) (Xlh)•...• WjmEJm (Xmjm)] <=> WhEJI' ,jmEJm (3 P: [Xljl'
Ann B n]
19. 3 (P: [AI ...., AnD: [BI ..... B n] <=> 3 P: [AI n Bt.
XnD' <=> 3 P: [, Xt.
' X n]
20. ' (VP: [XI,
, X n)) <=> VP: [, XI
, ' X n]
21. ' (j P: [XI
I
1\
v Yi E ~-[
s, ] )
17. VP: [nhEJI (Xlh).... , njmEJm (Xmjm)] <=> nil EJ!' .... jmEJm (VP: [Xli!' ...• Xmjm))
Applying the extension function to the left-hand side:
(x I VYi E m. <x, YI, .... Ym> E ~-[ p] v (Vi=I
(x I
3 Yi E
m. <x, YI•...• Ym> E ~+[ p]
FF.
1\
(Ai=I
Using the definition of union and intersection :. x
x E Uj=I .....n Ai iff Vj=I
= <m, E. ~> E
1\
Yn> E ~-[ p] v Yi E ~-[ Ai
Xmjm))
Xmjm))
, X n)) <=> ,p U <*> : [, XI, ..., ' X n]
Proof. For all frame situation s
Iv
Yi E ~-[ Ai ] v Yi E ~-[ Bi ] )
( <x, Yt.
U
11\
Yi E ~+[ Bi ] )
(
( <x, Yt.
P3) <=> (PI
1\
I }
From the set theory:
18.
22. ' (P : [XI
(
1\
( <X, YI, ... , Yn> I <x, YI, ..., Yn> E ( <x, Yt. ..., Yn>
17. VP: [nhEJ) (Xlj) .... , njmEJm (Xmjm)] <=> nhEJ!'
{ x I VYi
{x I
E
3 Yi E
E
m (Yi E nj=I
HJ j ~+[ Xij I»~
}
m (Yi E Uj=I
HJ j ~-[ Xij ]»
}
nj=I .....n Ai iff Aj=I .....n (x
E
Ai) and
n (x E Ai):
m, <x, Y\.
Ym> E ~-[ P ] v (Vi=I
m (Aj=I
HJ i Yi E ~+[ Xij D»~
}
m, <x, Yt.
Ym> E ~+[ P]
m (Vj=I
HJ j Yi E ~-[ Xij ]»
}
1\
(Ai=I
The equivalences 1-14 follow trivially from the definition of the extension function. In the following
By distributivity of v in respect to
proof w~en we apply the extension function to a concept or relation description. the result is a pair of
(x I Ai=I
m; j=I
HJ j (VYi
expressions representing the positive and '1egative extensions of the description. To simp~ify the
{ x I Vi=I
m: j=I
HJ; (3 Yi E m. <x. Yi>
notation we just write the two elements of the pair in separate lines without explicitly writing them as
Again using the definition of union and intersection:
a pair.
n ~+[ P2
I
Yn> E ~-[ PI ] U ~-[ P2 ] v Yi E ~-[ Xi
Yi E ~+[ Ai] )
13. PI n (P2 n P3) <=> (PI n P2) n P3
14. PI
Yi E ~+[ Xi ]
1\
From the set theory:
( <x, Yt. .... Yn> I <x, Yt. .... Yn> E
II. XI n (X2 n X3) <=> (XI n X2) n X3
12. XI
Yn> I -cx, YI•...• Yn> E ~-[ PI ] v Yi E ~-[ Xi ] ) U ~-[ P2 ]
Applying the extension function to the left-hand side:
9. PI n P2 <=> P2 n PI
U
Yn> I <x, YI..... Yn> E ~+[ PI ]
( <x, YI
16. (P: [AI, ... , AnD: [Bj , ..., B n] <=> P: [AI n BI ..... An n B n]
3. ' <*> <=> <1->
4.' <1-> <=> <*>
5. " X <=> X
6. " P <=> P
7. XI n X2 <=> X2 n XI
8. X I U X2 <=> X2 U X I
10. PI
( -cx, YI
Which is equal to the extension function applied to the right-hand side.
Theorem A.I. The following equivalences are valid.
I. '
Applying the extension function to the left-hand side:
E
1\:
Ym> E ~-[ p] v Yi E ~+[ Xij]) }
m. <x, YI,
ni=I .....m; j=I
HJj { x I VYi E m. <x. YI,
Ui=I ....•m: j=I
HJ; {x I
3 Yi E m, <x. YI
, Ym> E ~+[ P ]
1\
Yi E ~-[ Xij ]) }
Ym> E ~-[ p] v Yi E ~+[ Xij ] }
Ym> E ~+[ P ]
- 14f
1\
Yi E ~-[ Xij ] }
PROOF OF 11IE FRAME ME11IOD TIIEOREM
APPENDIX A
PROOF OF TIIE FRAME ME11IOD THEOREM
APPENDIX A
( <x, YI•...• Yn> I <x, YI..... Yn> E ~+[ P])
Which is equal to the extension function applied to the right-hand side.
n
{ <x, YI•...• Yn> I <x, YI..... Yn>
18. :3 P : ( Uh EJ\ (X Ijl)' ...• UjrnEJrn (Xmjrn)] (=) UhEJI' ..., jrnEJrn (3 P : lX lj(, ..., Xmjrn])
~-[ p] U ( <X, YI,
The proof is the dual of the proof of the equivalence 17, it is enough to replace the symbol x by the
~+[ p]
n by the symbol U, and vice versa.
symbol v and the symbol
E
~
/\
Yi E ~+[ Xi]
Trivially:
n t <x.
, Yn> I <x, YI, .... Yn> E ~n+1 /\ YiE ~-[ Xi] )
Yn> I <x, YI•...• Yn> E ~n+1 /\ Yi
Y\,
E
~+[ Xi] )
To see that this expression correspond to the extension function applied to the right-hand side,
consider that:
~+[ <*>] == ~x~ U ~x~x~ U ...
19. 3 (P: (AI, ...• An)): (BI, ..., B n] (=) 3 P: [AI n BI, ..., Ann Bnl
Applying the extension function to the left-hand side:
~-[ <*>] == 0
( x I 3 Yi E ~, -cx, YI•... , Yn> E ( <x. YI•...• Yn> I <X, YI, ..., Yn> E ~+[ P ] /\
What gives:
Yi E ~+[ Ai ] ) /\ YiE ~+[ Bi ] )
~+[ <*> : [, Xj •..., , XnJ] == ( <x, Yt. ...• Yn> I <x, YI...., Yn> E ~n+1 /\ Yi E ~-[ Xi] )
( x I 'VYi E ~. <x, YI, ...• Yn> E ( <x, YI, ..., Yn> I <X, YI, ..., Yn> E ~-[ P] v
~-[ <*>:['X\, ...,'X n]] ==(<x.Y!, ...,Yn>I<X,YI,:... Yn>E 0VYi E ~+[
Yi E ~-[ Ad ) v YiE ~-[ Bil )
x.r :
what can be transformed into:
Using the set theory:
( x I 3 YiE ~, <x, YI, ..., Yn> E ( <x,
n ...., Yn> I <X,
YI, .... Yn> E ~+[ p] ) /\
Yi E ~+[ Ai ] /\ Yi E ~+[ Bj ] I
, Yn>' <x, YI,
, Yn> E ~n+l/\ Yi E ~-[ Xi ] )
( <x, Ylo
, Yn> I <x, YI,
, Yn> E ~n+l /\ Yi E ~+[ Xi] )
This completes the proof of the theorem. I
(x I 'VYi E ~, <x, YI, .... Yn> E ( -cx, YI, ... , Yn> I <x, YI, ..., Yn> E ~-[ p] ) v
Yi E ~-[ Ad v Yi E ~-[
( <x, YI,
s, I )
Theorem A.2. Let X I and X2 be two concept descriptions in canonical form. Then
Trivially:
( x I 3 YiE ~. <x, YI,
, Yn> E ~+[ p] /\ YiE ~+[ Ai ] /\ Yi E ~+[
(x I 'VYi E ~. <x, YI,
, Yn> E ~-[ P] v YiE ~-[ Ai ] v Yi E ~-[ Bi] )
SUB-C(XI, X2)
s, ] )
Which is equal to the extension function applied to the right-hand side.
=)
XI:::l X2.
Proof. We prove the theorem by structural induction on the canonical form of concept descriptions.
In analyzing each step of the algorithm we consider the recursive calls inside the step as semantically
correct according to the induction hypothesis.
20.... (VP: lXI, ..., X n))
(=)
3 P: [, XI, ..., ' X n]
The algorithm SUB-C presented in section 5.1.2 is the following:
Applying the extension function to the left-hand side:
(xI
3 YiE
~, <x, YI,
SUB-C(CI, C2) =
, Yn> E ~+[ P ] /\ YiE ~-[ Xi ] )
( x I VYi E ~, <x, YI,
, Yn> E ~-[ p] v Yi E ~+[ Xi
I )
Which is trivially equal to the extension function applied to the right-hand side.
21. '
(:3 P: [XI, ...• X n))
(=)
'VP: (, XI ...., , X n]
This equivalence is the dual of the equivalence 20.
22. ' (P : (XI, ..., X n])
(=)
,p U <*>: (, Xj , .... ' X n]
Applying the extension function to the left-hand side:
=*
= 1. then T else
I.
if CI
2.
if CI E <primitive-concept> /\ C2 E <primitive-concept> then CI = C2 else
v C2
C2m then 'VC2j 3 Cli SUB-C(CIi. C2j) else
3.
if CI = CII
4.
if CI
= CII n
5.
if CI
=CII U
6.
if CI = CII
7.
if C2 = C21 U
C2n then SUB-C(CI, C21) /\
/\ SUB-C(CI. C2n) else
8.
if CI = Cj ] n
n Cln then SUB-C(Cl1. C2) /\
/\ SUB-C(Cln. C2) else
if C2 = C21 n
n C2n then SUB-C(CI, C21) v··· v SUB-C(CI, C2n) else
U
U
Cln /\ C2 = C21 U
U
n Cln /\ C2
= C21 n
n C2m then 'V Cli
Cln /\ C2
=C21 n
n C2m then 3 C2j 3 Cu SUB-C(Cli. C2j) else
•.. U
U ... U
.,. U
3 C2j SUB-C(Cli. C2j) else
Cln then SUB-C(CII, C2) v··· v SUB-C(Cln. C2) else.
( <x, YI•...• Yn> I <x, YI
, Yn> E ~~[ p] v Yi E ~-[ Xi] I
9.
( <x. YI.... , Yn> I <x, YI,
, Yn> E ~+[ p] /\ YiE ~+[ Xi] )
10.
if CI = 3 PI: [AI •...• AnI /\ C2 = 3 P2: [Blo ..., B n] then
II.
if CI = 'VPI : [AI •... , AnI /\ C2
SUB-R(PI. P2) /\ SUB-C(Ai. Bj)i = J, ...• n else
Using set theory:
( <x, YI•...• Yn> I <x, YI•...• Yn> E ~-[ P ] ) U
( <x, YI..... Yn> I <x,
- 149
y!, ....
Yn> E ~ /\ YiE ~-[ Xi ] )
= 'VP2 : [BI •... , B n] then
SUB-R(P2, PI') /\ SUB-C(Aj, Bi)i
- 150
=
I..... n else F
PROOF or THE FRAME MElliOD THEOREM
APPENDIX A
where PI' is part of the concept CI'= VPI' : [AI', ..., An'l obtained from the concept CI = VPI :
APPENDIX A
PROOF OF THE FRAME MElliOD THEOREM
7. If XI is a concept description without n and
~-[ X2] == nj=I
V PI :.[ AI, .. ·, VP2: [BI, ... ,Bm], ... ,Anl
VePI:
r-.... ,3 P2: r-...., -I. ..., -n . [AI,···,
For all frame situation s = <~,
E, ~>
operators and X2 = X21 U
... U
X2m then:
V P2: [BI, ... ,Bn], ... ,Anl
E FF. We have:
,n ~-[ X2j ] and
for ~+[ XI ]:1 ~+[ X2 ] and ~-[ XI ] S ~-[ X2 ] to be valid it is necessary that all X2i be such
that ~+[ Xd:1 ~+[ X2i ] and ~-[ XI ] S ~-[ X2i I.
8. If XI = XII n ... n Xln and X2 is a concept description without nand u operators, then:
~+[ XI] == ni=I, ,n ~+[
1. Trivially if XI =
U
~+[ X2] == Uj=I, ,n ~+[X2j ]
IA I, ..., Anl through the recursive application of the following rule:
* or if X2 =..l. then XI ::J X2.
x., ]
~-[ XI] == Ui=l, ,n ~-[ Xli ] and
x, ] i? ~+[ X2 ] and ~-[ x, ] S ~-[ X2 ] to be valid it is necessary that all x., be such
that ~+[ x., ]:1 ~+[ X2 ] and ~-[ Xli ] S ~-[ X2 ].
for ~+[
2. Trivially if XI and X2 are primitive concepts that XI = X2
3. If XI = XII
U ... U
~
XI
::J
X2.
Xln and X2 = X21 u ... u X2m then:
9. If XI is a concept description without nand u operators and X2 = X21 n ... n X2m then:
~+[ XI] ==Ui=I, ,n~+[ Xli]
~+[ X2] == nj=I, ,n ~+[ X2j ]
~-[ X I] == ni=I, ,n
~-[ X2] == Uj=l, ,n ~-[ X2j ] and
e-r Xli] and
x, ] :1 ~+[ X2 ]
~+[ X2] == Uj=1 , ,n ~+[ X2j ]
it is enough for ~+[
~-[ X2] == nj=I, ,n ~-[ X2j ]
X2i such that ~+[ XI ] 2 ~+[ X2i] and ~-[
and ~-[ XI ] ~ ~-[ X2 ] to be valid that there exists one
x, ] S ~-[ X2i ].
Using set theory, we can see that if for all X2j there is a Xli such that:
~+[ Xli] :1 ~+[ X2j ] and ~-[
x., ] S ~-[ X2j ] then
10. if XI =
~+[ XI ] :1 ~+[ X2 ] and ~-[ XI ] S ~-[ X2 ].
3 PI: [AI, ..., Anl and X2 = 3 P2: [BI, ..., Bnl then
~+[
x, ] == ( x I 3 YiE
~+[
X2 ] == ( x I
~, <x, YI, ..., Yn>E ~+[ PI ] A Yi E ~+[ Ai ] )
~-[ Xl] == (xl VYi E ~,<X,YI'''',Yn>E ~-[ PI] vYiE ~-[ Ai])
4. XI =XII n ..· n Xln andX2=X21 n ..·n X2m
3 Yi E ~, <x,
Ylo
~-[ X2] == ( x J VYi E ~, <x, YI,
This case is the dual of case 3.
, Yn>E
~+[
P2 ] A Yj E
~+[
, Yn> E ~-[ P2 ] v Yi E ~-[
n, ] )
n, ] )
Now if we have that ~+[ PI ] 2 ~+[ P2 ] and ~-[ PI ] S ~-[ P2 ] and for i=l, ... , n that
5. If XI =XII
U .. · U
~+[ Ai ] :1 ~+[ B~ ] and ~-[ Ai ] S ~-[ B, ] it is easy to conclude by inspection that
~+[ x, ] 2 ~+[ X2 ] and ~-[ XI ] S ~-[ X2 L
XlnandX2=X21 n ..·n X2m then:
~+[ XI] == Ui=I, ,n ~+[ Xli]
~-[ XI] == ni=I, ,n ~-[ Xli] and
~+[ X2] == nj=I, ,n ~+[ X2j ]
11. if XI = VPI : [AI, ..., AnlA X2 = VP2: [BI, ..., Bnl then
~-[ X2] == Uj=I, ..,n ~-[ X2j ]
~+[ XI ] == (x I VYi E ~,<x, YI,
, Yn>E ~-[ PI ] v Yi E ~+[ Aj ] )
Using set theory, we can see that it is enough that there exist one X2j and one Xli such that:
~-[ Xl ] == ( x I
, Yn>E ~+[ PI ] A YiE ~-[ Ai ] )
3 Yi E ~, <x,
Ylo
~+[ Xli] :1 ~+[ X2j ] and ~-[ Xli ] S ~-[ X2j ] to the following expression to be valid:
~+[ X2 ] == ( x I VYi E ~,<x, YI,
~+[ XI ] :1 ~+[ X2 ] and ~-[ XI ] S ~-[ X2 ].
~-[ X2 ] == ( x I
3 Yi E
~,<x, Ylo
Yn> E ~-[ P2 ] v Yi E ~+[ Bj ] )
, Yn>E ~+[ P2 ] A Yj E ~-[ Bj ] )
Initially we must prove the validity of the following equivalence:
6. If XI = XII
U .. , U
Xln and X2 is a concept description without nand
U
operators, then:
~+[ XI] == Ui=I, ,n ~+[ Xli]
~--[ XI] ==ni=I
n ~-[ Xli] and
, Bml, ....Anl <=>
VPI : [AI, ..., VPj: [BI
V(PI : [*,
,
3 Pj: [*, ..., *J, ..., *j): [AI, ..., VPj: [BI, .... Bnl. ..., An]
it is enough for ~+[ XI ]:1 ~+[ X2 ] and ~-[ XI ] S ~-[ X2 ] to be valid that there exists one
Xli such that ~+[ Xli ] :1 ~+[ X2 ] and ~-[ Xli] S ~-[ X2].
- 1:
PROOF OF lJIE FRAME METIIOD THEOREM
APPENDIX A
Applying the extension function to the left-hand side gives:
( x I VYi
E
m. <x, YI, ... , Yj..···• Yn> E ~-[ PI ] v Yi
Yj
(xI
3 Yi E
m, <x, YI, ...• Yj•...• Yn> E ~+[ PI
Yj
E
~+[ Ai Ji '" j v
I.
(x I VYk E ID. -cx, YI•...• Ym> E ~-[ Pj ] v Yk
E
(x
E
3 Yk E
J
I 1\ Yi E
~-[ Ai ]i "'j
E
~+[ Bk] ))
1\
m, <x, YI, ..., Ym> E ~+[ Pj ]
1\
Yk E ~-[ Bk
I )I
1 in the above expression.
-t. showed below, we do not change
We can see by inspection that, if we substitute ~-[ PI ] and ~+[ PI
by the extension function of PI : [..... ,
3 Pj
: [..... , .].... ,
the value of extension function of the left-hand side. But the result of such a substitution is exactly
the value of the extension function applied to the right-hand side.
~+[ PI : [......
3 Pj : [.,
, Yj, .... Yo> I -cx, YI..... Yj..... Yo> E ~+[ PI ]
Yj
~-[ PI : [
3 Pj : [
( <x, YI
E
(
1\
(Yi E m)i '" j 1\
if RI
E
3.
ifRI
= Rll U
4.
if RI = RII n
n Rln 1\ R2 = R21 n
n R2m then VRIi 3 R2j SUB-R(Rli. R2j) else
5.
if RI = RII
U
U
Rln 1\ R2 = R21 n
n R2m then 3 R2j 3 Rli SUB-R(Rli. R2j) else
<primitive-relation>
U
Rio 1\ R2
1\
R2 E <primitive-relation> then RI = R2 else
= R21 U
.. · U
R2m then VR2j 3 Rli SUB-R(Rli. R2j) else
6.
if RI = RII
U
U
Rln then SUB-R(RII, R2) v
v SUB-R(Rlo. R2) else
7.
if R2 = R21 U
U
R20 then SUB-R(RI. R21)
1\
1\
SUB-R(RI, R20) else
8.
9.
if RI = RII n
n Rio then SUB-R(Rll. R2)
1\
1\
SUB-R(Rlo, R2) else
if R2 = R21 n
n R20 then SUB-R(RI. R21) v ..· v SUB-R(RI. R2n) else
10.
if RI = <primitive-relation>
1\ R2 = P : [B
B o] then SUB-R(RI' P2) else
ifRI = POI: [AI ..... A o] 1\ R2 = P02: [BI
, B o] then
SUB-R(POI. POl) 1\ SUB-C(Aj, Bi)i = I, ..., 0 else F
For all frame situation s = <ID. E. ~> E FF. We have:
Yo> I <x, YI..... Yj...., Yo> E ~-[ PI ] v (Yi
Yj,
2.
x I 3 Yk E m. -cx, YI..... Ym> E ~+[ Pj ] )}
]] ==
],
SUB-R(RI. R2) =
if RI = <.> v R2 = <.1> then T else
II.
].... , .]] ==
( <x, YI
PROOF OF THE FRAME METIIOD TIffiOREM
APPENDIX A
Yj E
(
xI
'In: E
E
ID)i '" j v
m. -cx, YI..... Ym> E ~-[ Pj] ))
Steps 1-9 are analogous to theorem A.2.
We have proved that the application of the rule does not change the value of the extension function
of X 1. To prove that SUB-C(P2. PI')
1\
SUB-C(Ai. Bi)i=l, ..., 0 ~ XI ::J X2. we must consider
~+[ P2 ] == ( <x. Yt.
two case:
(i) The rule does not apply and PI' = Pl. In this case we can see by inspection that if
~+[ P2
]';;?
~+[ Ai ]
~+[ XI J
;;?
;;?
n, ] ) 1\
(
== ( <x, Y
I
Yo> I <x, YI
Yo> E ~+[ P
Yo> I <x, YI,
Yo> E ~-[ P] v Yi E ~-[ Bi] )
1\
Yi E ~+[ Bi] )
~+[ PI ] O? ~+[ P2 ] and ~-[ PI ] S ~-[ P2
I,
c-r X2 ] and e-r XI ] S ~-[ X2 l
t-...., 3 Pj : [...... *J......]. Inspecting the extension function
of P I' in this case. we can see that ~+[ PI' ] S ~+[ PI
];;?
I
And trivially. if ~+[ PI ] O? ~+[ P ] and ~-:[ PI ] S ~-[ P ] then
~-[ A; ] S ~-[ Bi ] then
(ii) The rule applies and PI' = PI:
~+[ P2
~+[ P2
~+[ PI ] and ~-[ P2 ] ~ ~-[ PI ] and for all i=l ..... n
~+[
10. if PI is a relation description without nand U operators and P2 = P : [BI .... , B n]. Then
~+[ PI'] and ~-[ P2
IS
I and
~-[ PI ] S ~-[ PI'
I. This means:
~-[ PI'] ~ ~+[ P2 ] O? ~+[ PI ] and ~-[ P2 ] S ~-[
pd
and the argument of case (i) is also valid for this case.
II. if PI = POI : [A
An] and P2 = P02 : [BI ..... Bol. Then
~+[ PI ] == ( <X. YI
~+[ PI
, Yo> I <x, Yl.
, Yn> E ~+[ POI]
1\
Yi
E
~+[ Ar
E
~-[ Ai ] ) and
Yt.
Yo> I <x, Ylo
Yo> E ~-[ POI] v Yi
~+[ P2] '" ( <x. YI,
Yn> I <x. YI
Yo>
~+[ P2 ] '" ( <x. Yl.
Yo> I <x. YJ,
Yo> E ~-[ POl ] v Yi
I '" ( <x,
E
~+[ POl]
1\
I )
Yi E ~+[ Bi ] )
E
~-[ Bi ] )
And it can be verified by inspection that if ~+[ POI ] O? ~+[ P02 ] and ~-[ POI ] S ~-[ POl ] and
This concludes the proof of the theorem. •
~+[ Ai ] O? ~+[ Bi ] and ~-[ Ai ] S ~-[ Bi ] for i= I, ..., n, we have:
Theorem A.3. Let PI and P2 be two relation descriptions in canonical form. Then
~+[ PI ] O? ~+[ P2 ] and ~-[ PI ] S ~-[ P2 1
SUB-R(PI, P2) ~ PI::J P2.
Proof. Analogously to theorem A.2, we prove the theorem by structural induction on the canonical
This completes the proof of the theorem. •
form of relation descriptions. The algorithm SUB-R, presented in section 5.1.2 is the following:
Theorem A.4. Let XI and X2 be two concept descriptions in canonical form. Then
., SUB-C(XI, X2)
~
., (XI ::J X2).
Proof. Analogously to the above theorems. we prove the theorem by structural induction on the
canonical form of concept descriptions. We refer to the algorithm SUB-C showed in theorem A.2.
- 153
- 1'\4
PROOF OF THE FRAME METIIOD TIlEOREM
APPENDIX A
PROOF OF THE FRAME METHOD THEOREM
APPENDIX A
7. If XI is a concept description without nand u operators and X2 = X21 u '" u X2m. Then:
For each step of the algorithm, we must find at least some frame situation s = <~, E, ~> E FF, such
~+[ X2] == U je l , ,n ~+[ X2j ]
that, if" SUB-C(XI, X2) then ~+[ XI ]
~"-[ X2] == nj=I, ,n ~-[ X2j ] and
'1 ~+[ X2 ] v
~-[ XI ] <f, ~-[ x21
1. Trivial.
2. if X I and X2 are primitive concepts. Then, if X I
situations, ~+[ XI ]
'1 ~+[ X2 ] v
~
X2 we have that, for at least some frame
~-[ XI ] <f, ~-[ X2
I, because we are considering all possible
frame situations, and XI and X2 being different symbols, they will be associated to different
extensions.
if there is at least one X2i such that ~+[ XI ]
'1 ~+[ X2j ] or
~-[ XI ]
necessarily we have that ~+[ XI ]
~-[ XI ]
X2 1
'1 ~+[ X2 ] or
<t ~-[
<t
~-[ X2j ] then
8. If X I = X 11 n ... n X In and X2 is a concept description without nand u operators. Then:
x., ]
~-[ XI] == Ui=\' ,n ~-[ x., ] and
it is enough that there exists one x., such that ~+[ Xli ] '1 ~+[
~+[ Xd == ni=I, ,n ~+[
for ~+[ XI ]
'1 ~+[ X2 ] or
X2 ] or ~-[ Xli]
<t
~-[ X2
I
~-[ XI ] <f, ~-[ X2 ] to be valid.
3. If X I = X II u ... u X In and X2 = X21 u ... u X2m then:
~+[ XI] == Ui=I, ,n ~+[ Xli ]
9. If XI is a concept description without nand u operators and X2 = X21 n ... n X2m. Then:
~+[ X2] == nj=I, ,n ~+[ X2j ]
~-[ XI] == ni=I, ,n ~-[ Xli] and
~+[ X2] == Uj=I, ,n ~+[ X2j ]
e-r X2] == Uj=I,
~-[ X2] == nj=I, ,n ~-[ X2j ]
if for all j=l, ... , n, we have ~+[ XI ]
Using set theory, we can see that if there exists at least one X2j such that for all X IF
inspection that ~+[ X I ]
~+[
,n ~-[ X2j ] and
'1 ~+[ X2j ] or
'1 ~+[ X2 ] or
~-[ X I ]
<t
~-[ XI ] <f, ~-[ X2j ] the we can see by
~-[ X2
I.
x., ] '1 ~+[ X2j ] or ~-[ Xli ] <f, ~-[ X2j I then
~+[ XI ]
'1 ~+[ X2 ] or
~-[ XI ] <f, ~-[ X2
I.
10. if XI =
3 PI
4. X I = X II n ... n X In and X2 = X21 n ... n X2m
This case is the dual of case 3.
3 Yi E
~,<x, YI,
, Yn> E ~+[ PI ]
1\
Yi E ~+[ Ai ] I
~-[ XI] == (x I VYi E ~, <x, Y\.
, Yn> E ~-[ PI ] v Yi E ~-[ Ai] I and
~+[ X2 ] == ( x I
,
~-[ X2 ]
3 Yi E ~,<x,
7 ( x I VYi E
y\.
~,<x. YI
Yn> E ~+[ P2 ]
1\
Yi E ~+[ Bi ] I
Yn> E ~-[ P2 ] v Yi E ~-[
n, ] I.
If we have that ~+[ PI ] '1 ~+[ P2 ] or ~-[ PI ] <f, ~-[ P2 ] and for all i= I, .... n that
5. If XI =XII u ... u Xln and X2= X21 n ..· n X2m then:
~+[ Xd == Ui=I, ,n ~+[
3 P2 : [BI, ... , B n] then
: [AI.' ... , AnI and X2 =
~+[ XI ] == ( x I
~+[ Ai ]
x., ]
~+[ XI ]
~-[ xd == ni=I, ,n ~-[ Xli] and
'1 ~+[ n, ] or ~-[ Ai ] <f, ~-[ n, ] then we can verify by inspection that
'1 ~+[ X2 ] or ~-[ XI ] <f, ~-[ X2 1
~+[ X2] == nj=I, ,n ~+[ X2j ]
~-[ X2] == Uj=I, ,n ~-[ X2j ]
II. if XI = VPI : [AI .... , AnI
Using set theory, we can see that iffor all X2j and for all Xli we have that:
~+[ XI] == (x I VYi
~+[ Xli]
~-[ XI ] == ( x I
~+[
~+[ X2 ] == ( x I V Yi
'1 ~+[ X2j ] or ~-[ Xli ] tf, ~-[ X2j ], then necessarily
XI ] '1 ~+[ X2 ] or ~-[ XI ] <f, ~-[ X2 ].
~-[ X2 ] == ( x I
6. If XI = XII u ... u Xiii and X2 is a concept description without nand u operators, then:
E
3 Yi E
1\
X2 = VP2: [BI, ...• B n] then
~,<x, YI,
, Yn> E ~-[ PI ] v Yi E ~+[ Ai ] J
~,<x, y\.
,
Yn> E ~+[ PI ]
Yi E ~-[ Ai ]
I
Yn> E ~-[ P2 ] v Yi E ~+[ Bi ]
I
E
~, <x, y\.
,
3 Yi E
~, <x, Y\.
, Yn> E ~+[ P2 ]
1\
1\
Yi E ~-[ Bi ] J
The equivalence:
~+[ XI] == Ui=I, ,n ~+[ Xli ]
~-[ XI] == ni=I, ,n ~-[ Xli] and
iffor i= I, ... , n we have that ~+[ X Ii ]
by inspection that ~+[ XI ]
VPI : [AI, ... , VP2: [BI, ... , Bm), ... ,A n] (:::)
'1 ~+[ X2 ] or
'1 ~+[ X2 ] or
~-[ XI ]
~-[ Xli]
<t ~-[
X2
<t
~-[ X2 ] then we can verify
V(PI : 1*, ...,3 P2: [*, ... , *1, ... , *}): [AI, ... , VP2: [BI, ... , B n], ... ,Anl
l
has been already proven in theorem A.2. Analogously to theorem A.2, we must consider twO
cases:
- 156
PROOF OF HIE FRAME MElHOD nIEOREM
APPENDIX A
(i) The rule does not apply and PI' = PI. In this case we can see by inspection that if
I <t ~-[ PI ] and for all i=l •...•
<t ~-[ Bi ] then
x, ] <t ~-[ X2].
~+[ P2 ]"l ~+[ PI ] or ~-[ P2
n
~+[ Ai ] "l ~+[ Bi ] or ~-[ Ai ]
~+[ XI ] "l ~+[ X2 ] or ~-[
(ii) The rule applies and PI' = PI : [*•.... 3 Pj : [*•...• *1....• *l. Inspecting the extension function
of PI' in this case. we can see that ~+[ PI' ]
~+[ P2]"l ~+[ PI'] or ~-[ P2 ]
<t ~-[
'= ~+[ PI ] and ~-[ PI ] '= ~-[ PI' J. This means:
=:) ~+[ P2 I "l ~+[ PI ] or ~-[ P2 ] <t ~-[ PI I
Pt']
and the argument of case (i) is also valid for this case.
This concludes the proof of the theorem. I
Theorem A.S. Let PI and P2 be two relation descriptions in canonical form. Then
., SUB-R(PI. P2)
=:)
"(PI:::J P2).
Proof. Analogously to above theorems. we prove this theorem by structural induction on the
canonical form of relation descriptions. The algorithm SUB-R is showed in theorem A.3.
For each step of the algorithm. we must find at least some frame situation s = <g), e, ~> e FF. such
<t ~-[
that. if .., SUB-R(PI. P2) then ~+[ PI ] "l ~+[ P2 ] or ~-[ PI ]
P2 ].
Steps 1-9 are analogous to theorem AA.
to. if PI is a relation description without nand u operators and P2 = P: [BI, ..., Bnl. Then
~+[ P2] ;:
~+[ P2] ;:
I <x, YI , Yn> I <x, YI. ...• Yn> e
I <x, YI, , Yn> I <x, YI•..., Yn> e
And trivially. if ~+[ PI ] "l ~+[ P ] or ~-[ PI ]
~+[ PI]"l ~+[ P2] or~-[ PI]
<t
~+[ P]
~-[
rI
<t ~-[
A
Yi e ~+[
v Yi e ~-[
n, ]
I
n, ] I
p] then
~-[ P21
II. if PI = POI: [AI •...• Anl and P2 = P02 : [BI, ..., B n). Then
~+[ PI ] ;: I <x, YI •..., Yn> I <x, YI •.... Yn> e ~+[ POI] A Yi e ~+[ Ai] }
~+[ PI ] ;:
~-[ POI] v Yi e ~-[ Ai ] } and
~+[ P2] ;:
~+[ P02 ]
A
~+[
~-[ P02
v Yi e ~-[
I <x. YI ....• Yn> I -cx, YI•...• Yn> e
I <x, YI.... , Yn> I <x, YI•..., Yn> e
P2 ] ;: I -cx, YI. ...• Yn> I <x, YI, ..., Yn> e
And it can be verified by inspection that if ~+[ POI] "l ~+[
~+[ Ai ] "l ~+[
a, ] or ~-[
Ai]
~+[ PI ] "l ~+[ P2 ] or ~-[ PI ]
<t ~-[
<t ~-[
Bi
I
I
Yi e ~+[ Bi ] }
n, ] }
Pm I or ~-[ POI] <t ~-[ P02 ] and
for i=l •...• n. we have:
P2 ].
This completes the proof of the theorem. I
Theorems A.I. A.2. A). AA and A.5 together prove the validity of theorem 5.2.
APPENDIXB
PROOFS OF TIlE INTERACTION THEOREMS
Appendix B. Proofs of the Interaction Theorems
In this appendix, we prove the interaction theorems presented in section 5.2.2. The structure of
We define the following semantic knowledge base:
the proof of all the theorems is the same: (i) We define a syntactic knowledge base such that, the
application of the original inference algorithm to this knowledge base is equivalent to the application
La = ( SIS E LL
1\
of the modified interaction algorithm to the original knowledge base. (ii) We construct the semantic
knowledge base corresponding to the syntactic knowledge base of point (i). (iii) We prove that this
semantic knowledge base is equivalent to the knowledge base generated by the interaction function.
B.1. First-Order Logic and Frames
In this section, we prove the theorem 5.4. Initially. we introduce some definitions and prove a
technical lemma. Next, we prove the if and the only if parts of theorem 5.4 in theorems B.l and B.2.
T E J[ <I> ] S V 1\ <I> E BL a )
We have the following cases according to the form of the formula <I>:
(i) <I> does not contain the predicate p - In this case the contents of the syntactic knowledge base NL a
are irrelevant and we have trivially that:
vs E 1..0, T E J[ <I> ] S v iff vs E L), T E J[ <I> ] S v iff vs E Lz.T E J[ <I> ] S -.
(ii) <I> contains the predicate p - We have two subcases:
Definition B.1. Given LL, the set of formula: already stored into the knowledge base BL, through
(ii.a) 'v'S E
1..0, T E j[ <I>[p(T)]
] S v - In this case we have trivially that:
the primitive Tell(BL, to-logic(L)), and LF the set of concept and relation definitions already stored
in the knowledge base BF, through the primitive Tell(B F, to-frame(L)). We define the
vs E 1..0, T E
j[ <I>[p(T)] ] S v iff vs E L), T E j[ <I>[p(T)] ] S v iff
corresponding syntactic knowledge bases BL a and BFa and semantic knowledge bases BL s and BF s
vs E Lz, T E J[ <I>[p(T)] ] S -.
as:
(ii.b) 3 S E
1..0, Til!
J[ <I>[p(f)] ] S v - In this case we have by definition that:
BL a = ( <I>3NF I <I>3NF = NORMAL-FORM(<I>, 3) 1\ <I> E LL)
BL s = ( SIS E LL
1\
BFa = ( «type>, I,
T E J[ <I> ] S V 1\ <I> E LL )
~canonica)-form>
I I :<type>
~
E LF ), where <type> can be "Subsume" or
vs E 1..0,
31t E
n. T E
J[ <I>[1t(T»)
I
Sv ~
vsE
L), T E J[ <I>[p(T») ] S -. on the other
hand we know that the semantic definition of a predicate is the following:
"Equal".
BF s = ( sis E FF
1\
T E J[ L ]
S 1\
L E LL)
•
Definition B.2. Let r[p(T») be a first-order logic formula containing the predicate p applied to the
list of terms T, and let r[1t(T)] be this same formula with all occurrences of p(f) replaced by 1t(T).
•
Lemma B.l. Let BL a and NLa be two syntactic first-order logic knowledge bases, p be a predicate
symbol, and n a set of predicate symbols. If we define the following syntactic knowledge base:
NL a = ( <I>[p(f») I <I>11t(T)I E BLa 1\ 1t En) and the following semantic knowledge bases:
L] = ( SIS E LL 1\ T E J[ <I> ] S V 1\ <I> E BLa U NLa )
Lz = ( SIS E LL I\T E J[ <I> ] S V1\ <1> E BLa
1\
(1t E n) ~ (~+[ 1t ]
0;; ~+[
p ]
1\
~-[ P ] c;: ~-[
1t]»).
Then Lj == Lz.
Proof. We say that two first-order logic semantic knowledge bases, L) and Lz are equivalent if for
TE J[ Pn(T),
, Tn)]Sviff 'v'SE S,<t[ T) ]sv,
FE J[ Pn (T),
, Tn) ] S v iff 'v's E S,
<rl
T) ] s v,
,t[ Tn]sv>E ~+[ P n]
, t[ Tn ] s v> E ~-[ P n
I
This means that, if for a given set of compatible logical structures S = <~, E, ~>, we have that
(~+[ 1t ] c;: ~+[ p ] 1\ ~-[ P ] c;: ~-[ 1t]) then
T E J[ 1t(T) ] S v ~ T E J[ p(T) ] S v and
FE J[ p(T) ] S v ~ F E J[ 1t(T) ] S v.
Now, the semantics of the formula <I>[p(T)] is constructed using the semantic values of the
predicate p(f), and the double implication above ensures that:
vs E 1..0,
31t E
n. T E
J[ <1>[1t(T)] ] S v ~
vs E
Lz, T E J[ <I>[p(T») ] S v. completing the
prove of the equivalence of the two semantic knowledge bases. I
all formula: <1>:
'v'SE LI,TE J[ <1>]SViff'v'SE Lz,TE J[<1>]Sv.
Theorem B.l. LF-QUESTION(<I>, BL a, BFa) => [ from-Iogic(<1» ] <LF(BL s, BFs), 0, 0>.
Proof. The algorithm LF-QUESTION presented in section 5.2.2.1 is the followinc:
- 161
PROOFS OF THE INTERACTION THEOREMS
APPENDlXB
LF-QUESTION(<1J. BL, BF) ==
PROOFS OF TI-lE INTERACTION THEOREMS
APPENDIX B
Using lemma B.I. this expression can be written:
I. Calculate <1JYNF using the algorithm NORMAL-FORM(<1J, V).
L,
2. Define PlI> as the set of all predicate symbols appearing in <1J.
3. For all symbols p
E
= { SIS E
LL /l,T E J[ <1J ] S v
subsumed by p using the algorithms SUB-C and SUB-R. Call it Sp.
E BL I, <1JYNF) but in step (2) of the algorithm:
"For all Pi and for all Clj calculate Sij, the set of all substitutions ~ such that Clje S; Pie."
Instead of using the normal unification algorithm for calculating
E
SP2 v P2 E Spr
[f] BF n (P IBL. where (f1BLis the set of frame entity symbols defined into knowledge base
1\
~-[ P ]
S;
~-[
d)1
Using the definition of the semantic knowledge base BL s• the definition of the set Sp, and rearranging
L, = ( SIS
E
BL s /I, V It E
n. V p E
(V s E
E
BFs • T
P<t>.
J[ p::l
It ] S)
=> (~+[
It ] S; ~+[
p
I
1\
~-[ P ]
S;
~-[
d) I
The expansion of the function LF, appearing in the right-hand side of the theorem implication. has
the following form:
BF. and (PIBL is the set of predicate symbols defined in the knowledge base BL.
Let P<I> = Predicates(<1J)
~+[ p ]
the terms, this expression can be rewrite as:
5. Return the result ofT-ENTAILMENT.
n=
S;
P<t>,
E
e, use a modified algorithm that
accepts two predicate heads PI and P2 as non clashing whenever PI = P2 v PI
Let
BLa /I, V p
E
(?t ESp) => (~+[ It ]
PlI> n {f1BF calculate the list of symbols associated to frame entities
4. Calculate T-ENTAILMENT( ( <1J' I <1J'
<1J
/I,
n (f1BF. i.e. the intersection of the set of predicate symbols appearing in the
formula <1J with the set of symbols representing defined frame entities in the knowledge base BF.
LF(BL s, BF s) = let
n
= {PJI
( SIS
From the soundness and correctness of the algorithms SUB-C and SUB-R, stated in theorem 5.2, we
know that the set Sp, calculated in the step 3 of the algorithm, correspond to the following semantic
E
n {cl
n (r n))] in
If), (V s E BF s • T
U (Ui=2....,~({Pnl
E
n, V X2 E
=>
(~+[ XI ]
BL s /I, V XI
S;
~+[ X2 ]
1\
E
J[ X2::1 XI ]
~-[ X2 ] s; ~-[ XI I
S)
) ),
definition:
Sp = { 1t I "Is
E
BFs, V It E
n, T E J[
p>
It ]
By definition, P<t> S; [f}, if we consider that the only predicates which should be taken into account
to prove a given formula <1J are the predicates appearing in this formula. then:
sI
In the step 4 of the algorithm, the fact that we have modified the unification algorithm to accept as non
clashing two predicate symbols such that one subsumes the other is equivalent
to
[ from-Iogic(<1J)
I
(L s) => [ from-Iogic(<1J)
I
»'
(LF(BLs. BFs
execute the T
ENTAILMENT algorithm over a modified syntactic knowledge base, La = BLa U NL a, where we
have added the set of formulze NLa, defined as:
This completes the proof of the theorem. I
».
Theorem 8.2• ., LF-QUESTION(<1J, BLa. BFa) => ., [ from-Iogic(<1J) ] (LF(BL s, BF s
NL a = ( rrp(T)]I I'[ ltcr)}
E
BL a 1\ V P E PlI>. V 1t E
n. SUB-C(p,1t) v SUB-R(p.lt) I.
Proof. We refer to the algorithm LF-QUESTION showed in theorem B.I.
Again from the soundness and correctness of the algorithms SUB-C. and SUB-R, and using the
Analogously to the theorem B.I. we consider that the modification of the unification algorithm is
definition of the set Sp. we can rewrite this expression as:
equivalent to the application of the algorithm T-ENTAILMENT, at the step 4 of the algorithm. to an
extended knowledge base. whose semantic form is the following:
NLa = ( rrp(T)]I r[1t(T)]
E
BL a 1\ V P E PlI>.1t
E
Sp I
L, = ( SIS
The semantic knowledge base corresponding to the syntactic knowledge base La = BLa U NL a is the
E
BL s /I,
V It E n, V p E P<t>,
(Vs E
BFs• T E J[ p::l n
I S) => (~+[
1t I S; ~+[ p
I 1\ ~-[
P]
S;
~-[ 1t]) I
following:
t., = ( SIS
E
LL
1\
T E J[ <1J ] S v
/I,
<1J
E
BLa U NL a I
If > LF-QUESTION(<1J. BL a• BFa) = T then, considering the soundness and completeness of the
algorithm T-ENTAILMENT established in theorem 5.1, it must be the case that:
- 161 -
- 162
PROOFS OF THE INTERACTION THEOREMS
APPENDIX B
APPENDIX B
PROOFS OF THE INTERACTION TIlEOREMS
3 S E L s , T eo J[ $ ] 5 v
Proof. Analogously to lemma 8.1, we say that two first-order logic semantic knowledge bases, Lj
and L2 are equivalent if for all formula: $:
The expansion of the function LF, appearing in the right-hand side of the theorem implication, has
VSE LI,TE J[$] 5 viffVSE L2,TE J[$]5v.
the following form:
We define the following semantic knowledge base:
LF(BL s, BF s)
= let n = (Pd n (c)
U [Ui=2....,~((Pn) n (r n))) in
(SISE BLsl\ VXI En, VX2E (f),(VsE BFs,TE J[ X2:JXI] s)
=> (;+[ XI ] S ;+[ X2 ]
1\ ; - [
Lo = ( SIS E
LL 1\ T E J[ $ ] 5 v
1\
$ E BL a )
X2 ]s ;-[ XI ] ) ),
We have the following cases according to the form of the formula $:
By definition Pet> S (f), this means that if there is a situation S E t., such that T eo J[ $ ] 5 ". it
must be the case that this situation also belongs to LF(BLs, BF s). i.e.:
If 3 S E Ls, T eo J[ $ ] 5 v then 3 S E LF(BL s, BF s), T eo J[ $ ] 5 v, and this implies that:
».
(i) $ does not contain the predicate p - In this case the contents of the syntactic knowledge base NLa
are irrelevant and we have trivially that:
VS E Lo. T E J[ $ ] 5 v iff VS ELI. T E J[ $
I
5 v iff VS E L2, T E J[ «1l ] 5 v;
(ii) $ contains the predicate p - We have two subcases:
"' [ from-Iogic($) ] (Ls) => "' [ from-logicec) ] (LF(BLs, BF s
(ii.a) VS E
La, T E
J[ $("' peT)] ] 5 v - In this case we have trivially that:
This completes the proof of the theorem. I
VS E
Lo, T E
J[ $["' p(f)]
I
5 v iffVS ELI, TE J[ $["' peT)] ] 5 v iff
VS E L2, T E J[ $[' peT)] ] 5 v;
B.2. First-Order Logic and Semantic Networks
In this section, we prove the theorem 5.5. Analogously to the preceding section we introduce
some definitions and prove some technical lemmas and, finally, we prove the if and the only if parts
of theorem 5.5 in theorems B.3 and B.4.
(ii.b)
3 S E La, T eo
J[ $["' p(f)] ] 5 v - In this case we have by definition that:
v S E Lo, 3 It E n, T E J[ $[lt(T)] ] 5 v=> VS E Lj, T E J[ $["' peT)] ] 5 v, on the other
Definition B.3. Given E5, the set of class and hierarchy definitions already stored in the
hand we know that the semantic definition of a predicate is the following:
knowledge base BS, through the primitive Tell(BF. to-snel(E)). We define the corresponding
syntactic knowledge base BSa and semantic knowledge bases BSs as:
T E j [ P n (T I•..., Tn) ] 5 v iff V s E S. <t[ T I ] s v•..., t[ r, ] s v> E ;+[ P n ]
FE j[ Pn(TI •..., Tn)] 5viff VSE S, <cl TI] sv, ..., t[ Tn] sv> E ;-[ P n] and the
BFa = ( <I, ~canonical-fonn> I I := ~ E E5 )
semantic definition of the negation operator is the following:
BF s = ( sis
E
SS
1\
T
E
j[ I := ti ] s 1\ I := ~
E
E5]
•
T E j[ "' $ ] 5 v iff FE J[ $ ] 5 v
Lemma B.2. Let BL a and NLa be two syntactic first-order logic knowledge bases, p be a predicate
symbol, and I'I a set of predicate symbols. If we define the following syntactic knowledge base:
FE j[ "' $ ] 5 v iff T E J[ $ ] 5 v
NL a = ( $["' p(T)] I$[lt(T)] E BLa 1\ It E IT) and the following semantic knowledge bases:
L) = ( SIS E Li 1\ T E j[ $ ] 5 v 1\ $ E BLa U NL a )
L2 = ( SIS E LL I\T E j[ $ ] 5 v 1\ $ E BLa 1\
This means that, if for a given set of compatible logical structures S = <g). E, ;>, we have that:
(It E IT) => ( ;+[ It ] S ;-[ p ]
1\
;+[ P ]
S ;-[
It ] »).
( ;+[ It ]
S ;-[
p]
1\
;+[ P ]
S ;-[
It ] ) then
T E j[ It(T) ] 5 v=> T E J[ "' peT) ] 5 v and
F E J [ "' peT) ] 5 v => F E J [ It(T) ] 5 v.
Then L] == LZ.
_ 1,,1
164
PROOFS OF THE lNfERACIlON THEOREMS
APPENDIX B
PROOFS OF THE INTERACfION THEOREMS
APPENDIXB
The modification of the unification algorithm, in steps 4 and 5 of the algorithm. is equivalent to
Now. the semantics of the formula $[p(T)] is constructed using the semantic values of the
execute the T-ENTAILEMENT algorithm over a new syntactic knowledge base defined by the·
predicate p(T). and the double implication above ensures that:
following expression:
vS e
NL a = ( rtp(T)]I r[1t(T)] e BL a A V p e Pel>. V 1t e n, SUB-CLASS(H. 1t, p. Default) I U
( r[" p(T)] I r[1t(T)] e BL a A V p e Pel>, V 1te n. SUB-CLASS(H. 1t.p, Exception)
1..0, 3 1t e
Il, T e J[ $[1t(T)] ] S v ::=) V S e L2, T e J[ $[" p(T)] ] S v, completing
the prove of the equivalence of the two semantic knowledge bases. •
Theorem B.3. LS-QUESTION($. H, BL. BS) ::=)
I
from-logic($) ] (LS(BL. BS, H».
Using the soundness and completeness of the algorithm SUB-CLASS and the definition of the sets
Proof. The algorithm LS-QUESTION presented in section 5.2.2.2 is the following:
Sp and N p, we can rewrite the above expression as:
LS-QUESTION($. H. BL, BS) ==
NLa = ( r[p(T)]I r[1t(T)] e BL a A V p e PeI>,1t e Sp I U
1. Calculate $VNF using the algorithm NORMAL-FORM($, V).
I
( rt- p(T)] I r[1t(T)] e BLa A Vp e PeI>, V1t e Np I
2. Define Pel> as the set of all predicate symbols appearing in $.
3. For all symbols p
6-
Pel>
n Ik las calculate the set of symbols associated to subclasses of pin
The semantic knowledge base corresponding to the syntactic knowledge base La = BLa U NLa has the
hierarchy H, denoted Sp and the set of symbols associated to non subclasses of p. denoted Np.
4. Substitute each literal of the form ., P(XI, ..., xn) in $VNF. by PN(X I•...• xn) where PN is a new
following form:
predicate symbol not appearing anywhere.
5. Calculate T-ENTAILMENT( ( $'1 $' e BL), $VNF) but in step (2) of the algorithm:
t., = ( SIS e LL ATe J'[ $ ] S V A $ e BLa U NL a I
"For all ~i and for all Ilj calculate Sij. the set of ~l substitutions e such that Ilje s ~ie."
Using lemmas B.l and B.2 this expression can be transformed in:
Instead of using the normal unification algorithm for calculating e. use a modified algorithm that
accepts two predicate heads PI and P2 as non clashing whenever PI = P2 v PI e SP2 v P2 e SPI
v (PI
L, = ( SIS e LL AT e J'[ $ ] S V A $ e BLa A V p e Pel>,
(1te Sp)::=) (~+[ 1t I S ~+[ P ] A ~-[ P ] s ~-[ 1t]) A
= PN A P2 e Np) v (P2 = PN A PI e Np)
(1te Np) ::=) ( ~+[ x I ] S ~-[ X2 ] A ~+[ X2 ] S ~-[ x I ] ) I
6. Return the result ofT-ENTAILMENT.
The proof is similar to the proof of theorem 8.1. We begin with some definitions:
Let n
= (k IBS n (P IBL.where
(k IBS is the set of class symbols defined in the knowledge base BS,
and (P) BL is the set of predicate symbols defined into the knowledge base BL.
Let Pel> -= Predicates($) n (kIBS, i.e. the intersection of the set of predicate symbols appearing in the
formula <l> with the set of symbols representing defined frame entities in knowledge base BS.
From the soundness and correctness of the algorithm SUB-CLASS. stated in theorem 5.3. we know
Using the definition of the knowledge base BL s. the definitions of the sets Sp and Np. and
rearranging the terms, this expression can be written as:
Ls = (SISe BLsA V1t en.
Vp e Pel>,
(V s e BS s• T e J'[ H(1t --+ p) ] s) ::=) ( ~+[ 1t ] S ~+[ P ] A ~-[ P ]s ~-[ 1t I ) A
<V s e BS s, T e J'[ H(1t -1+ p) ] s) ::=) (~+[ 1t I S ~-[ P ] A ~+[ P ] S ~-[ 1t ]) I
that the sets Sp and Np, calculated in the step 3 of the algorithm. correspond to the following semantic
The function LS, appearing in the right-hand side of the theorem implication, presents the following
definitions:
definition:
Sp = ( 1t I Vs e BSs• V1t e n. Te J[ H(1t --+ p) ] s )
Np = ( n Vs e BS s• V1t e n, Te J'[ H(1t -1+ p) ] s )
LS(BL s• BS s, H) == let n = (Ui=I .....oo(Pn))
(SISe BLsA VXI en. VX2e (k),
(Vs e BS s, T e J'[ H(xi --+ X2) ]
(Vs e BS s• Te J'[ H(xl
- 165 -
n
(k) in
(~+[ XI ]
S
~+[ X2 ] A ~-[ X2 ]
-1+ X2)] s)::=) (~+[ XI ]
S
~-[ X2]
S)::=)
- 166
1\
S
~-[ XI ] ) A
~+[ X2] S ~-[ XI]) )
PROOFS OF THE INTERACTION THEOREMS
APPENDIXB
PROOFS OF THE INTERACllON THEOREMS
APPENDIX B
., [ from-logic(<I» ] (L s) ~ ., [ from-logic(<I» ] (LS(BLs, BS s, H».
By definition, Pet> S (k), and, because of the same arguments presented in theorem B.1, i.e. that we
need to consider only the semantic values of the predicates appearing in the formula <I> for verifying if
This completes the proof of the theorem. I
it is entailed by the knowledge base, we can conclude that:
B.3. Frames and Semantic Networks
In this section, we prove the theorem 5.6. The if and the only if parts of this theorem are proven
[ from-logic(<I» ] (L s) ~ [ from-logic(<I» ] (LS(BLs, BS s, H».
in the theorems B.5 and B.6.
This completes the proof of the theorem. I
Theorem B.S.
FS-QUESTION(C2::J C" H, BFa, BS a) ~ [ from-frametflj > C,)
Theorem B.4. ., LS-QUESTION(<I>, H, BL, BS) ~ ., [ from-logic(<I» ] (LS(BL, BS, H».
I
Proof. We refer to the algorithm LS-QUESTION showed in theorem B.3.
(FS(BF s, BS s, H».
Proof. The algorithm FS-QUESTION presented in section 5.2.2.3 is the following:
Analogously to the theorem B.3, we consider that the modification of the unification algorithm is
FS-QUESTION(E, ::J E2, H, BF, BS) '"
equivalent to the application of the algorithm T-ENTAILMENT, at the steps 4 and 5 of the algorithm,
1. Using the algorithms SUB-C and SUB-R construct a graph G where each node represent a concept
or relation ofBF, and where each arrow from n, to n2 means that n2 subsumes nj.
to an extended knowledge base, whose semantic form is the following:
2. Calculate the graph U = G U H.
L, = ( SIS E BLs 1\ 'V 1t E n, 'V p E Pet>,
E BS s, T
('V s E BS s, T
('V s
E
E
•
3. If E, and E2 are concepts then:
'J[ H(1t ~ p) ] S) ~ (~+[ 1t ] S ~+[ P ]
'J[ H(1t -1+ p) I s) ~ (~+[ 1t.] S ~-[ P ]
I
1\
~--:[ p
1\
~+[ P ]
S ~-[ 1t ] ) 1\
s
Let SUB-C-M be a modified SUB-C algorithm where, in the second line of the algorithm:
~-[ 1t] ) J
"if C, E <primitive-concept>
1\
C2 E <primitive-concept> then C, = C2 else",
instead of the equality test, C, = C2, the following test is used:
If" LS-QUESTION(<I>, H, BL, BS) = T then, considering the soundness and completeness of the
"c, = C2 v
[SUB-CLASS(U, C2, C" Default)
1\ .,
SUB-CLASS(U, C2, CI, Exception)]"
3.a. For all concepts C in the frame knowledge base BF:
algorithm T-ENTAILMENT established in theorem 5.1, it must be the case that:
If E, E (ku J 1\ SUB-C-M(E), C) then create a link from C to E, in graph U.
3S E
If E2 E (kuJ
L s, T E 'J[ <I> ] S v,
3.b. IfE, E [kjj ]
The expansion of the function LS, appearing in the right-hand side of the theorem implication, has
1\
1\
SUB-C-M(C, E2) then create a link from E2 to C in graph U.
E2 E [kjj ]
1\
SUB-C-M(E" E2) then create a link from E2 to E, in graph U.
4. If Eland E2 are relations then:
Let SUB-R-M be a modified SUB-R algorithm where, in the second line of the algorithm:
the following form:
"if R, E <primitive-relation> 1\ R2 E <primitive-relation> then RI = R2 else"
LS(BL s, BS s, H) '" let n = (Ui=I,...,oo(Pn))
(SISEBLsl\'Vxl En,'VX2E (k),
<V s E
n
instead of the equality test, R I = R2, the following test is used:
(kJ in
"R, = R2 v [SUB-CLASS(U, R2, RI, Default)
BSs,T E 'J[ H(x, ~ X2) ] S) ~ (~+[ XI ] S ~+[ X2 ]
1\
~-[ X2 ] S ~-[ XI ] ) 1\
s) ~ (~+[ XI I S ~-[ X2 ]
1\
~+[ X2
('V s E BS s, T E 'J[ H(x, -1+ X2)
I
I
S ~-[ XI I
) I
By definition Pet> S [k}, this means that if there is a situation S E L, such that T E 'J[ <I> ] S v, it
must be me case that this situation also belongs to LS(BLs, BS s, H), i.e.:
If
3S E
t; T E 'J[ <I> ] S v then
3S E
LS(BL s, BS s, In, T E 'J[ <I> ] S v, and this implies that:
1\ .,
SUB-CLASS(U, R2, RI, Exception)]"
4.a. For all relations R in the frame knowledge base BF:
If E, E [kjj]
1\
SUB-R-M(E" R) then create a link from R to E, in graph U.
If E2 E (kuJ
1\
SUB-R-M(R, E2) then create a link from E2 to R in graph U.
4.b. If E, E (ku J 1\ E2 E (ku J 1\ SUB-R-M(EI' E2) then create alink from E2 to E, in graph U.
5. Return SUB-CLASS(U, E2, EI, Default) 1\
.,
SUB-CLASS(U, E2, El' Exception).
In steps 1 and 2 of the algorithm, we calculate the graph U containing the links of the given hierarchy
H and one link for each subsumption relation of the knowledge base BF. The syntactic knowledge
r z ...
- i6f
PROOFS OF TIIE INTERACfION THEOREMS
APPENDlXB
APPENDIX B
PROOFS OF TIlE INfERACfION TIIEQREMS
base of the semantic network module containing a hierarchy U corresponding to this graph can be
Using the soundness and completeness of the algorithm SUB-CLASS. established in theorem 5.3.
written as:
we can rewrite this expressions as;
NSa = { <U. H $
{
UFa = { «Subsume, kj , kz> I Vk\. kz e (ku1Ns. V s e NSs•
T e ;:J[ U(kl -t kz) ]
Xz -t Xl 1> I SUB-X(x}, xz) 1
S 1\
Fe ;:J[ U(kl ~ kz) ]
S
1
Where X can be C or R depending on the nature of the entities Xi. From the soundness and
completeness of the algorithms SUB-C and SUB-R, established in theorem 5.2, we can rewrite this
The semantic knowledge base corresponding to this syntactic knowledge base. according to definition
expressions as:
B.I, is the following:
NS a = {<U.HGl{XZ-tXll>IVse BFs,Vx},ltze {f}BF.Te;:J[ Xl:JXZ] sl
UF s = { sis e FF 1\ T e ;:J[ ~ ] s 1\ ~ e NF a 1
In the above knowledge base all the subsurnption relations in knowledge base BF are explicitly
But we have that, ~ e NFa precisely when the condition:
represented as links in the hierarchy U, and besides of this we have also the original links of the given
hierarchy H.
We can now define a frame knowledge base where the subsumption relation corresponds exactly to
Vk], kZ e (kU1Ns, V s e NSs, T e ;:J[ U(kl -t kz) ]
can rewrite this knowledge base as:
S 1\
Fe ;:J[ U(kl ~ kz) ]
S
is valid. thus we
the inheritance relation defined by the hierarchy U. This knowledge base has the following
UF s = {sl se FFI\ Vklokze {ku1NS.
(Vs' e NSs• Te ;:J[ U(XI -t xz)] s'l\ Fe ;:J[ U(XI ~ xz)] s') ~ (Te ;:J[ xz:::J Xl] S) 1
expression:
NF s = { sIs e FF 1\ VXl, xz e (ku1NS,
(Vs'e NSs,Te;:J[ U(XI -txz)] s'I\Fe;:J[ U(Xl-/}XZ)] s')~ (Te;:J[ XZ:JXI] S) 1
And we can see that UFs c; NFs.
The frame situations in knowledge base NF define the subsumption relation we want our algorithm to
During the execution of steps 3.a or 4.a of the algorithm. the modified algorithms SUB-C-M and
calculate. The problem is that the entities in the current question, El and Ez, may consist of
SUB-R-M are used to calculate the subsumption relations between the entities EI and Ez and the other
descriptions of undefined entities. These undefined entities are not present in the hierarchy U, thus to
entities defined in the frame knowledge base BF. These subsumption relations are calculated only in
use the hierarchy U as the base for the calculation of the subsumption relation between Eland Ez, we
the case that the entities Eland Ez are concept or relation descriptions. because if E I and Ez were
must explicitly introduce the links corresponding to this entities into the hierarchy H, and also prove
defined or primitive entities of the knowledge base BF they. and their subsumption relations, would
that the introduction of these links does not change the semantic definition of knowledge base NFs.
be already present in hierarchy U. We have seen that the modified algorithms SUB-C-M and SUB-R
The modification introduced into the algorithms SUB-C and SUB-R to create the algorithms SUB-C
knowledge base containing the new subsumption relations has the following form:
M are equivalent to the original algorithms applied to the knowledge base NF. The syntactic
M and SUB-R-M. respectively in steps 3 and 4 of the algorithm, is equivalent to the execution of
these algorithms into a modified knowledge base, where the knowledge base UFa have been added.
This knowledge base corresponds to the subclass relation contained in hierarchy U. and it has the
EFa = { <Subsume. E}, E> I E\ ~ (ku1 1\ VE e (f}BF. SUB-X(E}, E) } U
( <Subsume. E. Ez> I Ez E [kjj 1 1\ VE e (f1BF. SUB-X(E. Ez) ).
following form:
Where X can be C or R depending on the nature of the entities Ei· By the soundness and
UF a =
{
<Subsume, kj, kz> I Vkl. kZ e Ikulxs.
SUB-CLASS(U. kz. kj , Default)
completeness of the algorithms SUB-C and SUB-R. and using the above arguments on the
1\ ~
SUB-CLASS(U. kz. kj , Exception) 1
equivalence of the modified algorithm and the original algorithm applied to the modified frame
knowledge base NF. we can rewrite this expressions as:
PROOFS OF THE INTERAcnON TIIEOREMS
APPENDIX B
EFa = ( <Subsume. EI. E> I "Is E BF s U NF s• "IE E (f)BF. TE J[ EI::J E] S) U
( <Subsume. E. E2> I "Is E BF s U NF s• "IE E (f)BF. T E J[ E::J E2] S)
APPENDIX B
NSs = ( sis
E
PROOFS OF THE INfERACfION TIIEOREMS
SS /\ T E J[ U := U $ H ]
S /\
(V S E NF s• V x I. X2 E (f) BF. T E J[ x I ::J X2 ] S)::::) (T E J[ U := U $ X2 ~ x I ] S) /\
(V s E NF s• VXI E (f)BF. X2 = E2/\ T E J[ XI ::J x2 ] S)::::) (T E J[ U := U $ X2 ~ XI ] S) /\
The semantic knowledge base corresponding to this syntactic knowledge base. according to definition
(VSE NFs ..VX2E (f)BF.XI=EI/\TE J[XI::JX2] S)::::)(TE J[ U:=U$X2~XJ ]S)/\
B.1. is the following:
(V s E NF s• x I = E I /\ X2 = E2 /\ T E J[ Xl ::J x2 ] S) ::::) (T E J [ U := U $
EF s = ( sis E FF /\ T E J[ L] s /\ L E EF a )
xz ~
x I ] S) )
We have proven above that the semantic frame knowledge base corresponding to the inheritance
relation defined by the hierarchy U corresponds to the knowledge base NF:
We know that Ej is an entity description. But an entity description is constructed from primitive
entities. and these primitive entities are by definition already in the hierarchy U. together with all their
subsumption relations. Given that the subsumption relation of a description can be constructed from
NFs=(sl sEFF/\VXI.X2 E (kU)NS.
(V s' E NS s• T E J[ U(XI ~ X2) ] s' /\ F E J[ U(X\ ~ X2) ] s)::::) (T E J[ x2::J XI ] S) )
the subsumption relations of its primitives entities. we conclude that all the frame situations
supporting or not the subsumption relation between Ej and the defined entities E are already present in
Now. the extension of the function FS. appearing in the right-hand side of the theorem implication,
the knowledge base NF. and we have also that EF
has the following form:
Ie
NF.
Finally. we calculate the subsumption relation between EI and E2 using the modified algorithm, this
- is equivalent to define the following knowledge base:
FS(BF. BS. H) ==
let BS' = ( s" S' E BS /\ VXI. X2 E {f},
(V s E BF.T E J[ X2::J XI ] S) ::::) (T E J[ H := H $ XI ~ X2] s») in
EF a ' = ( <Subsume. EI. E2> I "Is E BF s U NF s• T E J[ EI ::J E2 ] s )
(sl VXI.X2E (kH)BS'.
(V s' ENS, T E J[ H(xl ~ X2) ] s' /\ F E J[ H(xl ~ X2) ] S)::::) (T E J[ x2::J XI ] S) )
Using the same arguments rose to prove that the knowledge base EF is included in the knowledge
base NF. we can prove that this new knowledge base EF' is also included in the knowledge base NF.
We can verify by inspection that the definition of the knowledge base BS' in function FS is such that
the hierarchy H in knowledge base BS' corresponds to the original definition of the hierarchy lJ. As
In this way. during the modification of the hierarchy U we have only created explicit links
the modifications to the hierarchy lJ have not changed the frame knowledge base generated by its
representing subsumption relations already supported by the knowledge base NF.
inheritance relation. we conclude that the semantic knowledge base NF is equivalent to the knowledge
base defined by the functions FS. i.e.:
The final state of hierarchy lJ can be represented by the following expression:
[ from-frarnetlij a EI) ] (NF s) ::::) [ frorn-framerlij a EI) ] (FS(BFs• BS s,
H»
NS a = ( <lJ, H $ ( X2 ~ XI » I "Is E NF s• V XI. X2 E (f)BF. T E J[ XI ::J x2 ] s v
VXIE (f)BF,X2=E2/\TE J[XI::JX2] Sy
This concludes the proof of the theorem. I
VX2E (f)BF. XI =EI/\ TE J[ xl::J X2] Sy
XI = EI/\ x2 = E2/\ T E J[ XI ::J x2 ] S)
Theorem 8.6•
., FS-QlJESTION(C2::J Ct. H. BF. BS) ::::) ., [ frorn-frametf'j > CI) ] (FS(BF, BS,
The semantic knowledge base of a semantic network module containing this hierarchy can be write as:
Proof. We refer to the algorithm FS-QUESTION showed in theorem B.5.
If we have that
>
FS-QUESTION(C2::J CI, H, BF. BS) it must be the case that:
., [SUB-CLASS(lJ, E2. E!. Default) /\ ., SlJB-CLASS(lJ, E2. Ej , Exception)], i.e.:
- 17=.
H».
PROOFS OF.TIIE lNTERACflON THEOREMS
APPENDIXB
APPENDIX B
PROOFS OF TI-lEINTERACfION TIIEOREMS
Because the only subsumption relations defined by the function FS are those respecting the
.., SUB-CLASS(U, E2, E), Default) v SUB-CLASS(U, E2, EI, Exception)
condition:
Semantically this corresponds to the situation where:
(v s' eNS, T e
3se SS,Fe 'J[U(EI--+E2)]SvTe 'J[U(EI-#E2)]s
Thus we can conclude, by definition of the interaction function, that:
Considering the definition, presented in theorem B.5. of the knowledge base containing the hierarchy
U at step 5 of the algorithm:
NS s = ( sis e SS /\ T e 'J[ U := U El) H ] S/\
(V s e NF s, V xj , x2 e (f)BF, T e 'J[ xI::J x2 ] S)=::) (T e 'J[ U := U El) x2 --+ xI ] S) /\
(Vs e NF s• VXI e (f)BF, x2 =E2/\ Te 'J[ xI::J X2] S) =::) (Te 'J[ U:= U El) xz --+ Xl] S)/\
(V s e NFs, V x2 e (f) BF, XI = EI /\ T e 'J[ XI ::J x2 ] S) =::) (T e 'J[ U := U El) x2 --+ XI ] S)/\
(V s e NF s, xj = EI /\ x2 = E2 /\ T e 'J[ xl ::J x2 ] S) ==> (T e 'J[ U := U El) x2 --+ xl ] S) I
We can conclude that:
(3 s e NFs,F e 'J[ EI::J E2] S)v (3 s' e NS s, T e 'J[ H(EI -h E2) ] s)
But the expansion of the function FS appearing in the right-hand side of the theorem is the following:
FS : BF x BS x H --+ BF
FS(BF, BS, H) '"
let NS = (s'l s' e BS /\ VXI, X2e (f),
(Vse BF,Te 'J[ X2::JXI] S)=::)(Te 'J[ H:=HEl)xI--+X2] s)l in
{sl se FF/\VXI,X2e {kHINs,
(V s' eNS, T e 'J[ H(xl --+ X2) ] s' /\ F e 'J[ H(XI -# X2) ] S) =::) (T e 'J[ X2::J Xl ] S) I
(i) We have proved in theorem B.5 that the knowledge base NF s is equivalent to the knowledge base
FS(BFs, BS s, H), thus if 3 s e NFs, F e 'J[ EI ::J E2 ] s then:
3 s e FS(BFs, BSs, H), F e 'J[ EI ::J E2 ] s
(ii) Exceptions can be introduced only through the hierarchy H. If we have that:
3 s' E NS s, T e 'J[ H(EI -# E2) ] s·, the introduction of positive links, corresponding to the
subsumption relations of knowledge base BF. in the hierarchy H of the function FS does not
invalidate the exceptions.
'J[ H(xl --+ X2) ] s' /\ F e 'J[ H(XI -h X2) ] S)
(3 s' e NS s, T e 'J[ H(EI -# E2) ] s') =::) (3 s e FS(BFs, BS s, H), F e 'J[ EI::J E2 ] S)
As in both case we have that 3 s e FS(BFs, BSs, H), F e 'J[ EI::J E2 ] s, we conclude that:
.., [ from-frametfij a EI) ] (NF s) =::) .., [ frorn-frametfij > EI) ] (FS(BFs, BS s, H»
This concludes the proof of the theorem. I
THE SYNTAX OF TI-lE LANGUAGE
APPENDIX C
Appendix C. The Syntax of the Language
-csnet-detinitlon> ::=
I
Define-class(<identifier>. <class»
Define-hierarchy«identifier>. <hierarchy»
In this appendix, we present the complete syntax of the MANTRA knowledge representation
<identifier> :k= <class> 1
language. This syntax correspond to the syntax specification used as input to the compiler constructor
<identifier> :h= <hierarchy>
system Kyacc Klex. Instead of presenting directly the input files for the Kyacc Klex system we
present a more readable syntax in BNF format. This is due to the fact that the input for the Kyacc
<query> ::=
Klex system is separate into lexical and syntactical specifications making it less readable than a
<ask-definition> ::=
Ask«identifier>. <ask-definition»
<epistemologic-entity>
from-Iogic( <logic-question»
classical syntax presentation.
from -frame( drame-quest ion»
The syntax is presented in the form of a linear grammar using the following metanotation:
I
• Nonterminals are represented surrounded by the symbols "<" and ">".
from-snet( <snet-question»
• Definitions are denoted by the symbol "::=".
from-Iogic-frame( <logic-question»
• Alternative definitions for a nonterrninal are separated by the symbol "I".
from-Iogic-snet( <hierarchy>. <logic-question»
from-frame-snet( <hierarchy>. drame-question»
C.l. User Interface Syntax
<epistemologic-entity> ::= constant
function
C. t. t. Logical Level
<program> ::=
<command> ::=
predicate
<command>
pri-concept
1
<program> <command>
def-concept
I
I
I
I
<declaration>
<statement>
<query>
pri-relation
I
def-relation
I
pri-class
<declaration> ::= Decl-kbase(<identifier>. ...• <identifier»
Decl-constant(<identifier> ..... <identifier»
Decl-function( <identifier>. ...• <identifier»
Decl-predicate(<identifier>. ...• <identifier»
Decl-concept(<identifier> •...• <identifier»
Decl-relationj-ddentitier»
Decl-class(<identifier>
<identifier»
def-c1ass
I
I
I
I
I
::=
<logic-definition> ::=
to-logic(<Iogic-definition»
<logic-question> ::=
Describe-formula(<Iogic-entity>. dormula»
<logic-entity> ::=
constant
I
I
predicate
I
Dsscribe-relatioru-ctrame-entlty>, <relation»
to-frame(drame-definition»
Subsuming-concepts«concepl»
to-snett-csnet-definition»
Subsumed-concepts«concept»
Subsuming-relations«relation»
<formula>
<frame-definition> ::= Detlne-conceptt-cidentifler», <concept»
Deflne-relationt-ddentifieo-, <relation»
<identifier> :c= <concept>
<identifier> :r= <relation>
I
·1
-eforrnula»
<frame-question> ::= Descrjbe-conceptt-ctrarne-entity», <concept»
Tell«identifier>, <tell-definition»
<tell-definition> ::=
pri-hierarchy
def-hierarchy
function
, <identifier»
Decl- hierarchy(<identifier>. ...• <identifier»
<statement>
I
I
I
I
Subsumed-relations(<relation»
I
I
I
I
Subsume-concepti<concept>. <concept»
Equal-concept«concept>. <concept»
I
Subsume-relation( <relation>, <relation»
Equal-relation( <relation>. <relation>
<concept> > <concept>
I
I
I
I
I
TI-IE SYNiAX OF THE LANGUAGE
<concept> c <concept>
<concept> = <concept>
<relation> »
APPENDIXC
I
I
C.1.3. Frame Module
<concept> ::= Not«concept»
delation>
or-concepuecorcepts •...• «concepts
<relation> cc delation>
<relation>
<frame-entity> ::= pri-concept
def-concept
pri-relation
==
I
And-conceptteconcepts •...• «concepts
delation>
AII«relation>. <concept> •...• «concepts
I
I
I
Some(delation>. <concept> •...• <concept»
«concept»
- <concept>
def-relation
I
I
<concept> I <concept>
-esnet-questlons ::= Describe-class(«snet-anntys , <class»
Describe-hierarchyt-csnet-antttys , <hierarchy»
Sub-classt-ehlerarchy», <identifier>. <identifier»
<concept> & <concept>
I
* I
I
Not-sub-classt-ehlerarchy», <Identifier>. <identifier»
--->
-ehlerarchys] <identifier>
<identifier»
-ehlerarchyst-cldentltler» -1-> <identifier»
-esnet-entitys ::=
TIlE SYNTAX OF TIlE LANGUAGE
APPENDIX C
pri-class
- I
<identifier>
IV -erasmcnon»
IE <restriction>
<relation> ::= Not(delation»
I
def-class
Or-relatlont-eretatlons •...• delation»
pri-hierarchy
And-relation( <relation>. ...• delation»
def-hierarchy
Restriction(delation>. <concept> •...• «concept»
I
(<relation»
C.l.2. Assertional module
- <relation>
I
<formula> ::= Existt-ddentitler», <formula»
I
Foralh-cidemitler», <formula»
Ort-eforrnula»•...• <formula»
I
And(<formula> •...• <formula»
Not(<formula»
I
<,>
I
<restriction>
IV <identifier> <formula>
I
C.l.4. Semantic Net Module
I
I
<class> ::= <identifier>
<identifier> «term> •...• <term»
- <formula>
<term> "= <identifier>
I
<restriction> ::= <relation> : [<concept> •...• «concepts
!E <identifier> <formula> I
<formula> & <formula>
delation> && <relation>
c*>
<identifier>
(<formula»
<formula> I <formula>
I
-erelatlon» II delation>
Ctass-unlorueclass»•...• <class»
<class> + .. , + <class>
I
<hierarchy> ::= Ooncept-hlerarchyt-cldentlfler>
Relation-hierarchy«identifier»
<identifier> «term> •...• <term»
<identifier>
I
I
I
Default«identifier>. <identifier»
Exception«identifier>. <identifier»
Hlerarchy-unlont-chlerarchy» •...• <hierarchp)
- 177-
- 178
THE SYNTAX OFTHE LANGUAGE
APPENDlXC
THE SYNTAX OFTHE LANGUAGE
APPENDIX C
<identifier> ---> <identifier>
pri-relation
<identifier> -1-> <identifier>
def-relation
<hierarchy> ++ ... ++ <hierarchy>
pri-class
del-class
C.2. Programming Syntax
pri-hierarchy
C.2.I. Logical Level
<program> ::=
def-hierarchy
<declaration>
<logic-question> ..
<statement> I
<formula>
<logic-entity> ::=
<query>
<declaration> ::= (Deel-kbase <identifier> ... <identifier»
I
I
I
(Decl-constant <identifier> ... <identifier»
(Deel-function <identifier> .., <identifier»
(Decl-concept <identifier>
<identifier»
(Decl-relation <identifier>
<identifier»
I
function I
constant
predicate
<frame-question> ::= (Describe-concept <frame-entity> <concept»
I
(Decl-predicate <identifier> ... <identifier»
<statement> ::=
(Describe-formula <logic-entity> <formula»
(Describe-relation <frame-entity> delation»
I
I
I
I
(Decl-class <identifier> ... <identifier»
(Subsuming-relations <relation»
(Decl-hierarchy <identifier> ... <identifier»
(Subsumed-relations delation»
(Tell <identifier> <tell-definition»
(Subsume-concept <concept> <concept»
I
(Equal-concept <concept> <concept»
<lell-definition> ::=
(to-logic <logic-definition»
I
(Equal-relation <relation> <relation»
<frame-entity> ::= prl-concept
(to-suet <snet-definition»
<formula>
pri-relation
def-relation
(Define-relation <identifier> <relation»
(Define-class <identifier> <class»
I
-esnet-question» ::= (Describe-class -esnet-entlty» <hierarchy»
(Define-hierarchy <identifier> <hierarchy»
<query> ::=
(Describe-hierarchy -csnet-entity» <hierarchy»
(Ask <identifier> <ask-definition»
<ask-definition> ::=
I
def-concept
<fraine-definition> ::= (Define-concept <identifier> <concept»
«sner-deuntuore- ::=
(Sub-class <hierarchy> <identifier> <identifier»
I
(from-logic <logic-question»
(from-frame <frame-question»
(from-snet -esnet-questlon»
I
(Not-sub-class <hierarchy> <identifier> <identifier»
<snet-entity> ::=
pri-class
def-class
I
(from-logic-frame <logic-question»
pri-hierarchy
(from-Iogic-snet <hierarchy> <logic-question»
def-hierarchy
(from-frame-snet <hierarchy> <frame-question»
C.2.2. Assertional module
constant
function
predicate
I
I
dormula> ::= (Exist <identifier> dormula»
I
I
(Subsume-relation <relation> delation»
(to-frame <frame-definition»
<logic-definition> ::=
I
I
(Subsuming-concepts <concept»
(Subsumed-concepts <concept»
I
I
(Foral! <identifier> <formula»
prl-concspt
(Or <formula>
def-concept
(And -ctorrnulas
<formula»
I
<formula»
180
TIlE SYNTAX OF THE LANGUAGE
«identifier> <term> ... <term»
(Not <formula»
<term> ::= <identifier>
I
«identifier> <term> ... <term»
C.2.3. Frame Module
<concept> ::= (Not <concept»
I
I
(Or-concept <concept> ... <concept»
(And-concept -econcepts .., «concepts
TI
I
NIL
<identifier>
(All <relation> -cconcepts '" «concept (Some <relation> -econcepts ... -econcept
<relation>
I
::= (Not <relation»
I
I
(Or-relation <relation> ..: <relation»
(And-relation <relation> ... <relation»
(T)
I
(NIL)
<identifier>
(Restriction <relation> <concept> ... econcepts)
C.2A. Semantic Net Module
<class> ::= <identifier>
(Class-union <class> ... <class»
<hierarchy>
::= (Subsumption-hierarchy <identifier»
<identifier>
I
(Default <identifier> <identifier»
I
(Exception <identifier> <identifier»
(Hierarchy-union. <hierarchy> ... <hierarchy»
APPENDIXC
APPENDIXD
Appendix D. Examples of the System Operation
In this appendix, we present some examples of the useof the system MANTRA. The symbol <>
is the prompt of the operational system and the symbol> is the prompt of the KCL system. The
hybrid knowledge representation system is called with the command mantra. All user inputs are
presented in bold face characters.
D.l. Basic Operation
We use the examples presented in chapter 4 as our basic example for presenting the features of
the system. The following file, called kb.O, contains the definitions of a knowledge base
corresponding to the examples of the chapter 4. It contains information to be stored in all three
EXAMPLES OF 1HE SYSTEM OPERATION
>(hV b)
MANTRA - Version 3.0
Action: help
Valid options:
v(erbose) - seVreset the verbose flag
i(nput) - input a command
pi - show the input buffer
s(tore) - store the input buffer
is(tore) - input and store directly
d(k) -clear the contents of a knowledge base
pk - show a knowledge base
I(isp) - execute a LISP command
h(elp) - print this list of options
q(uit) - quit the interface
epistemological modules. This file is used in several examples of this appendix.
Decl-kbase(k)
;; Assertional module
Tell(k, to-Iogic(robin(twee tV)))
Tell(k ,to-log ic(size (tweetv ,small)))
Tell (k, to -log ic( circus -elephant(cIVde)))
Tell(k, to-log ic(size( clyde ,big)))
;; Frame module
Tell(k,to-frame(blood :r2 body-part : [liquid) && body-part : [red)))
Tell(k,to-frame(mammal:c=animal & IV blood : [warm) & IV reproduction : [viviparous)))
Tell(k,to-frame(bird:c=animal & IV blood : [warm) & IV reproduction : [oviparous)))
Tell(k,to-frame(elephant:c= mammal & IV food: [plant) & IE organ: [trunk)))
Tell(k,to-frame(robin:c= bird & IV size : [small) & IE organ : [wing)))
Telltk.to-framefcarnivore.c-antmal & IV food : [animal)))
Tell(k,to-frame(herbivore:c=animal & IV food : [plant)))
Action : verbose
Action : Istore
Input file: kb.O
Input expression:
••• Command of type DECLARATION for KBASE:
(K)
Input expression:
Each input expression consists:
••• Command of type STATEMENT for K:
• Definition in module LOGIC of a ASSERTION:
[CONSTANTS :TWEETY]
[PREDICATES: (ROBIN. 1))
ROBIN(TWEETY)
The type of the statement.
The current module and enti ty.
Declaring TWEETY as a constant...
Declaring ROBIN as a predicate...
;; Semantic net module
Input expression:
Tell(k,to-snet(circus-elephant :k= normal-elephant + flying-elephant))
Tell(k,to-snet(color:h= elephant --> gray ++ royal-elephant -l-» gray))
Tell(k,to-snet(circus:h= african-elephant --> elephant ++ royal-elephant --> elephant ++
circus-elephant --> royal-elephant))
••• Command of type STATEMENT for K:
• Definition in module LOGIC of a ASSERTION:
[CONSTANTS: SMALL,TWEETY]
[PREDICATES: (SIZE. 2))
SIZE(TWEETY. SMALL:)
In this first example, we present the interactive interface of the system. The file kb.O is read in
and the interface is used to verify the contents of the knowledge base.
Declaring SMALL as a constant...
Declaring SIZE as a predicate...
Input expression:
<>mantra
Hybrid Knowledge Representation System - 20 April 1989
Running under KCI (Kyoto Common Lisp) - 3 June 1987
Using CommonORBIT - 13 January 1988
To begin a section type (mantra).
••• Command of type STATEMENT for K:
• Definition in module LOGIC of a ASSERTION:
[CONSTANTS : CLYDE]
[PREDICATES: (CIRCUS-ELEPHANT. 1)]
CIRCUS-ELEPHANT(CLYDE)
Declaring CLYDE as a constant...
Declaring CIRCUS-ELEPHANT as a predicate...
The definition of the entity.
EXAMPLES OF TI-iE SYSTEM OPERA nON
APPENDIXD
APPENDIX D
EXAMPLES OF TIlE SYSTEM OPERATION
Input expression:
••• Command of type STATEMENT for K:
• Definition in module LOGIC of a ASSERTION:
[CONSTANTS: BIG. CLYDE)
[PREDICATES: (SIZE. 2»)
SIZE(CLYDE, BIG)
Defining concept ELEPHANT ...
Declaring PLANT as a primitive concept...
Declaring TRUNK as a primitive concept...
Declaring FOOD as a primitive relation ..
Declaring ORGAN as a primitive relation ..
Input expression:
Declaring BIG as a constant...
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a RELATION:
[ORIGINAL-CONCEPTS: RED, LIQUID)
[ORIGINAL-RELATIONS: BODY-PART)
DEFINE-RELATlON(BLooD, AND-RELATION(RESTRICTlON(BODY-PART, LIQUID),
RESTRICTlON(BODY-PART. RED»)
Defining relation BLOOD ...
Declaring LIQUID as a primitive concept...
Declaring RED as a primitive concept. ..
Declaring BODY-PART as a primitive relation ...
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a CONCEPT:
[ORIGINAL-CONCEPTS: VIVIPAROUS, WARM, ANIMAL)
[ORIGINAL-RELATIONS: REPRODUCTION,BLOOD)
DEFINE-CONCEPT(MAMMAL, AND-CONCEPT(AND-CONCEPT(ANIMAL,
ALL(BLOOD, WARM», ALL(REPRODUCTlON, VIVIPAROUS»)
••• Command of type STATEMENT for K:
• Definition in module FRAME of a CONCEPT:
[ORIGINAL-CONCEPTS: WING, SMALL, BIRD)
[ORIGINAL-RELATIONS: ORGAN, SIZE)
DEFINE-CONCEPT(ROBIN, ANO-CONCEPT(AND-CONCEPT(BIRD, ALL(SIZE, SMALL»,
SOME(ORGAN, WING»)
Defining concept ROBIN...
Declaring SMALL as a primitive concept...
Declaring WING as a primitive concept...
Declaring SIZE as a primitive relation ...
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a CONCEPT:
[ORIGINAL-CONCEPTS: ANIMAL)
[ORIGINAL-RELATIONS: FOOD)
DEFINE-CONCEPT(CARNIVORE, AND-CONCEPT(ANIMAL, ALL(FOOD, ANIMAL)))
Defining concept CARNIVORE...
Input expression:
Defining concept MAMMAL. ..
Declaring ANIMAL as a primitive concept...
Declaring WARM as a primitive concept...
Declaring VIVIPAROUS as a primitive concept...
Declaring REPRODUCTION as a primitive relation ...
••• Command of type STATEMENT for K:
• Definition in module FRAME of a CONCEPT:
[ORIGINAL-CONCEPTS; PLANT, ANIMAL)
[ORIGINAL-RELATIONS: FOOD)
DEFINE·CONCEPT(HERBIVORE, AND-CONCEPT(ANIMAL, ALL(FooD, PLANT»)
Input expression:
Defining concept HERBIVORE...
••• Command of type STATEMENT for K:
• Definilion in module FRAME of a CONCEPT:
[ORIGINAL-CONCEPTS: OVIPAROUS, WARM, ANIMAL)
[ORIGINAL-RELATIONS: REPRODUCTION, BLOOD)
DEFINE-CONCEPT(BIRD, AND-CONCEPT(AND-CONCEPT(ANIMAL, ALL(BLooD, WARM».
ALL(REPRODUCTlON, OVIPAROUS)))
Input expression:
Defining concept BIRD...
Declaring OVIPAROUS as a primitive concept...
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a CONCEPT:
[ORIGINAL-CONCEPTS: TRUNK, PLANT, MAMMAL)
{ORIGINAL-RELATIONS: ORGAN, FOOD)
DEFINE-CONCEPT(ELEPHANT, AND-CONCEPT(AND-CONCEPT(MAMMAL,
ALL(FOOD, PLANT», SOME(ORGAN, TRUNK»)
- 185
••• Command of type STATEMENT for K:
• Definition in module SNET of a CLASS:
[ORIGINAL-CLASSES : FLYING-ELEPHANT, NORMAL-ELEPHANT)
DEFINE-CLASS(CIRCUS-ELEPHANT, CLASS-UNION(NORMAL-ELEPHANT , FLYING-ELEPHANT))
Primitive class FLYING-ELEPHANT used inside a class definition .
Primitive class NORMAL-ELEPHANT used inside a class definition .
Defining class CIRCUS-ELEPHANT...
.
Class CIRCUS-EI.EPHANT depends on the primitive classes: (NORMAL-ELEPHANT
FLYING-ELEPHANT)
Declaring NORMAL-ELEPHANT as a primitive class .
Declaring FLYING-ELEPHANT as a primitive class .
Input expression:
••• Command of type STATEMENT for K:
- 186
EXAMPLES OF THE SYSTEM OPERA nON
APPENDIXD
• Definition in module SNET of a HIERARCHY:
[ORIGINAL-CLASSES: ROYAL-ELEPHANT, GRAY, ELEPHANT]
DEFINE-HIERARCHY(COLOR, HIERARCHY-UNION(DEFAULT(ELEPHANT, GRAY),
EXCEPTION(ROYAL-ELEPHANT, GRAY)))
Defining hierarchy COLOR._.
Declaring GRAY as a primitive class...
Declaring ROYAL-ELEPHANT as a primitive class...
Declaring ELEPHANT as a primitive class...
Input expression:
... Command of type STATEMENT for K:
• Definition in module SNET of a HIERARCHY:
[ORIGINAL-CLASSES: CIRCUS-ELEPHANT, ROYAL-ELEPHANT,ELEPHANT,AFRICAN-ELEPHANT]
DEFINE-HIERARCHY(CIRCUS,
HIERARCHY-UNION(DEFAULT(AFRICAN-ELEPHANT. ELEPHANT),
DEFAULT(ROYAL-ELEPHANT,ELEPHANT),
DEFAULT(CIRCUS-ELEPHANT, ROYAL-ELEPHANT)))
Defining hierarchy CIRCUS ...
Declaring AFRICAN-EL:EPHANT as a primitive class ...
Action: pk
Knowledge base: k
Knowledge Base K
APPENDIX D
EXAMPLES OFTIIE SYSTEM OPERATION
f(act) - list of facts
ctonstarn) - list of constants
fu(ntion) - list of functions
pr(edicate) - list of predicates
al(l) - lists of all entities of the base
gIrl - show the graph of dependencies
h(elp) - print this list of options
q(uit) - quit the interface
Logic Option : all
Constants: BIG, CLYDE, SMALL, TWEETY
Functions:
Predicates: (CIRCUS-ELEPHANT _ 1), (SIZE. 2), (ROBIN. 1)
Logic Option : fact
There are 4 facts, choose one ...
Number? all
ract #:FACT-830 contains:
[CONSTANTS: BIG, CLYDEI
[PREDICATES: (SIZE. 2))
SIZE(CL YDE, BIG)
Fact #:FACT-829 contains:
[CONSTANTS: CLYDEJ
[PREDICATES: (CIRCUS-ELEPHANT. 1»)
CIRCUS-ELEPHANT(CLYDE)
Fact #:FACT-828 contains:
[CONSTANTS: SMALL, TWEETY]
[PREDICATES: (SIZE. 2))
SIZE(TWEETY. SMALL)
Kbase Option : help
Valid options:
c(onstant) . list of constants
fu(ntion) • list of functions
pr(edicate) - list of predicates
co(ncept) - list of concepts
re(lation) - list of relations
cl(ass) - list of classes
hi(erarchy) - list of hierarchies
al(l) - lists of all entities of the base
I(ogic) - show the logical situation
f(rame) - show the Irame situation
s(emantic) - show the semantic net situation
h(elp) - print this list 01-options
q(uit) -. quit the interlace
Fact #:FACT·827 contains:
[CONSTANTS: TWEETY]
[PREDICATES: (ROBIN. 1))
ROBIN(TWEETY)
Logic Option: graph
graph : #:GRAPH-824
node: BIG
1---1>
node: #:FACT-830
node : CIRCUS-ELEPHANT
Kbase Option : all
Constants: BIG, CLYDE, SMALL, TWEETY
Functions:
Predicates: (CIRCUS-ELEPHANT. 1), (SIZE. 2), (ROBIN. 1)
Concepts: HERBIVORE,CARNIVORE, ROBIN, ELEPHANT,BIRD, MAMMAL, WING, SMALL,
TRUNK, PLANT, OVIPAROUS, VIVIPAROUS, WARM, ANIMAL, RED, LIQUID
Relations: BLOOD,SIZE, ORGAN, FOOD, REPRODUCTION, BODY-PART
.
Classes: CIRCUS-ELEPHANT, AFRICAN-ELEPHANT, ELEPHANT, ROYAL-ELEPHANT, GRAY,
FLYING-ELEPHANT, NORMAL-ELEPHANT
Hierarchies: CIRCUS, COLOR
Kbase Option : logic
Logical Situation 01 Knowledge Base K
Logic Option : help
Valid options :
- 187
1---1> node : #:FACT-829
node:CLYDE
1---1> node : #:FACT·830
/---1> node : #:FACT -829
node : SIZE
1---1> node : #:FACT-830
1---1> node : #:FACT-828
node : SMALL
\---1> node. : #:FACT -828
node : ROBIN
1---1> node #:FACT-827
node: TWEETY
1---1> node : #:FACT-828
'---I> node : #:FACT-827
Logic Option: quit
Kbase Option: frame
- 188
EXAMPLES OF run SYSTEM OPERAnON
APPENDIXD
Frame Situation of Knowledge Base K
APPENDIXD
1---1>
EXAMPLES OF mE SYSTEM OPERATION
node : ELEPHANT
node : F(X)[)
Frame Option: help
Valid options :
co(ncepl) - list of defined concepts
pc. - list of primitive concepts
re(lation) - list of defined relations
pr - list of primitive relations
al(l) - lists of all entities of the base
girl - show the graph of dependencies
sd - show the definition of an entity
h(elp) - print this list of options
q(uit) - quit the interface
Frame Option : all
Defined Concepts: HERBIVORE, CARNIVORE, ROBIN, ELEPHANT, BIRD, MAMMAL
Primitive Concepts: WING, SMALL, TRUNK, PLANT, OVIPAROUS, VIVIPAROUS,
WARM, ANIMAL, RED, LIQUID
Defined Relations: BLOOD
Primitive Relations: SIZE, ORGAN, FOOD, REPRODUCTION, BODY-PART
Frame Option : sd
Enter entity name : robin
[ORIGINAL-CONCEPTS: WING, SMALL, BIRD]
. [ORIGINAL-RELATIONS: ORGAN, SIZE]
[DEF-CONCEPTS : BIRD]
[PRI-CONCEPTS : SMALL, WING, ANIMAL, WARM, OVIPAROUS, LIQUID, RED]
[PRI-RELATIONS : SIZE, ORGAN, REPRODUCTION, BODY-PART]
DEFINE-CONCEPT(ROBIN,
AND-CONCEPT(BIRD, ALL(SIZE, SMALL), SOME(ORGAN, WING))) ==>
AND-CONCEPT(ANIMAL, ALL(RESTRICTION(AND-RELATION(BODY-PART),
AND-CONCEPT(RED, LIQUID)), WARM), ALL(REPRODUCTION, OVIPAROUS).
ALL(SIZE, SMALL), SOME(ORGAN, WING))
Frame Option : sd
Enter entity name : blood
[ORIGINAL-CONCEPTS: RED, LIQUID]
[ORIGINAL-RELATIONS: BODY-PART]
[PRI-CONCEPTS : LIQUID, RED]
[PRI-RELATIONS : BODY-PART]
DEFINE-RELATION(BLOOD,
RESTRICTION(AND-RELATION(BODY-PART), AND-CONCEPT(RED, LIQUID))) ==>
RESTRICTION(AND-RELATION(BODY-PART), AND-CONCEPT(RED, LIQUID))
Frame Option: graph
graph : #:GRAPH-825
node : SIZE
1---1> node : ROBIN
node : HERBIVORE
node :CARNIVORE
node:WING
1---1> node : ROBIN
node : SMALL
1---1> node : ROBIN
node:ORGAN
1---1> node : ROBIN
1---1> node: HERBIVORE
1---1> node: CARNIVORE
1---1> node : ELEPHANT
node : TRUNK
1---1> node :. ELEPHANT
node : PLANT
1---1> node: HERBIVORE
1---1> node: ELEPHANT
node : OVIPAROUS
1---1> node : ROBIN
1---1> node : BIRD
'---I> node : ROBIN
node:REPRODUCTlON
1---1> node : ROBIN
1---1> node: ELEPHANT
1---1> node : BIRD
1---1> node : MAMMAL
1---1> node : ELEPHANT
node: VIVIPAROUS
1---1> node : ELEPHANT
1---1> node : MAMMAL
node:WARM
1---1> node : ROBIN
1---1> node : ELEPHANT
1---1> node : BIRD
1---(> node : MAMMAL
node : ANIMAL
1---1> node: HERBIVORE
1---1> node: CARNIVORE
1---1> node : ROBIN
[:--1> node : ELEPHANT
1---1> node : BIRD
\---1> node ; MAMMAL
node : BODY-PART
1---1> node : ROBIN
1---1> node : ELE~HANT .
1---1> node : BIRD
1---1> node : MAMMAL
1---1> node: BLOOD
1---1> node : BIRD
1---1> node : MAMMAL
node: RED
1---1> node : ROBIN
/---1> node: ELEPHANT
1---1> node : BIRD
1---/> node : MAMMAL
1---1> node : BLOOD
node : LIQUID
1---1> node : ROBIN
1---1> node : ELEPHANT
/---/> node : BIRD
1---1> node : MAMMAL
1---1> node: BLOOD
Frame Option: quit
Kbase Option : snet
Semantic Net Situation of Knowledge Base K
- 190
EXAMPLES OF THE SYSTEM OPERATION
APPENDIXD
APPENDIXD
EXAMPLES OF THE SYSTEM OPERAnON
Snet Option: help
Valid options:
Snet Option: graph
cl(ass) - list of defined classes
pc - list of primitive classes
hi(erarchy) - list of defined hierarchies
ph - list of primitive hierarchies
al(l) - lists of all entities of the base
g(r) - show the graph of dependencies
sd - show the definition of an entity
h(elp) - print this list of options
q(uit) - quit the interface
===~===============
graph : #:GRAPH-826
Snet Option : all
Defined Classes: CIRCUS-ELEPHANT
Primitive Classes: AFRICAN-ELEPHANT, ELEPHANT, ROYAL-ELEPHANT. GRAY,
FLYING-ELEPHANT, NORMAL-ELEPHANT
Defined Hierarchies: CIRCUS. COLOR
Primitive Hierarchies :
Snet Option: sd
Enter entity name : circus-elephant
[ORIGINAL-CLASSES : FLYING-ELEPHANT. NORMAL-ELEPHANT]
[PRI-CLASSES : NORMAL-ELEPHANT. FLYING-ELEPHANT]
DEFINE-CLASS(CIRCUS-ELEPHANT.
CLASS-UNION(FLYING-ELEPHANT, NORMAL-ELEPHANT)) ==>
. CLASS-UNION(FLYING-ELEPHANT. NORMAL-ELEPHANT)
Snet Option: sd
Enter entity name: circus
[ORIGINAL-CLASSES: CIRCUS-ELEPHANT, ROYAL-ELEPHANT. ELEPHANT, AFRICAN-ELEPHANT]
[PRI-CLASSES : ELEPHANT, AFRICAN-ELEPHANT. ROYAL-ELEPHANT, NORMAL-ELEPHANT,
FLYING-ELEPHANT]
[DEF-CLASSES : CIRCUS-ELEPHANT]
DEFINE-HIERARCHY(CIRCUS. HIERARCHY-UNION(HIERARCHY-UNIONO,
DEFAULT(CIRCUS-ELEPHANT, ROYAL-ELEPHANT).
DEFAULT(ROYAL-ELEPHANT, ELEPHANT).
DEFAULT(AFRICAN-ELEPHANT. ELEPHANT))) ==>
HIERARCHY-UNION(HIERARCHY-UNION(). DEFAULT(CIRCUS-ELEPHANT, ROYAL-ELEPHANT).
DEFAULT(FLYING-ELEPHANT, ROYAL-ELEPHANT),
DEFAULT(NORMAL-ELEPHANT. ROYAL-ELEPHANT),
DEFAULT(ROYAL-ELEPHANT, ELEPHANT),
DEFAULT(AFRICAN-ELEPHANT, ELEPHANT))
node: AFRICAN-ELEPHANT
I * edge: DEPEND-ON
1---1> node: CIRCUS
node: ELEPHANT
I * edge: DEPEND-ON
1---1> node: CIRCUS
I * edge: DEPEND-ON
1---1> node : COLOR
node: ROYAL-ELEPHANT
I * edge: DEPEND-ON
1---1> node : CIRCUS
I * edge: DEPEND-ON
1---1> node : COLOR
node:GRAY
I * edge : DEPEND-ON
1---1> node: COLOR
node : NORMAL-ELEPHANT
1* edge : DEPEND-ON
1---1> node : CIRCUS
I * edge: SUB-CLASS
1---1> node : CIRCUS-ELEPHANT
I * edge : DEPEND-ON
1---1> node: CIRCUS
node : FLYING-ELEPHANT
I * edge: DEPEND-ON
1---1> node: CIRCUS
I • edge: SUB-CLASS
1---1> node: CIRCUS-ELEPHANT
Snet Option : quit
Kbase Option: quit
Action: quit
>Bye.
14.7u 9.6s 4:51 8% 96+408k 1+0io 753pf+Ow
-cOnce the knowledge base is defined, we can state questions about the information stored. The
graph : #:GRAPH-832
questions presented in the examples of chapter 4 are used to demonstrate the capabilities of the
node : AFRICAN-ELEPHANT
1* edge: DEFAULT
1---1> node : ELEPHANT
node: NORMAL-ELEPHANT
I * edge : DEFAULT
1---1> node: ROYAL-ELEPHANT
I * edge : DEFAULT
1---1> node: ELEPHANT
node : FLYING-ELEPHANT
I * edge : DEFAULT
1---1> node: ROYAL-ELEPHANT
node : CIRCUS-ELEPHANT
1* edge : DEFAULT
1---1> node: ROYAL-ELEPHANT
systems. These questions are contained in the file kb.ask presented below:
;; Logic
ask(k,from-logic(IEx size(x,small) & robin(x)))
ask(k,from-logic(IEx size(x,small) & circus-elephant(x)))
;; Frame
ask(k.from-frame(herbivore > elephant))
ask(k,from-frame(mammal > robin))
. 191
- 192
EXAMPLES OF TIlE SYSTEM OPERAnON
APPENDIXD
.: Snet
ask(k,from-snet(color ++ circus(circus-elephant -1-> gray)))
ask(k,from-snet(color ++ circus(african-elephant ---> gray)))
ask(k,from-snet(color ++ circus(circus-elephant ---> gray)))
;; Logic-Frame
ask(k,from-logic-frame(IEx size(x,small)
&
animal(x)))
;; Logic-Snet
ask(k,from-Iogic-snet(color ++ circus, lEx size(x,big) & -gray(x)))
;; Frame-Snet
ask(k,from-frame-snet(circus, animal > african-elephant))
In the following example, the same file kb.Ois read in. Next, the file kb.ask is read in twice:
The first time with the flag verbose off, and the second time with this flag on. The flag verbose
controls the printing of intermediary results by the system.
<>mantra
Hybrid Knowledge Representation System - 20 April 1989
Running under KCI (Kyoto Common Lisp) - 3 June 1987
Using CommonORBIT - 13 January 1988
To begin a section type (mantra).
>(hyb)
MANTRA - Version 3.0
Action: Is
Input file: kb.O
Action: Is
Input file: kb.ask
The answer is YES, with substitution (((X. TWEETY)))
The answer is NO.
The answer is YES.
The answer is NO.
The answer is YES.
The answer is YES.
The answer is NO.
The answer is YES, with substitution «(X. TWEETY)))
The answer is YES, with substitution «(X. CLYDE)))
The answer is YES.
Action: v
Action: Is
Input file: kb.ask
Input expression:
••• Command of type QUERY for K:
• Question for module LOGIC:
APPENDIXD
EXAMPLES OF TIlE SYSTEM OPERAnON
[VARIABLES: XI
[CONSTANTS: SMALL,Xl
[PREDICATES: (ROBIN. 1), (SIZE. 2)1
EXIST(X, AND(SIZE(X, SMALL), ROBIN(X»))
To prove (AND (SIZE X SMALL) (ROBIN X)) the following facts will be used:
«ROBIN TWEETY) (SIZE CLYDE BIG) (SIZE TWEETY SMALL))
terms:
«ROBIN TWEETY))
«SIZE X SMALL))
====> NIL
terms:
«SIZE CLYDE BIG))
«SIZE X SMALL))
====> NIL
terms:
«SIZE TWEETY SMALL))
«SIZE X SMALL))
====> «(X. TWEETY)))
terms:
«ROBIN TWEETY))
«ROBIN X))
--==> «(X. TWEETY)))
terms:
«SIZE CLYDE BIG))
«ROBIN X))
====> NIL
terms:
«SIZE TWEETY SMALL))
«ROBIN X)
====> NIL
Final: ««X . TWEETY))) «(X . TWEETY))))
The answer Is YES, with substitution «(X. TWEETY)))
Input expression:
••• Command of type QUERY for K:
• Question for module LOGIC:
[VARIABLES: XI
[CONSTANTS: SMALL, Xl
[PREDICATES: (CIRCUS-ELEPHANT. 1), (SIZE. 2))
EXIST(X, AND(SIZE(X, SMALL), CIRCUS-ELEPHANT(X)))
TO prove (AND (SIZE X SMALL) (CIRCUS-ELEPHANT X)) the following facts will be used:
«CIRCUS-ELEPHANT CLYDE) (SIZE CLYDE BIG) (SIZE TWEETY SMALL))
terms:
«CIRCUS-ELEPHANT CLYDE))
«SIZE X SMALL))
====> NIL
terms:
«SIZE CLYDE BIG))
((SIZE X SMALL))
====> NIL
terms:
«SIZE TWEETY SMALL))
«SIZE X SMALL))
====> «(X. TWEETY)))
terms:
«CIRCUS-ELEPHANT CLYDE))
«CIRCUS-ELEPHANT X))
====> «(X. CLYDE)))
EXAMPLES .OF TIlE SYSTEM OPERATION
terms:
«SIZE CLYDE BIG»
«CIRCUS-ELEPHANT X»
====> NIL
terms:
«SIZE TWEETY SMALL))
«CIRCUS-ELEPHANT Xl)
====> NIL
Final: ««X . CLYDE»)) (((X . TWEETY»)))
The answer is NO.
APPENDIXD
APPENDIXD
EXA MPLES OF THE SYSTEM OPERATION
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: GRAY, AFRICAN-ELEPHANn
(ORIGINAL-HIERARCHIES: CIRCUS, COLOR]
SUB-CLASS(HIERARCHY-UNION(COLOR, CIRCUS), AFRICAN-ELEPHANT, GRAY)
Testing if AFRICAN-ELEPHANT is a subclass of GRAY
in hierarchy (HIERARCHY-UNION CIRCUS COl.OR) ...
The answer is YES.
Input expression:
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL·CONCEPTS : ELEPHANT,HERBIVORE]
SUBSUME-CONCEPT(HERBIVORE, ELEPHANT)
Subsumption test of:
concept 1: (AND-CONCEPT ANIMAL (ALL FOOD PLANT))
concept 2: (AND-CONCEPT ANIMAL
(ALL (RESTRICTION (AND-RELATION BODY-PART)
(AND-CONCEPT RED LIQUID))
WARM)
(ALL REPRODUCTION VIVIPAROUS) (ALL FOOD PLANT)
(SOME ORGAN TRUNK))
The answer is YES.
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
(ORIGINAL-CONCEPTS: ROBIN, MAMMAL)
SUBSUME-CONCEPT(MAMMAL, ROBIN)
Subsumption test of:
concept 1: (AND-CONCEPT ANIMAL
(ALL (RESTRICTION (AND-RELATION BODY· PART)
(AND-CONCEPT RED LIQUID»)
WARM)
(ALL REPRODUCTION VIVIPAROUS»
concept 2: (AND-CONCEPT ANIMAL
(ALL (RESTRICTION (AND-RELATION BODY-PART)
(AND-CONCEPT RED LIQUID»
WARM)
(ALL REPRODUCTION OVIPAROUS) (ALL SIZE SMALL)
(SOME ORGAN WING»
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: GRAY, CIRCUS-ELEPHANn
[ORIGINAL-HIERARCHIES: CIRCUS, COLOR]
NOT-SUB-CLASS(HIERARCHY-UNION(COLOR, CIRCUS), CIRCUS-ELEPHANT, GRAY)
Testing if CIRCUS-ELEPHANT is not a subclass of GRAY
in hierarchy (HIERARCHY-UNION CIRCUS COLOR) ...
The answer is YES.
Input expression:
- 195
••• Command of type QUERY for K:
• Question for module SNET:
(ORIGINAL-CLASSES: GRAY, CIRCUS-ELEPHANn
[ORIGINAL-HIERARCHIES: CIRCUS, COLOR]
SUB-CLASS(HIERARCHY-UNION(COLOR, CIRCUS), CIRCUS-ELEPHANT, GRAY)
Testing if CIRCUS-ELEPHANT is a subclass of GRAY
in hierarchy (HIERARCHY-UNION CIRCUS COLOR) ...
The answer Is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module LOGIC-FRAME:
(VARIABLES: X]
[CONSTANTS: SMALL, XI
[PREDICATES: (ANIMAL. 1), (SIZE. 2))
EXIST(X, AND(SIZE(X, SMALL), ANIMAL(X»))
Considering that ANIMAL subsumes ROBIN...
To prove (AND (SIZE X SMALL) (ANIMAL X» the following facts will be used:
«ROBIN TWEETY) (SIZE CLYDE BIG) (SIZE TWEETY SMALL»
Hybrid logic and frame clashing test for ROBIN and SIZE ...
terms:
.
«ROBIN TWEETY»
«SIZE X SMALl»
====> NIL
Hybrid logic and frame clashing test for SIZE and SIZE ...
Hybrid logic and frame clashing test for BIG and SMALL. ..
terms:
((SIZE CLYDE BIG»
((SIZE X SMALL»
====> NIL
Hybrid logic and frame clashing test for SIZE and SIZE ...
Hybrid logic and frame clashing test for SMALL and SMALL. ..
terms:
((SIZE TWEETY SMALL))
«SIZE X SMALL»
=.. ==> (((X. TWEETY)))
Hybrid logic and frame clashing test for ROBIN and ANIMAL. ..
terms:
((ROBIN TWEETY))
«ANIMAL X»
====> «((X. TWEETY»))
Hybrid logic and frame clashing test for SIZE and ANIMAL...
terms:
«SIZE CLYDE BIG»
((ANIMAL X»
====> NIL
- 196
EXAMPLES OF TIlE SYSTEM OPERAnON
APPENDIXD
Hybrid logic and frame clashing test for SIZE and ANIMAL. ..
terms:
((SIZE TWEETY SMALL))
((ANIMAL X))
====> NIL
Final: ((((X . TWEETY))) (((X . TWEETY))))
The answer is YES, with substitution (((X. TWEETY)))
Input expression:
*** Command of type QUERY for K:
* Question for module LOGIC-SNET:
([ORIGINAL-HIERARCHIES: CIRCUS, COLOR]
HIERARCHY-UNION(COLOR, CIRCUS)
[VARIABLES: X]
[CONSTANTS: BIG, X]
[PREDICATES: (GRAY. 1), (SIZE. 2)]
EXIST(X, AND(SIZE(X, BIG), NOT(GRAY(X)))))
Considering that CIRCUS-ELEPHANT is not related to GRAY...
To prove (AND (SIZE X BIG) (NOT (GRAY X))) the following facts will be used:
((CIRCUS-ELEPHANT CLYDE) (SIZE CLYDE BIG) (SIZE TWEETY SMALL))
Hybrid logic and semantic network clashing test for CIRCUS-ELEPHANT and SIZE...
terms:
((CIRCUS-ELEPHANT CLYDE))
((SIZE X BIG))
====> NIL
Hybrid logic and semantic network clashing test for SIZE and SIZE ...
Hybrid logic and semantic network clashing test for BIG and BIG...
terms:
((SIZE CLYDE BIG))
((SIZE X BIG))
====> (((X . CLYDE)))
Hybrid logic and semantic network clashing test for SIZE and SIZE .
Hybrid logic and semantic network clashing lest for SMALL and BIG .
terms:
((SIZE TWEETY SMALL))
((SIZE X BIG))
====> NIL
Hybrid logic and semantic network clashing test for CIRCUS-ELEPHANT and #:NEW-SYMBOL
1374 ...
terms:
((CIRCUS-ELEPHANT CLYDE))
((#:NEW-SYMBOL-1374 X))
====> (((X . CLYDE)))
Hybrid logic and semantic network clashing lest for SIZE and #:NEW-SYMBOL-1374...
terms:
((SIZE CLYDE BIG))
((#:NEW-SYMBOL-1374 X))
====> NIL
Hybrid logic and semantic network clashing test for SIZE and #:NEW-SYMBOL-1374 ...
terms:
((SIZE TWEETY SMALL))
((#:NEW-SYMBOL-1374 X))
====>. NIL
Final: ((((X. CLYDE)))· (((X. CLYDE))))
The answer is YES, with substitution (((X . CLYDE)))
Input expression:
APPENDIXD
EXAMPLES OF TIlE SYSTEM OPERAnON
*** Command of type QUERY for K:
* Question for module FRAME-SNET:
([ORIGINAL-HIERARCHIES: CIRCUS]
CIRCUS
[ORIGINAL-CONCEPTS: AFRICAN-ELEPHANT, ANIMAL]
SUBSUME-CONCEPT(ANIMAL, AFRICAN-ELEPHANT))
Recalculate subsumption graph (yin) : n
Hybrid subsumption test of:
concept 1: ANIMAL
concept 2: AFRICAN-ELEPHANT
under hierarchy: (HIERARCHY-UNION CIRCUS)
with graph:
graph : #:GRAPH-1467
node : CIRCUS-ELEPHANT
I * edge : DEFAULT
1---1> node: ROYAL-ELEPHANT
1* edge : DEFAULT
1---1> node : ELEPHANT
I * edge : DEFAULT
/---1> node : ANIMAL
1* edge: DEFAULT
1---1> node: HERBIVORE
I 1* edge: DEFAULT
I 1---1> node : ANIMAL
I * edge : DEFAULT
1---1> node : MAMMAL
1* edge: DEFAULT
1---1> node : ANIMAL
node : FLYING-ELEPHANT
1* edge: DEFAULT
1---1> node: ROYAL-ELEPHANT
node: NORMAL-ELEPHANT
I * edge : DEFAULT
1---1> node: ROYAL-ELEPHANT
. node: AFRICAN-ELEPHANT
I * edge : DEFAULT
1---1> node : ELEPHANT
node: CARNIVORE
I * edge : DEFAULT
1---1> node : ANIMAL
node: ROBIN
1* edge: DEFAULT
1---1> node : ANIMAL
1* edge: DEFAULT
1---1> node : BIRD
I * edge: DEFAULT
1---1> node : ANIMAL
node: BODY-PART
node:BLOOD
I * edge : DEFAULT
1---1> node: BODY-PART
The answer is YES.
Action: q
>Bye_
21.8u 10.2s 2:14 24% 104+456k
<>
z-nro
857pf+Ow
- 19,
EXAMPLES OF mE SYSTEM OPERATION
APPENDIX 0
APPENDIX 0
EXAMPLES OF mE SYSTEM OPERATION
;; Snet entities of a class
In this last example of the basic operation of the system, we present the primitives allowing to
access the contents of the knowledge base from the knowledge representation language itself. This
primitives are contained in the following file, called kb.newask:
;; Global entities
ask(k, from -snet( de scribe-class(pri-class .ctrcu s-e Ie phan t)))
ask (k, from-snet(describe -class(pri -class ,e lephan t)))
ask (k, from- snet(describe-class (def-class ,circus-elephant)))
ask( k, from-snet( describe-class(def -class,elephant)))
ask (k, Irom- snet( describe-class(pri- hie rarchy ,ci rcu s- eleph an t)))
ask (k, from-s net(describe -class(pri- hie rarchy, elephant)))
ask (k .from- snet( describe-class (del- hierarchy ,ci rcu s-elep han t)))
ask (k, Irom-snet(de scribe-class(del-h ie rarchy ,el eph ant)))
ask(k,constant)
ask(k, function)
ask(k,predicate)
ask(k, pri-concept)
ask(k,del-concept)
ask(k ,pri-relation)
ask(k ,del-rela tion)
ask(k,pri-class)
ask(k,def-class)
ask (k, pri- hierarchy)
ask(k ,del- hierarchy)
ask (k, from-s net( describe -h ierarchy(prl-class .c ircu s)))
ask (k, Irom -s net(describe- hie rarch y (pri-class, h)))
ask (k, from- snet( describe- hie rarchy(def -ctass ,ci rcu s)))
ask (k, from-snet( describe- hiera rchy (def-class, h)))
ask (k, from -s net( de scribe -hie rarchy(pri- hiera rchy ,circu s)))
ask(k, from-snet(describe-hierarchy(pri-h ierarchy, h)))
ask (k, from -snet( describe -hi erarchy (de f- hie rare hy .cl reus)))
ask (k, from- snet( describe -hierarchy (def-h ierarchy ,h)))
;; Logical entities 01 a formula
;; Subsumption hierarchies
;; Snet entilies of a hierarchy
ask(k,lrom-logic(describe-Iormula(constant, lEx IVy P(f(x,a),y) & Q(y)
ask(k,lrom-logic(describe-lormula(function, lEx IVy P(f(x,a),y) & Q(y)
ask(k,lrom-logic(describe-formula(predicate, lEx IVy P(I(x,a).y) & Q(y)
I
R(b,c))))
I R(b,c))))
I R(b,c))))
ask(k,from-snet(concept-hierarchy(k) ++ circus(african-elephant ---> animal)))
tell(k,to-snet(relation-h :h= relation-hierarchy(k)))
In the following example. the file kb.O is read in, and next the file kb.newask is read with the
;; Frame entities 01 a concept
ask( k, f rom- frame(describe -co ncept( pri-co ncept,robin)))
ask( k, f ro rn-Irame (describe-conce pt(pri-concept,an imal)))
ask(k, Irom -frame(describe-concept( def-concept,robin)))
ask(k, Iro m-fr ame(describe-concept( def-concept,animal)))
ask (k, from -fr am e( describe-co ncept(pri- rei alion ,robi n)))
ask (k, I rom -Irame (describe-co ncept(pri-re lation ,animal)))
ask( k, from-Iram e( describe -concept(def-relation ,robin)))
ask( k, Ira m-frame( describe-concept( def-rela tion, animal)))
flag verbose on.
<>mantra
Hybrid Knowledge Representation System - 20 April 1989
Running under KCI (Kyoto Common Usp) - 3 June 1987
Using CommonORBIT - 13 January 1988
To begin a section type (mantra).
;; Frame entities 01 a relation
ask(k, from -frame (describe -rela tlo n(pri-concept ,blood)))
ask( k, from -frame (de scribe-rela tion( pri-concept, food)))
ask(k, Irom -fram e(describe-re lation( def-concept,blood)))
ask (k, Iro rn-Irame (describe -relatlon (del-co nee pt, food)))
ask( k, Irom - frame( describe- re la lion (pri -rela tio n, blood)))
ask(k, Irom- frame(describe-relalion(pri-relalion. food)))
ask(k, Iro m-frame (describe-rei alio n(del -relation ,blood)))
ask( k, Irom -fram e(describe- rela tion( del orelation, food)))
>(hyb)
MANTRA - Version 3.0
;; Subsumption primitives
Input expression:
ask( k, Iro m-Ir arne (su bs um i ng-co ncept(bird)))
ask( k, Iro m-Iram e( subsumed-co ncept(bird)))
ask(k, Iro m-frame(subsum ing-relation(blood)))
ask (k ,fro m- I rame( subsurned- rela tion (blood)))
••• Command 01 type QUERY lor K:
• Question for module KBASE:
Action: Is
Input file: kb.O
Action: v
Action: Is
Input file : kb.new8sk
CCNSTJINT
The answer is (BIG CLYDE SMALL TWEETY).
Input expression:
- 199
- 200
EXAMPLES OFlHE SYSTEM OPERATION
••• Command 01 type QUERY lor K:
• Question for module KBASE:
FUNCTION
The answer is NO.
APPENDIXD
APPENDIX D
EXAMPLES OF lHE SYSTEM OPERATION
• Question for module KBASE:
PRI-HIERARCHY
The answer is NO.
Input expression:
Input expression:
••• Command 01 type QUERY for K:
• Question lor module KBASE:
PREDICATE
The answer is ((CIRCUS-ELEPHANT. 1) (SIZE. 2) (ROBIN. 1)).
Input expression:
••• Command of type QUERY for K:
• Question lor module KBASE:
PRI-CONCEPT
The answer is (WING SMALL TRUNK PLANT OVIPAROUS VIVIPAROUS WARM
ANIMAL RED LIQUID).
Input expression:
••• Command of type QUERY for K:
• Question for module KBASE:
DEF-CONCEPT
The answer is (HERBIVORE CARNIVORE ROBIN ELEPHANT BIRD MAMMAL).
Input expression:
••• Command 01 type QUERY for K:
• Question lor module KBASE:
PRI-RELATION
The answer is (SIZE ORGAN FOOD REPRODUCTION BODY-PART).
••• Command 01 type QUERY lor K:
• Question for module KBASE:
DEF-HIERARCHY .
The answer is (CIRCUS COLOR).
Input expression:
••• Command of type QUERY lor K:
• Question lor module LOGIC:
[VARIABLES: X, Y)
[CONSTANTS: C, B, Y, A, X)
[FUNCTIONS: (F . 2))
[PREDICATES: (R . 2), (Q . 1), (P . 2))
DESCRIBE-FORMULA(CONSTANT, EXIST(X, FORALL(Y, OR(AND(P(F(X, A), Y), Q(Y)), R(B,
C)))) )
The answer is (C B A).
Input expression:
••• Command of type QUERY lor K:
• Question for module LOGIC:
[VARIABLES: X, Y)
[CONSTANTS: C, B, Y, A, X)
[FUNCTIONS: (F . 2))
[PREDICATES: (R . 2), (Q . 1), (P . 2))
DESCRIBE-FORMULA(FUNCTlON, EXIST(X, FORALL(Y, OR(AND(P(F(X, A), Y). Q(Y)), R(B,
C)))) )
The answer is ((F. 2) (#:FUN-1470 . 1)).
Input expression:
Input expression:
••• Command 01 type QUERY for K:
• Question lor module KBASE:
DEF-RELATION
The answer is (BLOOD).
Input expression:
••• Command 01 type QUERY for K:
• Question lor module KBASE:
PRI-CLASS
The answer is (AFRICAN-ELEPHANT ELEPHANT ROYAL-ELEPHANT GRAY
FLYING-ELEPHANT NORMAL-ELEPHANT).
Input expression:
••• Command 01 type QUERY lor K:
• Question lor module KBASE:
DEF-CLASS
The answer is (CIRCUS-ELEPHANT).
••• Command of type QUERY lor K:
• Question for module LOGIC:
[VARIABLES: X. Y)
[CONSTANTS: C, B, Y, A. X)
[FUNCTIONS: (F . 2))
[PREDICATES: (R .2), (Q . 1), (P _2))
DESCRIBE-FORMUL.A(PREDICATE, EXIST(X, FORALL(Y. OR(AND(P(F(X, A), Y), Q(Y)), A(B,
C)))) )
The answer is ((R . 2) (Q . 1) (P . 2)).
Input expression:
••• Command of type QUERY lor K:
• Question for module FRAME:
[ORIGINAL-CONCEPTS: ROBIN)
DESCRIBE-CONCEPT(PRI-CONCEPT, ROBIN)
The answer is (SMALL WING ANIMAL WARM OVIPAROUS LIQUID RED).
Input expression:
Input expression:
••• Command 01 type QUERY lor K:
••• Command 01 type QUERY lor K:
• Question for module FRAME:
-x
EXAMPLES OF TI-lE SYSTEM OPERA nON
[ORIGINAL-CONCEPTS: ANIMAL]
DESCRIBE-CONCEPT(PRI-CONCEPT, ANIMAL)
The answer is (ANIMAL).
APPENDIXD
APPENDIXD
EXAMPLES OF TIlE SYSTEM OPERATION
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-RELATIONS: FOOD)
DESCRIBE-RELATION(PRI-CONCEPT, FOOD)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-CONCEPTS: ROBIN]
DESCRIBE-CONCEPT(DEF-CONCEPT, ROBIN)
The answer is (ROBIN).
Input expression:
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
(ORIGINAL-CONCEPTS: ANIMAL)
DESCRIBE-CONCEPT(DEF-CONCEPT, ANIMAL)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-CONCEPTS: ROBIN)
DESCRIBE-CONCEPT(PRI-RELATION, ROBIN)
The answer is (SIZE ORGAN REPRODUCTION BODY-PART).
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
(ORIGINAL-CONCEPTS: ANIMAL)
DESCRIBE-CONCEPT(PRI-RELATION, ANIMAL)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-CONCEPTS: ROBIN)
DESCRIBE-CONCEPT(DEF-RELATION, ROBIN)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-CONCEPTS: ANIMAL)
DESCRIBE-CONCEPT(DEF-RELATION, ANIMAL)
The answer is NO.
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-RELATIONS: BLOOD]
DESCRIBE-RELATION(DEF-CONCEPT, BLOOD)
The answer is NO.
Inpul expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-RELATIONS: FOOD)
DESCRIBE-RELATION(DEF-CONCEPT, FOOD)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-RELATIONS: BLOOD]
DESCRIBE-RELATION(PRI·RELATION, BLOOD)
The answer is (BODY-PART).
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
(ORIGINAL-RELATIONS: FOOD)
DESCRIBE-RELATION(PRI-RELA TION, FOOD)
The answer is (FOOD).
Input expression:
••• Command of type OUERY for K:
• Question for module FRAME:
[ORIGINAL-RELATIONS: BLOOD]
DESCRIBE-RELATION(DEF-RELATION, BLOOD)
The answer is (BLOOD).
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL·RELATIONS : FOOD)
DESCRIBE-RELATION(DEF-RELATION, FOOD)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-RELATIONS: BLOOD)
DESCRIBE-RELATION(PRI-CONCEPT, BLOOD)
The answer is (LIQUID RED).
Input expression:
- 201 -
- 204
EXAMPLES
OFTIlE SYSTEM OPERA nON
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-CONCEPTS: BIRD)
SUBSUMING-CONCEPT(BIRD)
Finding the concepts subsuming the concept
(AND-CONCEPT ANIMAL
(ALL (RESTRICTION
(AND-RELATION BODY-PART)
(AND-CONCEPT RED LIQUID))
WARM)
(ALL REPRODUCTION OVIPAROUS))
The answer is (ANIMAL BIRD)_
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-CONCEPTS: BIRD)
SUBSUMED-CONCEPT(BIRD)
Finding the concepts subsumed by the concept
(AND-CONCEPT ANIMAL
(ALL (RESTRICTION
(AND-RELATlON
BODY-PART)
(AND-CONCEPT RED
LIQUID))
WARM)
(ALL REPRODUCTION OVIPAROUS))
The answer is (ROBIN BIRD).
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-RELATIONS: BLOOD)
SUBSUMING-RELATION(BLooD)
Finding the relations subsuming the relation
(RESTRICTION
(AND-RELATION BODY-PART)
(AND-CONCEPT RED LIQUID))
The answer is (BODY-PART BLOOD).
Input expression:
••• Command of type QUERY for K:
• Question for module FRAME:
[ORIGINAL-RELATIONS: BLOOD)
SUBSUMED-RELATION(BLOOD)
Finding the relations subsumed by the relation
(RESTRICTION (AND-RELATION
BODY-PART)
(AND-CONCEPT RED
- LIQUID))
The answer is (BLOOD).
Input expression:
, •• Command of type QUERY for K:
, Question for module SNET:
APPENDIXD
APPENDIX D
EXAMPLES OF TIlE SYSTEM OPERATION
[ORIGINAL-CLASSES: CIRCUS-ELEPHANT]
DESCRIBE-CLASS(PRI-CLASS. CIRCUS-ELEPHANT)
The answer is (NORMAL-ELEPHANT FLYING-ELEPHANT).
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: ELEPHANT)
DESCRIBE-CLASS(PRI-CLASS. ELEPHANT)
Primitive class ELEPHANT used inside a class definition...
The answer is (ELEPHANT).
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: CIRCUS-ELEPHANT)
DESCRIBE-CLASS(DEF-CLASS. CIRCUS-ELEPHANT)
The answer is (CIRCUS-ELEPHANT).
I;,put expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: ELEPHANT)
DESCRIBE-CLASS(DEF-CLASS. ELEPHANT)
Primitive class ELEPHANT used inside a class definition...
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: CIRCUS-ELEPHANT)
DESCRIBE-CLASS(PRI-HIERARCHY. CIRCUS-ELEPHANT)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: ELEPHANT)
DESCRIBE-CLASS(PRI-HIERARCHY. ELEPHANT)
Primitive class ELEPHANT used inside a class definition...
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: CIRCUS-ELEPHANT)
DESCRIBE-CLASS(DEF-HIERARCHY, CIRCUS-ELEPHANT)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
206
EXAMPLES OF TIm SYSTEM OPERATION
APPENDIXD
[ORIGINAL-CLASSES: ELEPHANT]
DESCRIBE-CLASS(DEF-HIERARCHY, ELEPHANT)
Primitive class ELEPHANT used inside a class definition...
The answer is NO.
APPENDIX D
EXAMPLES OFTI-IE SYSTEM OPERATION
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-HIERARCHIES: CIRCUS)
DESCRIBE-HIERARCHY(DEF-HIERARCHY, CIRCUS)
The answer is (CIRCUS).
Input expression:
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-HIERARCHIES: CIRCUS)
DESCRIBE-HIERARCHY(PRI-CLASS, CIRCUS)
The answer is (ELEPHANT AFRICAN-ELEPHANT ROYAL-ELEPHANT NORMAL-ELEPHANT
FLYING-ELEPHANT).
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-HIERARCHIES: H)
DESCRIBE-HIERARCHY(DEF-HIERARCHY, H)
Primitive hierarchy H used inside a hierarchy definition...
The answer is NO.
Input expression:
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-HIERARCHIES: H)
DESCRtBE-HIERARCHY(PRI-CLASS, H)
Primitive hierarchy H used inside a hierarchy definition...
The answer is NO.
.
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-HIERARCHIES: CIRCUS)
DESCRIBE-HIERARCHY(DEF-CLASS, CIRCUS)
The answer is (CIRCUS-ELEPHANT).
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-HIERARCHIES: H)
DESCRIBE-HIERARCHY(DEF-CLASS, H)
Primitive hierarchy H used ~nside a hierarchy definition...
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-HIERARCHIES: CIRCUS)
DESCRIBE·HIERARCHY(PRI-HIERARCHY, CIRCUS)
The answer is NO.
Input expression:
••• Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-HIERARCHIES: H)
DESCRIBE·HIERARCHY(PRI-HIERARCHY, H)
Primitive hierarchy H used inside a hierarchy definition ...
The answer is (H).
Input expression:
- 207
... Command of type QUERY for K:
• Question for module SNET:
[ORIGINAL-CLASSES: ANIMAL, AFRICAN-ELEPHANT]
[ORIGINAL-HIERARCHIES: CIRCUS)
SUB-CLASS(HIERARCHY-UNION(CONCEPT-HIERARCHY(K), CIRCUS),
AFRICAN-ELEPHANT, ANIMAL)
Testing if AFRICAN-ELEPHANT is a subclass of ANIMAL in hierarchy
(HIERARCHY-UNION
(HIERARCHY-UNION CIRCUS)
(DEFAULT HERBIVORE ANIMAL)
(DEFAULT CARNIVORE ANIMAL)
(DEFAULT ROBIN ANIMAL)
(DEFAULT ELEPHANT ANIMAL)
(DEFAULT BIRD ANIMAL)
(DEFAULT MAMMAL ANIMAL)
(DEFAULT ELEPHANT HERBIVORE)
(DEFAULT ROBIN BIRD)
(DEFAULT ELEPHANT MAMMAL)) ...
The answer is YES.
Input expression:
••• Command of type STATEMENT for K:
• Definition in module SNET of a HIERARCHY:
DEFINE-HIERARCHY(RELATION-H, RELATION-HIERARCHY(K))
Defining hierarchy RELATION-H...
Declaring BODY-PART as a primitive class ...
Declaring BLOOD as a primitive class ...
Action: pk
Knowledge base : k
Knowledge Base K
Kbase Option : s
Semantic Net Situation of Knowledge Base K
Snet Option : sd
Enter entity name : relation-h
[ORIGINAL-CLASSES: BLOOD, BODY-PART]
[PRI-CLASSES : BODY· PART, BLOOD)
DEFINE-HIERARCHY(RELATION-H,
HIERARCHY-UNION(HIERARCHY·UNIONO, DEFAULT(BLOOD, BODY-PART))) ==>
- 208
EXAMPLES OF TIlE SYSTEM OPERA nON
APPENDIXD
HIERARCHY-UNION(HIERARCHY-UNIONO, DEFAULT(BLOOD, BODY-PART»
graph : #:GRAPH-2016
node:BLOOD
I • edge : DEFAULT
1---1> node : BODY-PART
APPENDIXD
EXAMPLES OF TI-IE SYSTEM OPERAnON
Declaring K as a knowledge base...
Declaring A as a constant...
Declaring Q1 as a predicate...
Declaring P1 as a predicate..:
Input expression:
Snet Option: q
Kbase Option: q
Action: q
sBye.
25.3u 12.1s 2:39 23% 88+480k 2+0io 885pf+Ow
<>
D.2. First-Order Logic
In this section we present a more complex example of the logic inference capabilities of the
system. The examples have been taken from Patel-Schneider (1985). The following file, called patel
def, contains the definitions of the facts used in the example.
••• Command of type STATEMENT for K:
• Definition in module LOGIC of a ASSERTION:
[VARIABLES: Z, ZL, W, WL)
[CONSTANTS: WL, ZL, W, Z)
[PREDICATES: (Q2 . 2), (P2 . 2»)
FORALL(Z, FORALL(ZL, EXIST(W, EXIST(WL, OR(P2(Z, W), Q2(ZL, WL»»)))
['eclaring #:FUN-829 as a
Declaring #:FUN-828 as a
Declaring Q2 as a predicate
Declaring P2 as a predicate
function .
function .
.
.
Action: Is
Input file:
Enter command (; to end) :
> ask(k,from-loglc(!Vy
lEx
.
(P1 (x)
I Q1 (y)
P1
>"
;; Examples for the first-order logic module
tell(k,to-logic(IVz (P1 (a) I Q1(z»»
tell(k,to-logic(IVz IVzl lEw IEwl P2(z,w)
I Q2(zl,wl»)
In the following example, the file patel-def is read in, and next two question are asked using
the interactive input capability of the system.
-o-rnantra
Hybrid Knowledge Representation System - 20 April 1989
Running under KCI (Kyoto Common Lisp) - 3 June 1987
Using CommonORBIT - 13 January 1988
To begin a section type (mantra).
>(hyb)
MANTRA - Version 3.0
Action: v
Action: is
Input file : patel-def
Input expression:
••• Command of type STATEMENT for K:
• Definition in module LOGIC of a ASSERTION:
[VARIABLES: Z)
[CONSTANTS: Z, Al
[PREDICATES: (Q1 . 1), (P1 . 1)]
FORALL(Z, OR(P1(A), Q1(Z»))
«n»
Input expression:
••• Command of type QUERY for K:
• Question for module LOGIC:
[VARIABLES: Y, X)
[CONSTANTS: C, Y, XI
[PREDICATES: (Q1 . 1), (Pl. 1»)
FORALL(Y, EXIST(X, OR(OR(P1 (X), Q1(Y», P1(C»»
To prove (OR (P1 X) (Q1 #:FUN-832) (P1 C» the following facts will be used:
((OR (P1 A) (Q1 Z»)
terms:
((P1 A) (Q1 Z»
((P1 X) (Q1 #:FUN,832) (P1 C»
====> (((X. A) (Z . #:FUN-832)))
Final: ((((X . A) (#:VAR-839 . #:FUN-832))))
The answer is YES, with substitution (((X . A»)
Action: Is
Input liIe :
Enter command (: to end) :
> ask(k,from-loglc((IEx
>;
P2(f,
x»
(!Exl
Q2(fp,
xl»»
Input expression:
••• Command of type QUERY for K:
• Question for module LOGIC:
[VARIABLES: XL, Xl
[CONSTANTS: XL, FP, X, Fl
[PREDICATES: (Q2 . 2), (P2 . 2»)
OR(EXIST(X, P2(F, X», EXIST(XL, Q2(FP, XL»)
To prove (OR (P2 F X) (Q2 FP XL» the following facts will be used:
((OR (P2 Z (#:FUN-828 ZL Z» (Q2 ZL (#:FUN-829 ZL Z»»
terms:
210
EXAMPLES OF TIlE SYSTEM OPERATION
APPENDIXD
((P2 Z (#:FUN-828 ZL Z)) (02 ZL (#:FUN-829 ZL Z)))
((P2 F X) (02 FP XL))
====> (((X #:FUN-828 ZL Z) (Z . F) (XL #:FUN-829 ZL F) (ZL . FP)))
Final: ((((X #:FUN-828 #:VAR-845 #:VAR-846) (#:VAR-846 . F)
(XL #:FUN-829 #:VAR-845 F) (#:VAR-845 . FP))))
The answer is YES, with substitution (((XL #:FUN-829 FP F)
(X #:FUN-828 FP F)))
Action: q
>Bye.
<>
D.3. Frames
In this section, we present the redefinition capability of the frame module. Some concepts and
relations are defined, and next parts of their definition are redefined. The system is able to receive
information in any order and it allows for redefinitions at any time. The redefinitions are reponed to
all entities using the redefined entities.
The following file, called frame-test-O contains the initial definitions:
;; Test for the redefinition of frames
tell(k,to-frame(r :r= rl && ra:[c1 & c2)))
tell(k,to-frame(rl :r= r2 II rb:[c1 I c3)))
tell(k,to-frame(r2 :r= rc:[c3 & c4)))
tell(k,to-frame(c1 :c= cll & c12))
The file frame-test-1 contains the redefinitions:
;; Test for the redefinition of frames
tell(k,to-frame(r1 :r= rr2 II rb:[cc1 I cc3)))
tell(k,to-frame(rr2 :r= rc:[cc3 & cc4)))
tell(k,to-frame(c1 :c= cct t & cc12))
In the example, the file frame-test-O is read in, and the defined entities of the knowledge base
are shown with the aid of the interactive interface capabilities: Next the file frame-test-1 is read in,
and the same entities are shown again.
-o-mant ra
Hybrid Knowledge Representation System - 20 April 1989
Running under KCI (Kyoto Common Lisp) - 3 June 1987
Using CommonORBIT - 13 January 1988
To begin a section type (mantra).
APPENDIXD
EXAMPLES OF TIlE SYSTEM OPERATION
>(hyb)
MANTRA - Version 3.0
Action: v
Action: Is
Input tile: frame-Iesl-O
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a RELATION:
[ORIGINAL-CONCEPTS: C2, C1]
[ORIGINAL-RELATIONS: RA, R1)
DEFINE-RELATION(R, AND-RELATlON(R1, RESTRICTION(RA, AND-CONCEPT(C1 , C2))))
Declaring K as a knowledge base...
-
Defining relation A...
Declaring C1 as a primitive concept...
Declaring C2 as a primitive concept...
Declaring R1 as a primitive relation .
Declaring RA as a primitive relation .
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a RELATION:
[ORIGINAL-CONCEPTS: C3, C1)
[ORIGINAL-RELATIONS: RB, R2]
DEFINE-RELATlON(R1, OR-RELATlON(R2, RESTRICTION(RB, OR-CONCEPT(C1, C3))))
Defining relation R1...
Declaring C3 as a primitive concept...
Declaring R2 as a primitive relation .
DecllJring RB as a primitive relation .
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a RELATION:
[ORIGINAL-CONCEPTS: C4, C3]
[ORIGINAL-RELATIONS: RC)
DEFINE-RELATION(R2, RESTRICTION(RC, AND-CONCEPT(C3, C4)))
Defining relation R2...
Declaring C4 as a primitive concept...
Declaring RC as a primitive relation ...
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a CONCEPT:
[ORIGINAL-CONCEPTS: C12, C11)
DEFINE-CONCEPT(C1, AND-CONCEPT(C11, C12))
Defining concept C1...
Declaring C11 as a primitive concept...
Declaring C12 as a primitive concept...
Action: pk
Knowledge base: k
Knowledge Base K
Kbase Option : f
EXAMPLES OF ras SYSTEM OPERAnON
APPENDIXD
Frame Situation of Knowledge Base K
Frame Option: all
Defined Concepts: Cl
Primitive Concepts: C12, Cll, C4, C3, C2
Defined Relations: R2, Rl, R
Primitive Relations: RC, RB, RA
Frame Option: sd
Enter entity name : c 1
[ORIGINAL-CONCEPTS: C12, Cl1)
[PRI-CONCEPTS : Cll, C12]
DEFINE-CONCEPT(Cl, AND-CONCEPT(Cl1, C12)) ==> AND-CONCEPT(Cl1, C12)
Frame Option: sd
Enter entity name : r
[ORIGINAL-CONCEPTS: C2,
(ORIGINAL-RELATIONS: RA, Rl]
[DEF-CONCEPTS : en
[PRI-CONCEPTS : C2, C3, C4, Cll, C12]
(DEF-RELATIONS : Rl]
(PRI-RELATIONS : RA, RB, RC)
DEFINE-RELATION(R, RESTRICTION(AND-RELATION(RA, Rl), AND-CONCEPT(Cl, C2))) ==>
RESTRICTION(AND-RELATION(RA, OR-RELATlON(R ESTRICTION(RC, AND-CONCEPT (C3, C4)),
RESTRICTlON(RB, OR-CONCEPT(AND-CONCEPT(Cl1, C12), C3)))),
AND-CONCEPT(Cl1, C12, C2))
en
Frame Option: sd
Enter entity name : r 1
(ORIGINAL-CONCEPTS: C3,
[ORIGINAL-RELATIONS: RB, R2]
(DEF-CONCEPTS :Cl)
[PRI-CONCEPTS : C3, C4, C", C12]
IDEF-RELATIONS : R2]
[PRI-RELATIONS : RB, RC)
DEFINE-RELATlON(Rl, OR-RELATION(R2, RESTRICTION(RB, OR-CONCEPT(Cl, C3)))) ==>
OR-RELATION(RESTRICTION(RC, AND-CONCEPT(C3, C4)),
RESTRICTION(RB, OR-CONCEPT(AND-CONCEPT(Cl1, C12), C3)))
en
Frame Option: sd
Enter entity name : r2
[ORIGINAL-CONCEPTS: C4, C3]
[ORIGINAL-RELATIONS: RC)
(PRI-CONCEPTS : C3, C4]
(PRI-RELATIONS : RC)
DEFINE-RELATlON(R2, RESTRICTION(RC, AND-CONCEPT(C3, C4))) ==>
RESTRICTION(RC, AND-CONCEPT(C3, C4))
Frame Option: q
Kbase Option : q
Action: Is
Input file : fra.me.test·l
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a RELATION:
[ORIGINAL-CONCEPTS: CC3, CC1]
[ORIGINAL-RELATIONS: RB, RR2]
DEFINE-RELATION(Rl, OR-RELATION(RR2, RESTRICTION(RB. OR-CONCEPT(CC1, CC3)}))
EXAMPLES OF TIlE SYSTEM OPERATION
APPENDIXD
Redefining R 1
Defining relation R1...
Declaring CCl as a primitive concept ...
Declaring CC3 as a primitive concept...
Declaring RR2 as a primitive relation ...
Input expression:
••• Command of type STATEMENT for K:
• Definition in module FRAME of a RELATION:
[ORIGINAL-CONCEPTS: CC4, CC3]
(ORIGINAL-RELATIONS : RC)
DEFINE-RELATION(RR2, RESTRICTION(RC, AND-CONCEPT(CC3, CC4)))
Defining relation RR2 ...
Declaring CC4 as a primitive concept...
Input expression:
... Command of type STATEMENT for K:
• Definition in module FRAME of a CONCEPT:
[ORIGINAL-CONCEPTS: CC12, CC11]
DEFINE-CONCEPT(Cl, AND-CONCEPT(CC", CC12))
Redefining Cl
Defining concept C 1...
Declaring CC 11 as a primitive concept...
Declaring CC12 as a primitive concept...
Action: pk
Knowledge base : k
Knowledge Base K
Kbase Option : f
Frame Situation of Knowledge Base K
Frame Option : all
Defined Concepts: Cl
Primitive Concepts: CC12, CC", CC4, CC3, CC1, C12, Cl1, C4, C3, C2
Defined Relations: RR2, R2, Rl, R
Primitive Relations : RC, RB, RA
Frame Option: sd
Enter entity name: e t
(ORIGINAL-CONCEPTS: CC12, CC11)
(PRI-CONCEPTS: CC1', CC12]
DEFINE-CONCEPT(Cl, AND-CONCEPT(CCll, CC12)) ==> AND-CONCEPT(CC11, CC12)
Frame Option: sd
Enter enlily name : r
[ORIGINAL-CONCEPTS: C2, Cl]
[ORIGINAL-RELATIONS: RA, Rl]
[DEF-CONCEPTS :
[PRI-CONCEPTS : C2, CC1, CC3, CC4, ccn. CC12]
[DEF-RELATIONS : Rl1
[PRI-RELATIONS : RA, RB, RC)
DEFINE-RELATION(R, RESTRICTlON(AND-RELATION(RA, Rl), AND-CONCEPT(Cl, C2))) ==>
RESTRICTION(AND-RELATION(RA, OR-RELATlON(RESTRICTION(RC, AND-CONCEPT(CC3, CC4)),
RESTRICTION(RB, OR-CONCEPT(CC1, CC3)))), AND-CONCEPT(CCll, CC12, C2))
en
Frame Option: sd
Enter entity name : r 1
214
EXAMPLES OF TIlE SYSTEM OPERA TION
APPENDIXD
[ORIGINAL-CONCEPTS: CC3, CC1)
[ORIGINAL-RELATIONS: RB, RR2)
[PRI-CONCEPTS : CC1, CC3, CC4, CCll, CC12)
[DEF-RELATIONS : RR2)
[PRI-RELATIONS : RB, RC)
DEFINE-RELATlON(Rl, OR-RELATJON(RR2, RESTRICTlON(RB, OR-CONCEPT(CC1, CC3)))) ==>
OR-RELATION(RESTRICTlON(RC, AND-CONCEPT(CC3, CC4)),
RESTRICTION(RB, OR-CONCEPT(CC1,CC3)))
Frame Option : sd
Enter entity name : r2
[ORIGINAL-CONCEPTS: C4, C3)
[ORIGINAL-RELATIONS: RC)
[PRI-CONCEPTS : C3, C4)
[PRI-RELATIONS : RC)
DEFINE-RELATlON(R2, RESTRICTION(RC, AND-CONCEPT(C3, C4))) ==>
RESTRICTION(RC, AND-CONCEPT(C3, C4))
Frame Option: q
Kbase Option : q
Action: q
APPENDIXD
EXAMPLES OF TIlE SYSTEM OPERATION
<>mantra
Hybrid Knowledge Representation System - 20 April 1989
Running under KCI (Kyoto Common Lisp) - 3 June 1987
Using CommonORBIT - 13 January 1988
To begin a section type (mantra).
>(hyb)
MANTRA - Version 3.0
Action: v
Action: Is
Input file : snet-test-O
Input expression:
••• Command of type STATEMENT for K:
• Definition In module SNET of a HIERARCHY:
[ORIGINAL-CLASSES: C2,
(ORIGINAL-HIERARCHIES: Hl]
DEFINE-HIERARCHY(H, HIERARCHY-UNION(Hl, DEFAULT(C1, C2)))
Primitive hierarchy Hl used inside a hierarchy definition...
Defining hierarchy H...
Hierarchy H depends on the primitive hierarchies : (Hl)
Declaring Cl as a primitive class .
Declaring C2 as a primitive class .
Declaring Hl as a primitive hierarchy...
cu
>Bye.
7.7u 6.0s 3:01 7% 104+368k 2+0io 557pf+Ow
<>
D.4. Semantic Networks
The semantic network module supports the redefmition of entities in the same way as the frame
module. In this section, we demonstrate this capability with an example similar to the example
Input expression:
presented in-the previous section. The file snet-test-O contains some definitions of classes and
••• Command of type STATEMENT for K:
• Definition in module SNET of a HIERARCHY:
[ORIGINAL-CLASSES; C3, Cl]
[ORIGINAL-HIERARCHIES: H2]
DEFINE-HIERARCHY(Hl, HIERARCHY-UNION(H2, EXCEPTION(C1, C3)))
Primitive hierarchy H2 used inside a hierarchy definition...
Defining hierarchy Hl ...
Hierarchy Hl depends on the primitive hierarchies : (H2)
Incomplete hierarchy Hl used inside a hierarchy definition ..
Incomplete hierarchy Hl used inside a hierarchy definition .
Declaring C3 as a primitive class...
Declaring H2 as a primitive hierarchy...
hierarchies. Its contents are the following:
;; Test for the redefinition of semantic nets
tell(k,to-snet(h :h= hl ++ c t --> c2))
tell(k,to-snet(hl :h= h2 ++ cl -1-> c3))
tell(k,to-snet(h2 :h= c3 _.> c4))
tell(k,to-snet(cl :k= cll + c12))
The file snst-test-t contains redefinitions of some of these entities, its contents are the
Input expression:
following:
;; Test for the redetlnitlon of semantic nets
tell(k,to-snet(hl :h= hh2 ++ ccl -1-> cc3))
tell(k,to-snet(hh2 :h= cc3 --> cc4))
tell(k,to-snet(cl :k= cct t + cc12))
In the example, these files are read one after the other, and the contents of the knowledge base
••• Command of type STATEMENT for K:
• Definition in module SNET of a HIERARCHY:
(ORIGINAL-CLASSES: C4, C3)
DEFINE-HIERARCHY(H2, DEFAULT(C3, C4))
Defining hierarchy H2...
Declaring C4 as a primitive class...
Input expression:
••• Command of type STATEMENT for K:
• Definition in module SNET of a CLASS:
[ORIGINAL-CLASSES: C12, Cl1)
arc shown each time a file is read.
- 215
- 216
EXAMPLES OF 11IE SYSTEM OPERA nON
APPENDIXD
1---1>
Kbase Option : s
Semantic Net Situation of Knowledge Base K
graph : #:GRAPH-995
em
Snet Option: sd
Enter entity name : h
[ORIGINAL-CLASSES: C2, Cl)
[ORIGINAL-HIERARCHIES: Hl)
[PRI-CLASSES : C2, C4, C3,
C12l
[DEF-CLASSES : en
(DEF-HIERARCHIES : Hl, H2)
DEFINE-HIERARCHY(H, HIERARCHY-UNION(HIERARCHY-UNION(Hl), DEFAULT(Cl, C2))) ==>
HIERARCHY-UNION(HIERARCHY-UNIONO, DEFAULT(Cl, C2), DEFAULT(C12, C2),
DEFAULT(Cll, C2), DEFAULT(C12: C2),
DEFAULT(Cll, C2), EXCEPTION(Cl, C3),
EXCEPTION(C12, C3), EXCEPTlON(Cll, C3),
EXCEPTION(C12, C3), EXCEPTION(Cll i C3),
EXCEPTION{C12, C3), EXCEPTION(Cll. C3),
DEFAULT(C3, C4))
.
===~===============
node : C2
Snet Option: sd
Enter entity name : h 1
[ORIGINAL-CLASSES: C3, cu
[ORIGINAL-HIERARCHIES: H2)
[PAl-CLASSES: C4, C3, en. C12)
[DEF-CLASSES : Cl)
[DEF-HIERARCHIES : H2)
DEFINE-HIERARCHY(Hl,
HIERARCHY-UNION(HIERARCHY-UNION(H2), EXCEPTlON(Cl, C3))) ==>
HIERARCHY-UNION(HIERARCHY-UNIONO, EXCEPTION(Cl, C3),
EXCEPTION(C12, C3),
EXCEPTION(Cll, C3),
EXCEPTION(C12, C3),
EXCEPTION(Cll, C3),
DEFAULT(C3, C4))
Action: pk
Knowledge base : k
Knowledge Base K
en.
EXAMPLES OF 11IE SYSTEM OPERATION
I • edge : DEFAULT
DEFINE-CLASS(Cl, CLASS-UNION(Cll, C12))
Primitive class C12 used inside a class definition .
Primitive class Cll used inside a class definition .
Defining class C1...
Class Cl depends on the primitive classes: (Cll C12)
Declaring Cll as a primitive class .
Declaring C12 as a primitive class .
Snet Option : all
Defined Classes: Cl
Primitive Classes: C12, en. C4, C3, C2
Defined Hierarchies: H2, Hl, H
Primitive Hierarchies :
Snet Option: sd
Enter entity name: c1
[ORIGINAL-CLASSES: C12, Cll)
[PRI-CLASSES : c u. C12)
DEFINE-CLASS(Cl, CLASS-UNION(C12, Cll)) ==> CLASS-UNION(C12,
APPENDIX D
node :Cll
I • edge : EXCEPTION
1---1> node : C3
I • edge : DEFAULT
1---1> node : C4
node: C12
I • edge : EXCEPTION
/---1> node : C3
node :Cl
1• edge : EXCEPTION
1---1> node : C3
Snet Option : sd
Enter entity name: h2
[ORIGINAL-CLASSES: C4, C3l
[PRI-CLASSES : C4, C3)
DEFINE-HIERARCHY(H2, HIERARCHY-UNION(HIERARCHY-UNIONO, DEFAULT(C3. C4))) ==>
HIERARCHY-UNION(HIERARCHY-UNIONO, DEFAULT(C3, C4))
===================
graph : #:GRAPH-1l89
graph : #:GRAPH-828
node: Cll
I • edge : EXCEPTION
1---1> node : C3
I
I' edge : DEFAULT
1 1---1> node : C4
I • edge : DEFAULT
1---1> node : C2
node: C12
I • edge : EXCEPTION
1---1;'. node : C3
I • edge : DEFAULT .
. 1---1> node : C2
node: Cl
I • edge : EXCEPTION
1---1> node : C3 .
node :C3
I • edge : DEFAULT
1---1> node : C4
Snet Option : q
Kbase Option : q
Action: Is
Input liIe : snet-test-1
Input expression:
••• Command of type STATEMENT for K:
• Definition in module SNET of a HIERARCHY:
[ORIGINAL-CLASSES: CC3, ccu
- 21R
EXAMPLES 01-'11-IESYSTEM OPERATION
APPENDIXD
[ORIGINAL-HIERARCHIES: HH2)
DEFINE-HIERARCHY(Hl, HIERARCHY-UNION(HH2, EXCEPTlON(CC1, CC3)))
Primitive hierarchy HH2 used inside a hierarchy definition ...
Redefining Hl
Defining hierarchy Hl ...
Hierarchy Hl depends on the primitive hierarchies: (HH2)
Incomplete hierarchy Hl used inside a hierarchy definition .
Incomplete hierarchy Hl used inside a hierarchy definition .
Declaring CCl as a primitive class .
Declaring CC3 as a primitive class .
Declaring HH2 as a primitive hierarchy ...
Input expression:
APPENDIXD
EXAMPLES OFTIIE SYSTEM OPERATION
[DEF-HIERARCHIES : Hl, HH2]
DEFINE-HIERARCHY(H, HIERARCHY-UNION(HIERARCHY-UNION(Hl), DEFAULT(C1, C2)))
HIERARCHY-UNION(HIERARCHY-UNIONO, DEFAULT(Cl, C2),
DEFAULT(CC12, C2),
DEFAULT(CC11, C2),
DEFAULT(CC12, C2),
DEFAULT(CCll, C2),
EXCEPTION(CC1,CC3),
DEFAULT(CC3, CC4))
==>
graph : #:GRAPH-1573
node:CCl
I " edge : EXCEPTION
1---1> node : CC3
I " edge : DEFAULT
1---1> node : CC4
node :CCll
I" edge: DEFAULT
1---1> node : C2
node :CC12
I " edge : DEFAULT
1---1> node : C2
node :Cl
I " edge : DEFAULT
1---1> node : C2
""" Command of type STATEMENT for K:
" Definition in module SNET of a HIERARCHY:
[ORIGINAL-CLASSES: CC4, CC3)
DEFINE-HIERARCHY(HH2, DEFAULT(CC3, CC4))
Defining hierarchy HH2...
Declaring CC4 as a primitive class...
Input expression:
""" Command of type STATEMENT for K:
" Definition in module SNET of a CLASS:
[ORIGINAL-CLASSES: CC12, CCll)
DEFINE-CLASS(C1, CLASS-UNION(CC11, CC12))
Primitive class CC12 used inside a class definition .
Primitive class CCll used inside a class definition .
Redefining Cl
Defining class C 1...
Class C 1 depends on the primitive classes: (CC11 CC12)
Declaring CC 11 as a primitive class .
Declaring CC12 as a primitive class .
Snet Option: ad
Enter entity name : h 1
[ORIGINAL-CLASSES: CC3, CC1)
[ORIGINAL-HIERARCHIES: HH2]
[PRI-CLASSES : CC4, CC3, CC1]
[DEF-HIERARCHIES : HH2)
DEFINE-HIERARCHY(Hl,
HIERARCHY-UNION(HIERARCHY-UNION(HH2), EXCEPTION(CC1, CC3))) ==>
HIERARCHY-UNION(HIERARCHY-UNIONO,EXCEPTlON(CC1, CC3), DEFAULT(CC3, CC4))
Action: pk
Knowledge base: k
Knowledge Base K
=====~====E========
graph: #:GRAPH-1472
Kbase Option : a
Semantic Net Situation of Knowledge Base K
Snet Option: all
Defined Classes: Cl
Primitive Classes: CC12, CC11, CC4, CC3, CC1, C12, C11, C4, C3, C2
Defined Hierarchies: HH2, H2, Hl, H
Primitive Hierarchies :
Snel Option: sd
Enter entity name : c 1
[ORIGINAL-CLASSES: CC12, CCll)
[PRI-CLASSES : CCll, CC12)
DEFINE-CLASS(Cl, CLASS-UNION(CC12, CCll)) ==> CLASS-UNION(CC12,
Snet Option : ad
Enter entity name: h
.[ORIGINAL-CLASSES : C2,
[ORIGINAL-HIERARCHIES: Hl)
[PRI-CLASSES : C2, CC4, CC3, CC1, CCll, CC12)
[DEF-CLASSES : Cl] .
en
- 219
node :CCl
I " edge : EXCEPTION
1---1> node : CC3
I " edge : DEFAULT
1---1> node : CC4
cern
Snet Option : ad
Enter entity name: h2
[ORIGINAL-CLASSES: C4, C3)
[PRI-CLASSES : C4, C3]
DEFINE-HIERARCHY(H2, HIERARCHY-UN!ON(HIERARCHY-UNIONO, DEFAULT(C3, C4)))
HIERARCHY-UNION(HIERARCHY-UNIONO, DEFAULT(C3, C4))
graph : #:GRAPH-828
node :C3
I " edge : DEFAULT
1---1> node : C4
- 220
==>
EXAMPLES OF TI-IE SYSTEM OPERA nON
APPENDIXD
Snel Oplion : q
Kba5e Oplion : q
Action: q
>Bye.
7.7u 6.Bs 3:59 6% 96+352k 1+Oio 597pf+Ow
<>
Finally, we present an example to demonstrate the particularities of the skeptical inheritance
strategy. This example also shows the use of the programming interface of the system. A Lisp file.
called snel-O.lsp containing calls to the Tell primitive is showed below. These Tell primitives define
seventeen hierarchies. presented in the paper A Skeptical Theory of Inheritance in Nonmonotonic
Semantic Networks (Horty et aI.• 1987). These hierarchies are a good survey of all the difficulties
that an inheritance reasoner must take into account.
Next a Lisp function called graph-Iesl is defined. This function uses the Ask primitive to
generate the complete theory of each of the hierarchies. A figure presenting the hierarchies in
diagramrnatical form is added to facilitate the understanding of the examples.
The contents of the file snet-O.lsp are the following:
(defvar gama '(gama-1 gama-2 gama-3 gama-4 gama-5 gama-6 gama-7 gama-B gama-9
gama-10 gama-11 gama-12 gama-13 gama-14 gama-15 gama-16 gama-17»
(Iell 'k (to-snet (define-hierarchy 'gama-1
(hierarchy-union
(default 'a 'p)
(default 'p 'q)
(default 'q 'r)))))
(IeII 'k (to-suet (define-hierarchy 'gama-2
(hierarchy-union
(default 'b 's)
(default's 'I)
(exception 'I 'u)))))
(te II 'k (to-snet (define-hierarchy 'gama-3
(hierarchy-union
(defaull 'a 'q)
(default 'a 'r)
(default 'q 'p)
(exception 'r 'p)))))
(tell 'k (to-snet (define-hierarchy 'gama-4
(hierarchy-union
(default 'a 'p)
(exception 'a 'p)))))
(Iell 'k (to-snet (define-hierarchy 'gama·5
(hierarchy-union
(default 'a 'p)
(default 'p 'q)
(default 'q. 'r)
(exception 'p 'r)))))
EXAMPLES OF THE SYSTEM OPERAnON
APPENDIX D
(Iell 'k (to-snet (define-hierarchy 'gama-6
(hierarchy-union
(defaull 'x 'p)
(defaull 'p 'y)
(default 'x 'q)
(defaull 'q 'r)
(exception 'r 'y»»))
(Iell 'k (to-snet (define-hierarchy 'gama-7
(hierarchy-union
(default 'x 'p)
(default 'p 'y)
(default 'x 'q)
(defaull 'q 'r)
(exception 'r 'y)
(defaull 'x 's)
(defaull 's 'I)
(default 'I 'u)
(exception 'u 'rIll»~
(Iell 'k (to-suet (define-hierarchy 'gama-B
(hierarchy-union
(defaull 'a 'q)
(default 'q 'pI»~))
(tell 'k (to-suet (define-hierarchy 'gama-9
(hierarchy-union
(default 'a 'q)
(defaull 'q 'p)
(exceplion 'a 'pI»~»~
(Iell 'k (to-suet (define-hierarchy 'gama-10
(hierarchy-union
(default 'a 'p)
(default 'p 'q)
(default 'q 'r)
(default 'r 's)
(exceplion 'q 's)))))
(Iell 'k (to-snet (define-hierarchy 'gama-11
(hierarchy-union
(default 'a 'p)
(default 'a
(defaull 'p 'q)
(default 'q 'r)
(default 'r 's)
(exception 'q 's»))))
'n
(Iell 'k (to-suet (define-hierarchy 'gama-12
(hierarchy-union
(defaull 'a 'p)
(default 'p 'q)
(default 'q 'r)
(default 'r 's)
(exceplion 'p 'rIll»~
(Iell 'k (to-suet (define-hierarchy 'gama-13
(hierarchy-union
- 222
EXAMPLES OF TIlE SYSTEM OPERAnON
APPENDIXD
APPENDIXD
(default 'a 'p)
(default 'p 'q)
(default 'q 'r)
(default 'q 's)
(default 'r 's)
(exception 'p 'r)))))
EXAMPLES OF TIlE SYSTEM OPERATION
(declare (special k-2))
(lei ()
(cond «ask 'k (from-snel (sub-class graph k-l k-2)))
(formal I "-8 ---> -8-%" k-l k-2)))
(cond «ask 'k (from-snel (not-sub-class graph k-l k-2)))
(formal I "-8 -1-> -8-%" k-l k-2)))))))))
(Ielt 'k (to-snet (define-hierarchy 'gama-14
(hierarchy-union
(defaull 'a 'p)
(detaun 'a 'r)
(default 'a's)
(default's 'I)
(default 'I 'q)
(exception 'p 'q)
(exception 'r 'I)))))
(Iell 'k (Io-snel (define-hierarchy 'gama-15
(hierarchy-union
(defaull 'a 'p)
(default 'p 'q)
(default 'p 'r)
(default 'q 's)
(exception 'r 's)
(exception 'a 'r)))))
(Ielt 'k (Io-snel (define-hierarchy 'gama-16
(hierarchy-union
(default 'x 'I)
(default 'I 'u)
(defaull 'x 'z)
(default 'z 'y)
(default 'x 'p)
(default 'p 'q)
(exception 'q 'r)
(exception 'r 'y)))))
The execution of the above file is presented in the following example:
<>mantra
Hybrid Knowledge Represenlalion 8yslem - 20 April 1989
Running under KCI (Kyolo Common Lisp) - 3 June 198?
Using CommonORBIT - 13 January 1988
To begin a section type (mantra).
(load "snet-O")
Loading snel-O.lsp
Finished loading snel-O.lsp
>
T
>(graph-test)
Theory of graph GAMA-l:
R ---> R
A ---> R
A ---> A
A ---> P
A --->
P ---> R
P ---> P
. -... ----. . ----. .
a
a
P --->
a
a
a
a
p
q
r
Fig. D.l. Hierarchy 1\
---> R
--->
(tell 'k (to-snat (define-hierarchy 'gama-l?
(hierarchy-union
(default 'x 'I)
(default 'I 'u)
(default 'x 'z)
(default 'z 'y)
(default 'x 'p)
(default 'p 'q)
(default 'x 'v)
(default 'v 'r)
(exceplion 'q 'r)
(exceplion 'r 'y)))))
Theory
U --->
U -1->
U -1->
U -1->
T -1->
U
T
T
--->
of graph GAMA-2:
U
T
B
8
b
s
. -...
B -1-> U
1
.
U
~.
B
B
(defun graph-I~sl ()
(dolisl (graph gama)
(declare (special graph))
(leI «classes (ask 'k (from-snel (describe-hierarchy 'pri-class graph)))))
(formal I "Theory of graph -8:-%" graph)
(dolisl (k-l classes)
(declare (speclat k-l))
(dolist (k-2 classes)
- 223 -
---> T
---> B
B ---> 8
----.
Fig. D.2. Hierarchy 12
8 -1-> U
8 ---> T
8 ---> 8
- 224
EXAMPLES OF TIIE SYSTEM OPERA nON
Theory of graph GAMA-3:
p ---> P
P -1-> R
p
•
/~
R-I-> P
R ---> R
A ---> R
A ---> A
A ---> Q
Q ---> P
Q ---> Q
APPENDIXD
q .",./. ,
APPENDIXD
EXAMPLES OF TIlE SYSTEM OPERAnON
Theory of graph GAMA-6:
y ---> Y
Y -1-> R
Y -1-> Q
R -1-> Y
R ---> R
P ---> Y
P ---> P
X ---> R
X ---> P
/.~.,
X ---> X
X ---> Q
a
i
p •
'"
a
Fig. D.3. Hierarchy
->
-1-> Y
Q ---> R
---> Q
a
r,
Fig. D.6. Hierarchy
Theory
P --->
P -1->
A --->
A -1->
A --->
of graph GAMA-4:
P
A
P
P
A
a
.~. p
~
Fig. DA. 'Hierarchy
r4
R
R
R
A
A
A
A
P
P
P
--->
-1->
-1->
-1->
R
A
P
R
A
P
--->
--->
-> Q
-r
-1-> R
--->
--->
Q --->
Q --->
P
Q
R
Q
Y ---> Y
Y -1-> R
Y -1-> Q
R -1-> Y
R ---> R
R -1-> U
a
. ----.. ----. . ----. .
a
p
q
r
~
Fig. D.5. Hierarchy
r,
r6
Theory of graph GAMA-7:
R -1-> S
R -1-> T
U -1-> R
U ---> U
P ---> Y
P ---> P
a -1-> Y
Theory of graph GAMA-5:
• q
x
Q
--->
--->
--->
--->
--->
--->
--->
/.~:+t-."
p -.
R
.
t
t
"'.~ .>
Q
X
Y
X
U
X
P
X
Q
X
X
X ---> S
X ---> T
S -1-> R
x
Fig. D.7. Hierarchy
S ---> U
S ---> S
S ---> T
T -1-> R
T ---> U
T ---> T
- 226
s
r7
EXAMPLES OF 11lE SYSTEM OPERAnON
APPENDIX 0
APPENDIX 0
EXAMPLES OF TIlE SYSTEM OPERAnON
Theory of graph GAMA-11:
S ---> S
S -1->
S -1->
S -1->
A -1->
A --->
A --->
. ---.. -. .
Theory of graph GAMA-8:
p ---> P
a
A ---> P
A ---> A
A ---> Q
o ---> P
q
p
rg
Fig. 0.8. Hierarchy
A
P
0
~,
S
A
P
:-0-0
A ---> 0
A ---> R
P -1-> S
P ---> P
0---> Q
P
--->
0
P ---> R
Theory
P --->
P -1->
A -1->
A --->
A --->
--->
0--->
o
o
a
of graph GAMA-9:
P
A
P
A
Q
P
a
q
o -1-> S
0---> 0
o ---> R
p
Fig. 0.11. Hierarchy rll
R ---> S
R ---> R
Theory of graph GAMA-12:
S
r9
Fig. 0.9. Hierarchy
A
A
A
A
---> S
---> A
---> P
---> 0
;-Q-:
p
-1-> R
P ---> P
P ---> 0
Theory of graph GAMA-10:
S --->
S -1->
S -1->
S -1->
A -1->
P -1-> R
o
S
A
P
Q
. ---.. -. . -. . -. .
a
S
A ---> A
A ---> P
A ---> Q
A ---> R
P -1-> S
P _Co> P
P ---> Q
P --->-R
0-1-> S
0---> Q
---> R
R ---> S
R ---> R
p
q
r
v
Fig. 0.10. Hierarchy
rIO
s
Fig. 0.12. Hierarchy
r12
Theory of graph GAMA-13:
S ---> S
A ---> S
A ---> A
A ---> P
n
;--0-:
A -1-> R
P --->
P --->
P --->
P -1->
--->
o --->
--->
R --->
o
o
S
P
p
0
R
S
0
R
S
R -1-> A
R -1-> P
R ---> R
- 227
r
---> S
"0 ---> 0
o ---> R
R ---> S
R -1-> A
R -1-> P
R ---> R
A ---> 0
o
q
Fig. 0.13. Hierarchy
- 22R
r 13
EXAMPLES OF TIlE SYSTEM OPERAnON
APPENDIXD
R
~-->
R
R -f->
A -f->
A --->
A --->
A --->
A --->
S --->
S --->
S --->
T --->
T -f->
T --->
T
Q
P
R
A
S
Q
S
T
Q
Y -l-» R
Q ---> Q
Q -I-» R
/0'0'
»: \
",rt.> 0
po,
s
a
R
. Theory of graph GAMA-15:
S _._> S
S -I-» R
-]->
S
R
A
S
R
A
P
--->
-I-»
_.. >
-f->
--->
--->
---> Q
._->
R
R -I-» Y
R -f-> Q
R
--->
R
Y·~.r
R -I-» X
R -l-» P
T
--->
T
u •
Z --.> Y
Z -_.> Z
X ._-> U
X ---> Y
X
X
X
X
P
P
P
---> T
--->
_._>
--->
-v->
-f->
--->
Theory
U --->
Y --->
Y -I-»
Y -I-»
q
-:->
z·
f••
X -_.> Q
Z
X
P
\q
f
T ---> U
X -t-. R
T
Fig. D.14. Hierarchy r14
R
R
R
A
A
A
A
A
P
P
P
EXAMPLES OF TIlE SYSTEM OPERATION
Theory of graph GAMA-16:
U ---> U
V ---> Y
Theory of graph GAMA-14:
Q ---> Q
Q -I-» P
Q -f-> A
P -f-> Q
P ---> P
APPENDIX D
_;
L-~·p
x
Fig. D.16. Hierarchy r16
Q
R
P
of graph GAMA-17:
U
Y
R
V
Q
Q
Q -f-> R
R -I-» Y
R -I-» Q
p
---> P
---> Q
Q ---> S
Q ---> Q
Fig. D.15. Hierarchy r15
Y.~
R ---> R
R -l-:»
T --->
T --->
Z -_.>
Z --->
P --->
P -l-»
P --->
X --->
X --->
X _._>
X --->
X --->
X _._>
X --->
X --->
V -l-»
V --->
V --->
NIL
P
U
u •
T
Y
f••
Z
Q
R
P
U
Y
r
f /\
'tl:·
v ./ q
.~
x
Q
Fig. D.17. Hierarchy r17
T
Z
P
X
V
Y
R
V
>Bye.
·230
p
EXAMPLES OF lHE SYSTEM OPERAnON
406.5u 512.55 14:55:40 1% 104+640k 27+3013io 31897pf+27w
<>
- 23\ .
APPENDIX D
REFERENCES
References
BITIENCOURT, G., A Four-Valued Semantics for Inheritance with Exceptions. Draft, July 17,
ANDERSON, J. and BOWER, "G., Human Associative Memory. Winston, Washington, D.C.,
1973.
BARR, A. and FEIGENBAUM, E.A. (Editors), The Handbook of Artificial Intelligence. Vol. I,
William Kaufmann Inc., Los Altos, California, 1981.
BELNAP, N.D., How a Computer Should Think. In "G. Ryle (Editor), Contemporary Aspects of
198ge.
BITIENCOURT, G., The MANTRA Reference Manual. Interner Bericht, Universitat Karlsruhe,
January 1990.
BOBROW, D.G. and WINOGRAD, T., An Overview of KRL, A Knowledge Represenuuion
Language. Cognitive Science, Vol. I, Num. I, pp. 3-46, 1977.
BOBROW, D.G. and STEFIK, M., The LOOPS Manual. Xerox Corporation, December 1983
Philosophy: Proceedings of the Oxford International Symposium", Oriel Press, pp. 30-56, 1975.
BELNAP, N.D., A Useful Four-Valued Logic. In "J.M. Dunn and G. Epstein (Editors), Modern
BOY de la TOUR, T. and CAFERRA, R., Proof Analogy in Interactive Theorem Proving: A
Uses of Multiple-Valued Logics", D. Reidel Pub. Co., 1977.
BITIENCOURT, G., Uma proposta de Extansdo da Linguagem LISP (A Proposal for a LISP
Method to Express and Use It via Second Order Pattern Matching. Proceedings of AAAI-85,
pp.95-99, 1985.
Language Extension). XI Serninario Integrado de Software e Hardware, Universidade Federal de
BRACHMAN, R.J., A Structural Paradigm for Representing Knowledge. Technical Report
Vicosa, julho de 1984 (Also Report INPE-3056-PRE/476, lnstituto de Pesquisas Espaciais, Sao
No. 3605, Bolt Beranek and Newman, Cambridge, Massachusetts, 1978.
Jose dos Campos, Brasil, abril de 1985).
BITIENCOURT, G., Integration of Graphical Tools in a Compurer Algebra System. In "Th. Beth
BRACHMAN, R.J. and SMITH, B. (Editors), Special Issue on Knowledge Representation.
and M. Clausen (Editors), Proceedings of the 4th International Conference on Applicable Algebra,
BRACHMAN, R.J., What IS-A Is and Isn't: An Analysis of Taxonomic Links. IEEE Computer
Error-Correcting Codes, Combinatorics and Computer Algebra (LNCS No. 307, Springer-Verlag,
pp. 13-24, February 1988)", held in Karlsruhe, FRG, September 1986.
BITfENCOURT, G., Representation des connaissances. Rapport de Recherche RR 735-I-IMAG 85
LIFIA, Laboratoire d'lnformatique Fondamentale et d'Intelligence Artificielle (LIFIA), Grenoble,
France, Septembre 1988a.
BITIENCOURT, G., A Unified Formalismfor Knowledge Representation. In "M.L. Emrich, Z.W.
Ras, L. Saitta and M.S. Phifer (Editors), Proceedings of the Third International Symposium on
SIGART Newsletter, No. 70, February 1980.
(Special Issue on Knowledge Representation), Vol. 16, No. 10, pp. 30-36, October 1983.
BRACHMAN, R.J., FIKES, R.E. and LEVESQUE, H.J., KRYPTON: A Functional Approach to
Knowledge Representation. IEEE Computer (Special Issue on Knowledge Representation),
Vol. 16, No. 10, pp. 67-73, October 1983.
BRACHMAN, R.J. and LEVESQUE, H.J., The Tractability of Subsumption in Frame-Based
Description Languages. Proceedings of AAAI-84, pp. 34-37,1984.
Methodologies for Intelligent Systems Colloquia Program, Torino, Italy, October 12-15, 1988",
BRACHMAN, R.J. and LEVESQUE, H.J., Readings in Knowledge Representation. Morgan
Kaufmann Publishers, Inc., Los Altos, CA, 1985.
pp. 111-121, ORNUDSRD-ll, Oak Ridge National Laboratory, 1988b.
BRACHMAN, R.J. and SCHMOLZE, J.G., An overview of the KL-ONE Knowledge
BITfENCOURT, G., A Unified Formalism for Knowledge Representation. Rapport de Recherche
RR 747-I-IMAG 87 LIFIA, Laboratoire d'lnformatique Fondarnentale et d'Intelligence Artificielle
(LIFIA), Grenoble, France, Octobre 1988c.
BITIENCOURT, G., A System to Aid in the Specification of Knowledge-Based Systems. In "J.
Hannu and L. Seppo (Editors), Proceedings of the Second Scandinavian Conference on Artificial
Intelligence", pp. 687-700, held in Tampere, Finland, 13-15 June, 1989a.
BITIENCOURT, G., A Hybrid System Architecture and its Unified Semantics. In "Z.W. Ras
(Editor), Proceedings of the Fourth International Symposium on Methodologies for Intelligent
Systems, Charlotte, N.C., October 12-14, 1989", pp. 150-157, North-Holland, 1989b.
BITIENCOURT, G., A Hybrid System Architecture and its Unified Semantics. Interner Bericht
Nr. 8-89, Universitat Karlsruhe, Juni 1989c.
BlTIENCOURT, G., A Four-Valued Semantics for a N-Valued Terminological Language In
"Proceedings of the Second International Symposium on Artificial Intelligence, Monterrey,
Mexico", October 23-27, I989d.
Representation System. Cognitive Science, Vol. 9, No.2, pp. 171-216, April-June, 1985.
BRACHMAN, R.J., GILBERT, V.P. and LEVESQUE, H.J., An Essential Hybrid Reasoning
System: Knowledge and Symbol Level Accounts of KRYPTON. Proceedings of IlCAI 9,
pp.532-539, 1985.
BRACHMAN, R.J., BORGlDA, A., McGUINNESS, D.L. and RESNICK, L.A., The CLASSIC
Knowledge Representation System, or KL-ONE: The Next Generation. In "Proceedings of the
Foundational Aspects of Semantic Networks Workshop, Catalina, 1989.
BROWN, J.S. and BURTON, R.R., Multiple Representation of Knowledge for Tutorial Reasoning.
In "D.G. Bobrow and A. Collins (Editors), Representation and Understanding: Studies in
Cognitive Science", Academic Press, New York, pp. 311-349, 1975.
BROWNSTON, L., FARREL, R., KANR, E. and MARTIN, N., Programming Expert Systems in
OPS-5. An Introduction to Rule-Based Programming. Addison Wesley, Reading, MA, 1985.
CALMET, J. and LUGIEZ, D., A Knowledge-Based System for Computer Algebra. SIGSAM
Notices, Vol. 21, No. I, 1987.
REFERENCES
REFERENCES
CALMET, J. and BlTTENCOURT, G., Bibliography on Expert Systems and their Methodology.
ERNST, G. and NEWELL, A., GPS : A Case Study in Generality and Problem Solving. Academy
Press, New York, 1969.
Interner Bericht NT. 4/88, Universitat Karlsruhe, Fakultat fiir Informatik, Mlirz 1988.
CALMET, J., TJANDRA, O. and BITTENCOURT, G., An Environment for Mathematical
ETHERINGTON, D.W., Finite Default Theories. M.Sc. Thesis, Department of Computer Science,
University of British Columbia, Vancouver, BC, 1982.
Knowledge Representation. Submitted to the "International Symposium on Design and
Implementation of Symbolic Computation Systems", to be held in Capri, Italy, April 10-12,
ETHERINGTON, D.W. and REITER, R., On Inheritance Hierarchies with Exceptions. Proceedings
of AAAI-83, pp. 104-108, 1983.
I990a.
CALMET, J., TJANDRA, O. and BITTENCOURT, G., A Framework for Representing Algebraic
ETHERINGTON, D.W., Reasoning with Incomplete Information: Investigations of Nonmonotonic
Knowledge Using a Hybrid Knowledge Representation System. Accepted for presentation in the
"Fourth International Symposium on Knowledge Engineering" to be held in Barcelona, Spain,
May I 990b.
CHANG, c.L. and LEE, R.C.T., Symbolic Logic and Mechanical Theorem Proving. Academic
Press, New York and London, 1973.
Reasoning. Ph.D. Dissertation, Department of Computer Science, University of British Columbia,
Vancouver, BC, 1986.
ETHERINGTON, D.W., A Semantics for Default Logic. Proceedings of IJCAI 10, pp. 495-498,
1987.
FAHLMAN, S.E., NETL: A System for Representing and Using Real-World Knowledge. The MIT
Press, Cambridge, MA, 1979.
CHARNIAK, E., A Common Representation for Problem-Solving and Language-Comprehension
Information. Artificial Intelligence, Vol. 16, No.3, pp. 225-255, 1981.
FAHLMAN, S.E., TOURETZKY, D.S. and Van ROGGEN, W., Cancellation in a Parallel Semantic
Network. Proceedings of IJCAI 7, pp. 257-263, 1981.
CHARNIAK, E. and McDERMOTT, D., Introduction to Artificial Intelligence. Addison-Wesley
Publishing Company, 1985.
FAIN, J., HAYES-ROTH, E, SOWIZRAL, H. and WATERMAN, D., Programming in ROSIE:
CLAYTON, B.D., ART Programming Primer. Report, Inference Corporation, Los Angeles,
~
California, 1984.
COOK, S.A., The Complexity of Theorem-Proving Procedures. Proceedings of the 3rd Annual ACM
Symposium on Theory of Computing, ACM, New York, pp. 151-158, 1971.
DAHL, O.J. and NYGAARD, K., SIMULA - An ALGOL-Based Simulation Language.
Communications of the ACM, Vol. 9, pp. 671-687, 1966.
DE SMEDT, K., Object-Oriented Programming in FLAVORS and CommonORBIT. In "R. Hawley
(Editors), Artificial Intelligence Programming Environments", Ellis Horwood Limited, pp. 157
176, 1987.
DELIY ANNI, A. and KOWALSKI, R.A., Logic and Semantic Networks. Communications of the
ACM, Vol. 22, No.3, pp. 184-192, March 1979.
DOHERTY, P., A Correspondence between Inheritance Hierarchies and a Logic of Preferential
Entailment. To appear in "Proceedings of the Porth International Symposium on Methodologies
for Intelligent Systems", Charlotte, N.C., October 1989.
DONINI, F.M. and LENZERINI, M., TermLog : A Logic for Terminological Knowledge. In "Z.W.
An Introduction by Means of Examples. Report N-1646-ARPA, Rand Corporation, February
1982.
FEIGENBAUM, E,A., BUCHANAN, B.G. and LEDERBERG, J., On Generality and Problem
Solving: A Case Study Using the DENDRAL Program. In "8. Meltzer and D. Michie (Editors),
Machine Intelligence", Vol. 6, pp. 165-190, 1971.
FIKES, R.E., HART, P.E. and NILSSON, N.J., Learning and Executing Generalized Robot Plans.
Artificial Intelligence, Vol. 3, No.4, pp. 251-288, 1972.
FIKES, R.E. and HENDRIX, G., A Network-Based Knowledge Representation and its Natural
Deduction System. Proceedings of UCAI 5, pp. 235-246, 1977.
FILM AN, R.E. and WEYHRAUCH, R.H., A FOL Primer. Standford Artificial Intelligence
Laboratory Memo AIM-228, Standford University, Standford, 1976.
FORGY, C.L. and McDERMOTT, J., OPS : A Domain Independent Production System.
Proceedings of IJCAI 5, pp. 933-939, 1977.
FRISCH, A.M., Using Model Theory to Specify Artificial Intelligence Programs. Proceedings of
IJCAI 9, pp. 148-154, 1985.
Ras and L. Saitta (Editors), Proceedings of the Third International Symposium on Methodologies
FRISCH, A.M., Inference without Chaining. Proceedings of IJCAI 10, pp. 515-519, 1987a.
for Intelligent Systems, Torino, Italy, October 12-15, 1988", pp. 408-417, North-Holland, 1988.
FRISCH, A.M., Knowledge Retrieval as Specialized Inference. Report No. 214, Department of
DOYLE, J., A Truth Maintenance System. Artificial Intelligence, Vol. 12, No.3, pp.231-272,
1979.
Computer Science, University of Rochester, May 1987b.
FURBACH, U., D1RLICH, G. and FREKSA, C; Towards a Theory of Knowledge Representation
EASTMAN, C.M., Representations for Space Planning. Communications of the ACM, Vol. 13,
Systems. In
"w. Bibel
and B. Petkoff (Editors), Artificial Intelligence: Methodology, Systems
and Applications", Elsevier Science Publishers B.V., North-Holland, ECCAI, pp. 77-84, 1985.
No.4, pp. 242-250, April 1970.
EASTMAN, C.M., Automated Space Planning. Artificial Intelligence, Vol. 4, No.1, pp. 41-64,
1973.
- 235
GALLIER, J.H., Logic for Computer Science, Foundations of Automatic Theorem Proving. Harper
& Row, Publishers, New York, 1986.
- 236
REFERENCES
GAREY, M.R. and JOHNSON, D.S., Computers and Intractability - A Guide to the Theory of NP
Completeness. W.H. Freeman and Company, New York, 1979.
GMD Forschungsgruppe Expertensysterne, BABYLON Kurzbeschreibung . Gesellschaff fiir
Mathematik und Datenverarbeitung mbH, 1988.
GOLDBERG, A. and ROBSON, D., Smalltalk 80, The Language and its Implementation. Addison
Wesley Publishing Company, Reading, MA, 1983.
GREEN, C.C., Theorem Proving by Resolution as a Basis for Question Answering. In "B. Meltzer
and D. Michie (Editors), Machine Intelligence 4", Edinburgh University Press, Edinburgh,
Scotland, 1969.
GUARINO, N., DRL : Terminologic and Relational Knowledge in Prolog. Proceedings of ECAI 8,
pp, 130-135, 1988.
HART, P.E., DUDA, R.O. and EINAUDI, M.T., PROSPECTO!! . A Computer-Based
Consultation System for Mineral Exploration. Mathematical Geology, Vol. IO;No. 5, 1978.
REFERENCES
LUCK, K. Von, OWSNICKI-KLEWE, B., New AI Formalisms for Knowledge Representation: A
Case Study. KIFS-87, Friihjahrsschule Kunstliche Intelligenz, Gunne, Western Germany, March
29 to April 5, 1987.
LUCK, K. Von, NEBEL, B., PELTASON, C. and SCHMIEDEL, A., The Anatomy of the BACK
System. TU-Berlin, KIT-Report No. 41, January 1987.
MacGREGOR, R. and BATES, R., The LOOM Knowledge Representation Language.
USCllnformation Sciences Institute, Technical Report ISI/RS-87-188, 1987.
MAES, P., Introspection in Knowledge Representation. Proceedings of ECAI 7, pp. 256-269,
Brighton, UK, 21-25 July 1986.
MARTELLI, A. and MONTANARI, U., An Efficient Unification Algorithm. ACM Transactions on
Programming Languages and Systems, Vol. 4, No.2, pp. 258-282, April 1982.
MARTI, J., HEARN, A.C and GRISS, C, Standard LISP Report. SIGPLAN Notices, Vol. 14,
No. 10, pp. 48-68, October 1979.
HAYES, P.J.,ln Defence of Logic. Proceedings of DCAI 5, pp. 559-565, 1977.
MATTOS, N.M., KRISYS - A Multi-Layered Prototype KBMS Supporting Knowledge
HORTY, J.F., TIIOMASON, R.H. and TOURETZKY, D.S., A Skeptical Theory of Inheritance in
Independence. Report 2/88, Zentrum Rechnergestiitzte Ingenieursysteme, Universitat
Kaiserslautem, Kaiserslautern, 1988.
McALLESTER, D.A., Reasoning Utility Package User's Manual. AI Memo 667, MIT Artificial
Nonmonotonic Semantic Nets. Technical Report CMU-CS-87-175, Computer Science
Department, Carnegie-Mellon University, Pittsburgh, PA, October 1987.
JOHNSON, S.c., Yacc: Yet Another Compiler Compiler. Computer Science Technical Report No.
32, Bell Laboratories, Murray Hill, New Jersey, 1975.
KAHN, G., NOWLAN, S. and McDERMOTT, J., A Foundation for Knowledge Acquisition.
Proceedings of the IEEE Workshop on Principles of Knowledge-Based Systems, IEEE Computer
Society, IEEE Computer Society Press, Silver Spring, 1984.
KOW ALSKI, R.A., Contribution to SIGART Newsletter No. 70. Special Issue on Knowledge
Representation, February 1980.
KUNZ, LC., KEHLER, T.P. and WILLIAMS, M.D., Applications Development Using a Hybrid
Artificial Intelligence Development System. The Artificial Intelligence Magazine, Vol. 5, No.3,
Fall 1984.
LAURIERE, J.-L., Representation et utilisation des connaissances. je partie: Les systemes experts.
Technique et Science lnformatique, Vol. I, No. I, pp, 25-42, No.2, pp. 109-133, 1982.
LENAT, D.B. and McDERMOTT, J., Less than General Production Systems Architectures.
Proceedings of lJCAI 5, pp. 928-932, 1977.
LESK, M.E., Lex - A Lexical Analyzer Generator. Computer Science Technical Report No. 39, Bell
Laboratories, Murray Hill, New Jersey, October 1975.
LEVESQUE, H.J., A Logic of Implicit and Explicit Belief. Proceedings of AAAI 84, pp. 198-202,
1984a.
LEVES'QUE, H.J., Foundations of a Functional Approach to Knowledge Representation. Artificial
Intelligence, Vol. 23; pp. 155-212, 1984b.
LEVESQUE, H.J., Making Believers out of Computers. Artificial Intelligence, Vol. 30, pp. 81
108, October 1986.
Intelligence Laboratory, April 1982.
McCALLA, G. and CERCONE, N., Approaches to Knowledge Representation (Guest Editors'
Introduction). IEEE Computer (Special Issue on Knowledge Representation), Vol. 16, No. 10,
pp. 12-16, October 1983.
McCARTIIY, J. and HAYES, P.J., Some Philosophical Problems from the Standpoint of Artificial
Intelligence. In "D. Michie and B. Meltzer (Editors), Machine Intelligence 4", Edimburgh
University Press, Edimburgh, GB, pp. 463-502, 1969.
McDERMOTT, D., Tars/dan Semantics, or No Notation Without Denotation. Cognitive Science,
Vol. 2, No.3, pp.277-282, July-September 1978.
McDERMOTT, J., Rl : A Rule-Based Configurer of Computer Systems. Artificial Intelligence, Vol.
19, No. I, pp. 39-88, September 1982.
McSKIMIN, J.R. and MINKER, J., The Use of a Semantic Network in a Deductive Question
Answering System. Proceedings of IJCAI 5, pp. 50-58, 1977.
MICHALSKI, R.S. and BASKIN, A.B., Integrating Multiple Knowledge Representations and
Learning Capabilities in an Expert System: The ADVISE System. Proceedings of IJCAI 9,
pp.256-258, 1983.
MINSKY, M.L. and PAPERT, S.A., Perceptrons: An Introduction to Computational Geometry.
M.LT. Press, 1969.
MINSKY, M.L., A Framework to Represent Knowledge. The Psychology of Computer Vision,
McGraw-Hill, pp. 211-277, 1975.
MOON, D., MacL/SP Reference Manual, Revision O. M.l.T. Project MAC, Cambridge,
Massachusetts, April 1974.
- 238
REFERENCES
MOON, D.A., STALLMAN, R. and WEINREB, D., LISP Machine Manual, Fifth Edition. M.I.T.
REFERENCES
PATEL-SCHNEIDER, P.F., A Decidable First-Order Logic for Knowledge Representation.
MOON, D.A., Object-Oriented Programming with Flavors, ACM SIGPLAN, Vol. 21, No. 11,
Proceedings of IJCAI 9, pp. 455-458, 1985 (also AI Technical Report Number 45, Schlumberger
Palo Alto Research, 1985).
pp. 1-8, November 1986. (Also in Proceedings of the ACM Conference on Object-Oriented
PATEL-SCHNEIDER, P.F., A Hybrid, Decidable, Logic-Based Knowledge Representation System.
Artificial Intelligence Laboratory, Cambridge, Massachusetts, January 1983.
Systems, Languages and Applications, Portland, Oregon, September 1986).
MOORE, R.C., The Role of Logic in Knowledge Representation and Commonsense Reasoning.
Proceedings of AAAI-82, pp. 428-433, 1982.
MORAN, T.P., The Symbolic Nature of Visual Imagery. Proceedings of IJCAI 3, pp. 472-477,
1973.
MOSES, J., Algebraic Simplification: A Guide for the Perplexed. Communications of the ACM,
Vol. 14, No.8, pp. 527-537, August 1971.
MYLOPOULOS, J., An Overview of Knowledge Representation. Proceedings of the Workshop on
Data Abstraction, Databases and Conceptual Modeling, Pingree Park, Colorado, pp. 5-12, June
23-26, 1980.
NEBEL, B. and LUCK, K. Von, Issues of Integration and Balancing in Hybrid Knowledge
Technical Report No. 49, Schlumberger Palo Alto Research Center, July 1986a.
PATEL-SCHNEIDER, P.F., A Four-Valued Semantics for Frame-Based Description Languages.
Proceedings of AAAI-86, pp. 344-348, 1986b.
PATEL-SCHNEIDER, P.F., A Four-Valued Semantics for Terminological Logics. Artificial
Intelligence, Vol. 38, pp. 319-351, 1989a.
PATEL-SCHNEIDER, P.F., Undecidability of Subsumption in NIKL. Artificial Intelligence,
Vol. 39, pp.263-272, 1989b.
POESIO, M., The QUARK Reference Manual. Memo Nr. 22, Universitat Hamburg, Juni 1988.
POST, E., Formal Reductions of the General Combinatorial Problem. American Journal of
Mathematics, Vol. 65, pp. 197-268, 1943.
PRATT, T.W. and FRIEDMAN, D.P., A Language Extension for Graph Processing and its Formal
Semantics. Communications of the ACM, Vol. 14, Num. 7, pp. 460-467, July 1971.
Representation Systems. Proceedings of the 11th German Workshop on Artificial Intelligence, K.
Morik (Editor), Geseke, pp. 115-123, September-October 1987.
NEBEL, B., Computational Complexity of Terminological Reasoning in BACK. Artificial
Intelligence, Vol. 34, pp. 371-383, 1988.
NEBEL, B. and LUCK, K. Von, Hybrid Reasoning in BACK. In "Z.W. Ras and L. Saitta
(Editors), Proceedings of the Third International Symposium on Methodologies for Intelligent
Systems, Torino, Italy, October 12-15, 1988", pp. 260-269, North-Holland, 1988.
NEWELL, A. and SIMON, H.A., Computer Science as Empirical Inquiry : Systems and Search.
Communications of the ACM, Vol. 19, No.3, pp. 113-126, March 1976.
NEWELL, A., Physical Symbol Systems. Cognitive Science, Vol. 4, pp. 135-183, 1980.
NIl, H.P. and AIELLO, N., AGE (Attempt to Generalize) : A Knowledge-Based Program for
Building Knowledge-Based Programs, Proceedings of IJCAI 6, pp. 645-655, 1979.
NILSSON, N.J., Principles of Artificial Intelligence. Springer-Verlag, Berlin, Heidelberg, New
York, 1982.
PATEL-SCHNEIDER, P.F., Small Can Be Beautiful in Knowledge Representation. In "Proceedings
ROBINSON, J.A., A Machine-Oriented Logic Based on the Resolution Principle. Journal of the
ACM, Vol. 12, No. I, pp. 23-41, January 1965.
of the IEEE Workshop on Principles of Knowledge-Based Systems", pp. 11-19, Denver,
RUMELHART, D.E. and NORMAN, D.A., The Active Structural Networks. In "D.A. Norman and
Colorado, December 1984 (also AI Technical Report Number 37, Schlumberger Palo Alto
QUILLIAN, M.R., Semantic Memory. In "M.L. Minsky (Editor), Semantic Information
Processing", pp. 216-270, M.LT. Press, Cambridge, MA, 1968.
REITER, R., A Logic for Default Reasoning. Artificial Intelligence, Vol. 13, No. 1-2, pp. 81-132,
April 1980.
RICH, C., SHROBE, H.E. and WATERS, R.C., An Overview of the Programmer's Apprentice.
Proceedings of IJCAI 6, 1979.
RICH, c., Knowledge Representation Languages and Predicate Calculus: How to Have Your Cake
and Eat It Too. Proceedings of AAAI-82, pp. 193-196, 1982.
RICH, C., The Layered Architecture of a System for Reasoning about Programs. Proceedings of
IJCAI 9, pp. 540-546, 1985.
ROBERTS, R.B. and GOLDSTEIN, LP., The FRL Manual. AI Memo No. 409, MIT, Artificial
Intelligence Laboratory, Cambridge, MA, 1977.
D.E. Rumelhart (Editors), Explorations in Cognition", W.H. Freeman, San Franscisco, 1975.
PATEL-SCHNEIDER, P.F., BRACHMAN, R.J. and LEVESQUE, H.J., ARGON: Knowledge
RUMELHART, D.E. and McCLELLAND, J. (Editors), Parallel Distributed Processing. M.I.T.
Press, 1986.
Representation Meets Informal Retrieval. In "Proceedings of the First Conference on Artificial
SANDEWALL, E., Nonmonotonic Inference Rules for Multiple Inheritance with Exceptions.
Research, October 1984).
Intelligence Applications", Denver, Colorado, December 1984 (also Fairchild Technical Report
Number 654 and FLAIR Technical Report Number 29, September 1984).
Proceedings of the IEEE, Vol. 74, pp. 1345-1353, 1986. .
SCHANK, R.C. and ABELSON, R.P., Scripts, Plans and Knowledge. Proceedings of IJCAI 4,
pp. 151-1.57, 1975.
- 239
- 240
REFERENCES
REFERENCES
SCHANK, R.C. and ABELSON, R.P., Scripts, Plans, Goals and Understanding. Laurence
Ealbaum Associates Inc., Milesdale, N.J., 1977.
STICKEL, M.E., A Nonclausal Connection-Graph Resolution T~eorem-Proving Program.
SCHANK, R.C. and RIEGER III, C.J., Inference and the Computer Understanding of Natural
STOCK, O. and CASTELFRANCHI, C., Ingredients for KRAPFEN,
language. In "R.I. Brachman and H.J. Levesque (Editors), Readings in Knowledge
Representation", Morgan Kaufmann Publishers, Inc., Los Altos, CA, 1985.
SCHEIDHAUER, R. and SEUL, G., TENUA, A Test Environment for Unification Algorithms.
Universitat Kaiserslautern, FB Informatik, Bericht Nr. SWP-88-03, 1988.
SCHMIDT-SCHAUB, M., Subsumption in KL-One is Undecidable. SEKI Report SR-88-14,
Artificial Intelligence Laboratories, Fachbereich Informatik, Universitat Kaiserslautem, 1988.
SCHUBERT, L., PAPALASKARIS, M.A., TAUGHER, J., Determining Type, Part, Color and
Time Relationships. IEEE Computer (Special Issue on Knowledge Representation), Vol. 16,
No. 10, pp. 53-60, October 1983.
SHANNON, C.E., Programming a Computer for Playing Chess. Philosophical Magazine, Series 7,
Vol. 41, pp. 256-275, 1950.
SHORTLIFFE, E.H., Computer-Based Medical Consultations: MYCIN. American Elsevier, New
York, 1976.
SLOMAN, A.,lnteracrions Between Philosophy and Artificial Intelligence. Artificial Intelligence,
Vol. 2, pp.209-225, 1971.
Proceedings of AAAI-82, pp. 229-233, 1982.
A Tasty Knowledge
RepresentationApparatus. Draft 1989.
STOY, J.E.,Denotational Semantics. M.LT. Press, 1977.
TARSKI, A., Der W~hrheitsbegriff in den formalisierten Sprachen. Studia Philosphia, Vol. I,
No. 261, 1936.
TARSKI, A., The Concept of Truth in Formalized Languages. In "A. Tarski (Editor), Logic
Semantics and Mathematics, Oxford, Clarendon Press, 1956.
TEITELMAN, W. et a1.,lnterUSP Reference Manual. Xerox Palo Alto Research Center, Palo Alto,
California, 1978.
THOMASON, R.H., HORTY, J.F. and TOURETZKY, D.S., A Calculus for Inheritance in
Monotonic Semantic Nets. Technical Report CMU-CS-86-138, Computer Science Department,
Carnegie-Mellon University, Pittsburgh, PA, 1986.
TOURETZKY, D.S., Implicit Ordering of Defaults in Inheritance Systems. Proceedings of AAAI
84, pp. 322-325, 1984.
TOURETZKY, D.S., The Mathematics of Inheritance Systems. Morgan Kaufmann Publishers, Los
Altos, CA, 1986.
SLOMAN, A., Why We Need Many Knowledge Representation Formalisms. In "M. Bramer
TOURETZKY, D.S., HORTY, J.F. and mOMASON, R.H., A Clash of Intuitions: The Current
(Editor), Research and Development in Expert Systems", Cambridge University Press,
State of Nonmonotonic Multiple Inheritance Systems. Proceedings of IJCAI 10, pp, 476-482,
1987.
TURING, A., Computing Machinery and Intelligence. Mind, Vol. 59, No. 236, pp.433-46O,
1950.
VIGOUROUX, J.-R., KYACC-KLEX, The Integration of LEX-YACC into Kyoto Common Lisp.
Cambridge, UK, 1985.
SMITH, B.C., Prologue to "Reflection and Semantics in a Procedural Language". In "R.I.
Brachman and H.J. Levesque (Editors), Readings in Knowledge Representation", pp. 31-40,
Morgan Kaufmann Publishers, Inc., Los Altos, CA, 1985.
SMOLKA, G. and AIT-KACI, H., Inheritance Hierarchies: Semantics and Unification. MCC
Personal Communication, 1988.
Technical Repon No. AI-057-87, Microelectronics and Computer Technology Corporation,
1987.
VILAIN, M., The Restricted Language Architecture of a Hybrid Representation System. Proceedings
SMOLKA, G., A Feature Logic with Subsorrs. Proceedings of the Workshop on Unification
WATERMAN, D.A., PAS-II Reference Manual. Computer Science Department Report, Carnegie
Formalisms - Syntax, Semantics and Implementation, Titisee, West Germany, April 1988a (also
in: LILOG Report 33, May 1988).
SMOLKA, G., Logic Programming with Polymorphically Order-Sorted Types. In "Proceedings of
the First International Workshop on Algebraic and Logic Programming, Gaussig, German
Democratic Republic, November 14-18", Springer-Verlag, 1988b.
STEELE Jr., GL and SUSSMAN, G.I., The Revised Report on Scheme: A Dialect of Lisp. AI
Memo 452, M.I.T. Artificial Intelligence Laboratory, Cambridge, Massachusetts, January 1978.
STEELE Jr., G.L., Common USP, Digital Press, Burlington, 1984.
STERLING, L. and SHAPIRO, E., The Art of Prolog. M.LT. Press Series in Logic Programming,
of IJCAI 9, pp. 547-551, 1985.
Mellon University, June 1973.
WEINREB, D. and MOON, D., Flavors: Message Passing in Lisp Machine. AI Memo 602, M.LT.
Artificial Intelligence Laboratory, Cambridge, Massachusetts, 1980.
WINSTON, P.H., Learning Structural Descriptions from Examples. In "P. Winston (Editor), The
Psychology of Computer Vision", McGraw Hill, New York, 1975.
WINSTON, P.H., Learning and Reasoning by Analogy. Communications of the ACM, Vol. 23,
No. 12, pp. 689-703, December 1980.
WINSTON, P.H., Artificial Intelligence (2f1d Edition). Addison-Wesley Publishing Company,
Reading, Massachusetts, 1984.
Cambridge, MA, London, England, 1986.
242
REFERENCES
WOODS, W.A., What's in a Link: Foundations for Semantic Networks. In "D.G. Bobrow and A.
Collins (Editors), Representation and Understanding: Studies in Cognitive Science", Academic
Press, New York, 1975.
YEN, J., NECHES, R. and MacGREGOR, R., Using Terminological Models to Enhance the Rule
Based Paradigm. In "Proceedings of The Second International Symposium on Artificial
Intelligence", Monterrey, Mexico, October 23-27, 1989.
YUASA, T. and HAGIY A, M., Kyoto Common Lisp Report. Research Institute for Mathematical
Sciences, Kyoto University, Teikoku Insastu Inc., 1985.
ZEIGLER, B.P., Knowledge Representation from Newton to Minsky and Beyond. Applied Artificial
Intelligence, Vol. I, No. I, pp. 87-107, 1987.
- 243
INDEX
Index
Directed Graphs 6
Abstract Data Type 61, 72, 98, 110
Acquisition of Knowledge 12
Alpha-Beta 13
Analogical Reasoning 15
AND/OR Graph Search 13
Approximation Lattice 51
Assertional Box 24
Assenional Module 63, 75, 133
Balancedness 26
Bipolar 68
Blind Search 13
Body of Knowledge II
Bound variables 38
Breadth First 13, 69
Classes 91
Client 117, 126
Combinatorial Explosion 10
Common Pan 121
Compactification 121
Compiler Generator 118
Complete Lattice 51
Complete Proof Systems 40
Completeness 18
Completeness Theorem 40
Concept 24, 41, 66, 83
Conflict Resolution 22, 72, III
Connectionist Model 10
Consequent 46
Continuous Function 51
Credibility 17
Credulous Inheritance 69, 96
Default 91
Default Logic 45
Default Theory 46
Definitions 62
Degree of an Inheritance Path 49
Depth First 13, 69
Description Primitives 75
Entailment 55
Environment Function 38, 42, 76, 84, 92
Epistemic State 57
Epistemological Adequacy 16
Epistemological Level 63, 75
Exception 91
Expert System 22
Expert System Shell 22, 23, 138
Explicitness 17
Extended Model Function 94
Extension 47
Extension Function 38,42, 59,76,84,92
Facets 21
First-Order Logic 36, 46, 63,68, 120
Flow Control 72, III
Formal Reasoning 14
Four-Valued Semantics 50,102
frame 66
Frame Module 66, 83, 134
Frame Situation 84, 101
Frames 21
Free Variables 38
Frontier 121
Functional Approach 24
Generalized Path 49
Grain Size 17
Hash Table 125, 133, 134, 135
Heuristic Adequacy 17
Heuristic Level 72, 110
Hierarchies 91
Homogeneous 68
Hybrid System 29, 67, 115
Inference Rule 18, 64
Inferential Distance 48
Inheritance 20, 21, 45, 68
Inheritance Path 49
Interaction 102, 123, 136
Interactive Interface 127
INDEX
INDEX
Justification 46
Occur-Check 122
Knowledge Base 11,61,70, 100, 110, 125
Ordered Search 13
Knowledge Level 24
Pattern-Matching 13, 120
Knowledge Representation II
Perceptrons 10
Knowledge Representation Hypothesis 10
Physical Symbol System 1
Knowledge Reuieval64
Physical Symbol System Model 10
Lexical Analyzer 118
Plan Diagrams 28
Linear Syntax 35
Positive Extension 76
Logic 18,56
Positive Link 49, 95
Logical Formalism 24
Positive Model 58, 92
Logical Level 70, 100
Positive Path 49, 95
Logical Situation 76, 101 .
Post Systems 22
Logical Structure 38
Preemption 49
Manipulation Primitives 75
Prerequisite 46
Matching 22
Procedural Attachment 21
Meta-Knowledge 18
Procedural or Declarative Representation 17
Meta-Level Reasoning 15
Procedural Reasoning 14
Mini-Max 13
Production Rules 22, 110
Minimum Mutilation 58
Production System 22, 72, 1 10
Model 39, 76
Programming Interface 131
Model Theory 18
Proof Theory 18
Model-Theoretic Semantics 5
Prototype 117, 125
Modularity 17
Provability 18
Module Access Primitive 62, 70, 100, 103
Question Primitives 75
Modus Ponens 14,56,64,68,79, 102
Questions 62
Most General Unifier 121
Ranked Alphabet 33, 120
Multiequation 121
Reasoning 12
Multiple Inheritance 68
Reasoning Guided by Expectations 21
Multiple Representation 23
Recognition-Action 22
Multiterm 122
Reduction 121
N-Place Relation 66, 83
Relation 83
Negative Extension 76
Resolution 120
Negative Link 49,95
Role 24, 41, 66, 83
Negative Model 58,92
Satisfaction 39,60
Network.49
Scripts 21
Non-Temrinal35
Search 12, 68
Nonmonotonic 68, 96, 97,98
Semantic Actions 118
Normal Default 46
Semantic Memory 20
Object-Oriented 68,115,117,125
Semantic Network 19,45,135
INDEX
Semantic Network Module 68, 91
Semantic Network Situation 92, 93, 102
Seminonnal Default 46
Shortest Path 69
Signature 33
Skeptical Inheritance 50, 69, 97
Slots 21
Specialization and Generalization 15
Subclass91,105,106,136
Substitution 120
Subsumption 21,43,66, 103, 106, 129, 134
System of Multiequations 121
T-entailment 64, 80, 103, 105, 133
T-Equivalence 80
Tarskian Semantics 36, 58, 76
Tautology 18,78
. Term Algebra 34, 38
Terminological Box 24
Terminological Language 21, 41, 66
Terminological Structure 42
Terminology 24,41,66
TF-Entailment 80
Truth 18
Truth Maintenance System 27
Truth Value 18,52,77
Undecidability of Validity 41
Unification 120
Unification Algorithm [4
Validity [8,39
Variable Map 38
Weak Logic 50, 77
© Copyright 2025 Paperzz