Tutorials
Definite Clause Deduction

Back to tutorials.

Tutorial One: Creating and Loading Knowledge Bases

When you first open the applet, you should be looking at a large blank text area. Below is an example of what the applet will look like:

image

This text area will contain the knowledge base to be used.

If you want to enter your own knowledge base, simply type it into that text area, or cut and paste it from elsewhere. The applet accepts knowledge bases written with a simplified version of CILog syntax. For more details, see the syntax tutorial.

There are, however, several pre-written knowledge bases, each of which deals with a different domain. Most of them can be found on the examples page for CILog. To load one of these examples, go to the 'File' menu, and select 'Load Sample Knowledge Base'. A dialog will open with a drop-down menu allowing you to select a particular example. Select an example and click the 'Load' button. The knowledge base will be parsed, and you will see it appear in the text area. If you like, you can add rules or modify the knowledge base once it is loaded.

image
  • Arithmetic Axiomatization: This knowledge base provides a very simple axiomatizations of some functions in Peano arithmetic, where numbers are defined recursively, using 0 as the base and a successor function s(X).

  • A Biblical Family Database: This knowledge base represents some very basic information about the family relationships of some biblical characters.

  • A Course Database: The course database contains a few facts about student enrollment in computer science and mathematics classes.

  • An Electrical System: A model of a wiring system in a house is axiomatized with information about wire connectivity, switches, and lights.

  • Times of the Day: This is a simple knowledge base that determines which times of the day (given using a 12 hour clock) precede which other times.

  • A Floor Plan: The domain here is the plan for a floor containing eight rooms. It contains information about which rooms are beside which other rooms.

  • List Operations: This knowledge base consists of functions to perform list operations, such as member, append, etc.

  • Search Applet Graph: This is intended to build a search tree that is equivalent to the Module 4 graph in the search applet. The proof trees you get correspond to the paths from start to goal nodes.

The knowledge base will be parsed automatically when you click on the 'Solve' tab. If there are any errors in the syntax of your knowledge base when it is parsed by the applet, a dialog box will pop up, giving you an error message describing the problem.

The knowledge base is shown at the bottom of the screen when you switch to the 'Solve' mode.

Back to tutorials.

Valid HTML 4.0 Transitional