[an error occurred while processing this directive]


A brief introduction to the knowledge interchange format

Finin, Labrou and Mayfield

We need languages for describing things in computers. Natural languages such as English and Japanese are very powerful for building descriptions but the meaning of a natural language statement is not always clear and subject to different interpretations. (This is one reason we have lawyers). Many computer languages and systems have been built whose purpose is to define and describe things and situations.

Specialized languages have been developed which are particularly good at describing certain fields. For example, STEP (Standard for the Exchange of Product Model Data) is an ISO standards project to develop mechanisms for the representation and exchange of a computerized model of a product in a neutral form. The goal is to enable a product representation to be exchanged without any loss of completeness or integrity. SGML is an example of a language which is designed to describe the logical structure of a document. There are special languages for describing workflow, processes, chemical reactions, etc.

It would be nice if there were some expressive languages and related computer systems which were good at representing a very broad range of things, like the natural languages, but which do not suffer the problems of imprecision and ambiguity. Database systems and their languages (e.g., SQL, OQL) offer one general approach and certain object-oriented languages perhaps offer another. However, it is difficult or impossible to capture all kinds of information and knowledge in most of these general languages.

One of the general tools which mathematicians have developed for describing things is logic. Going back to Wittgenstein, many mathematicians, philosophers and computer scientists have tried to use symbolic logic to clearly and unambiguously define and describe of things and situations of interest. Rather simple logics (e.g. the first order predicate calculus) turn out to be very powerful in terms of the kinds of things with which they can be used to describe. Some mathematicians and computer scientists (e.g., Stanford's John McCarthy) argue that a relatively simple logic is sufficient to express anything of interest or utility to people and other intelligent agents -- simple concrete facts, definitions, abstractions, inference rules, constraints, meta-knowledge (knowledge about knowledge), etc.

KIF, a particular logic language, has been proposed as a standard to use to describe things within computer systems, e.g. expert systems, databases, intelligent agents, etc. Moreover, it was specifically designed to make it useful as an "interlingua". By this we mean a language which is useful as a mediator in the translation of other languages. For example, people have built translation programs that can map a STEP/PDES expression into an equivalent KIF expression and vice versa. If we had another language for electronic commerce, say MSEC, we could develop a translator to and from KIF. We would then have a way to translate between STEP/PDES and MSEC using KIF ans an intermediate representation.

KIF is a prefix version of first order predicate calculus with extensions to support non--monotonic reasoning and definitions. The language description includes both a specification for its syntax and one for its semantics. First and foremost, KIF provides for the expression of simple data. For example, the sentences shown below encode 3 tuples in a personnel database (arguments stand for employee ID number, department assignment and salary, respectively):

    (salary 015-46-3946 widgets 72000)
    (salary 026-40-9152 grommets 36000)
    (salary 415-32-4707 fidgets 42000)

More complicated information can be expressed through the use of complex terms. For example, the following sentence states that one chip is larger than another:

     (> (* (width chip1) (length chip1)) 
        (* (width chip2) (length chip2)))

KIF includes a variety of logical operators to assist in the encoding of logical information (such as negation, disjunction, rules, quantified formulas, and so forth). The expression shown below is an example of a complex sentence in KIF. It asserts that the number obtained by raising any real--number ?x to an even power ?n is positive:

  (=> (and (real-number ?x) 
           (even-number ?n)) 
      (> (expt ?x ?n) 0))

KIF provides for the encoding of knowledge about knowledge, using the backquote (`) and comma (,) operators and related vocabulary. For example, the following sentence asserts that agent Joe is interested in receiving triples in the salary relation. The use of commas signals that the variables should not be taken literally. Without the commas, this sentence would say that agent joe is interested in the sentence (salary ?x ?y ?z) instead of its instances.

    (interested joe `(salary ,?x ,?y ,?z))

KIF can also be used to describe procedures, i.e., to write programs or scripts for agents to follow. Given the prefix syntax of KIF, such programs resemble Lisp or Scheme. The following is an example of a three-step procedure written in KIF. The first step ensures that there is a fresh line on the standard output stream; the second step prints "Hello!" to the standard output stream; the final step adds a carriage return to the output.

  (progn (fresh-line t)
         (print "Hello!")
         (fresh-line t))

The semantics of the KIF core (KIF without rules and definitions) is similar to that of first order logic. There is an extension to handle nonstandard operators (like backquote and comma), and there is a restriction that models satisfy various axiom schemata (to give meaning to the basic vocabulary in the format). Despite these extensions and restrictions, the core language retains the fundamental characteristics of first order logic, including compactness and the semi-decidability of logical entailment. [an error occurred while processing this directive]