13 Individuals and Relations

13.2 Symbols and Semantics

The basic idea behind the use of logic (see Chapter 5) is that, when knowledge base designers have a particular world they want to characterize, they can select that world as an intended interpretation, select meanings for the symbols with respect to that interpretation, and write, as clauses, what is true in that world. When a system computes a logical consequence of a knowledge base, a user that knows the meanings of the symbols can interpret this answer with respect to the intended interpretation. Because the intended interpretation is a model, and a logical consequence is true in all models, a logical consequence must be true in the intended interpretation. This chapter expands the language of propositional definite clauses to allow reasoning about individuals and relations. Atomic propositions now have internal structure in terms of relations and individuals.

Figure 13.1: The role of semantics. The meaning of the symbols are in the user’s head. The computer takes in symbols and outputs symbols. The output can be interpreted by the user according to the meaning the user places on the symbols.
Example 13.2.

Figure 13.1 illustrates the general idea of semantics with individuals and relations. The person who is designing the knowledge base has a meaning for the symbols. The person knows what the symbols kim, r123, and in refer to in the domain and supplies a knowledge base of sentences in the representation language to the computer. These sentences have meaning to that person. She can ask queries using these symbols and with the particular meaning she has for them. The computer takes these sentences and queries, and it computes answers. The computer does not know what the symbols mean. However, the person who supplied the information can use the meaning associated with the symbols to interpret the answer with respect to the world.

The mapping between the symbols in the mind and the individuals and relations denoted by these symbols is called a conceptualization. In this chapter, we assume that the conceptualization is in the user’s head, or written informally, in comments. Making conceptualizations explicit is the role of a formal ontology.

Relationships to Traditional Programming Languages The notion of logical semantics presented in this chapter should be contrasted with the procedural semantics of traditional programming languages like Fortran, C++, Lisp, Java or Python. The semantics for these languages specify the meaning of the language constructs in terms of what the computer will compute based on the program. This corresponds more closely to the proof theory presented here. Logical semantics gives a way to specify the relationships of the symbols to the world, and a way to specify the result of a program independently of how it is computed. The definitions of semantics and reasoning theory correspond to the notions of a Tarskian semantics and proof in mathematical logic. Logic allows us to define knowledge independently of how it is used. Knowledge base designers or users can verify the correctness of knowledge if they know its meaning. People can debate the truth of sentences in the language. The same semantics can be used to establish the correctness of an implementation. One of the advances of logic programming was showing that logic could be given a procedural semantics, to hopefully give us the best of both worlds. The notion of an individual is similar to the definition of an object in object-oriented languages such as Smalltalk, C++, or Java. The main difference is that the objects in object-oriented languages are computational objects rather than real physical objects. In an object-oriented language, a “person” object is a representation of a person; it is not the actual person. However, in the representation and reasoning systems considered in AI, the name “Chris” can denote an actual person. In object-oriented languages, objects send each other messages. In the logical view, not only do we want to interact with objects, but we also want to reason about them. We may want to be able to predict what an object will do without getting the object to do it. We may want to predict the internal state from the observed behavior, for example, in a diagnostic task. We even want to reason about, and predict the behavior of, individuals who may be deliberately concealing information and may not want us to know what they are doing. For example, consider a “person” object: although there can be some interaction with the person, there is often much information about a person that you do not know. Because you cannot keep asking them for the information (which they may not know or may not want to tell you), you require some external representation of the information about that individual. It is even harder to interact with a chair or a disease, but we still may want to reason about them. Programming language facilities often make assumptions about designed objects that are not appropriate for real objects. For example, in Java, objects have to fit into a single class hierarchy, whereas real-world individuals may have many roles and be in many classes; it is the complex interaction of these classes that specifies the behavior.

What is the correct answer is defined independently of how it is computed. The correctness of a knowledge base is defined by the semantics, not by a particular algorithm for proving queries. As long as an inference algorithm is faithful to the semantics, it can be optimized for efficiency. This separation of meaning from computation lets an agent optimize performance while maintaining correctness.