is a DOOD launguage


Now I would like to say some more about the practical problems of integrating, specifically objects and rules, and inheritances in order to explain some features of Quixote.

  1. Objects and Rules
  2. Two kinds of Inheritance
    2.1 Property Inheritance
    2.2 Exceptions to the rule of property inheritance
    2.3 Inheritance of Rules
    2.4 Exception to Inheritance of Rules

1. Objects and Rules

Let me briefly explain what was happened, when we connected objects, the basic structures in object-oriented databases, and rules, the basic structures in deductive databases.

Let's try to formulate one of the basic laws of Japan in Quixote:

"If the head of the family dies, half of his property goes to his wife, and the rest is shared between the children. The parents, or brothers and sisters of the deceased inherit nothing.

The first step in describing this law is to realize that the paragraph is a set of conditions and their results. The paragraph can be represented using a rule of the type "If condition A is satisfied, the result is B." The next step is to realize that there are the objects "head of family," "property," and concepts like "death."

These are all objects. If "inheritence," "death of head of family," "wife's existence," "children's existence," "property," and so on are chosen as objects, the law can be written as:

If "death of head of family" and "wife's existence" and "children's existence" and "property" is S, then wife inherits S/2, children inherit S/2 and parents, brothers, sisters inherit 0.

This shows how the law of inheritance can be described in an object based format.

Quixote contains rules characteristic of deductive databases (such as "If condition A is satisfied the result B is also satisfied" written as "B<=A) and object terms characteristic of object-oriented databases.

The previous paragraph can be represented in Quixote by:

     inheritance/[wife=S/2, children=S/2, 
		  parents=0, brothers=0, sisters=0] 
	     <= death_of_head_of_family, wife's_existence, 
	        children's_existence, property/[Sum=S];;

Let's have a quick break :)

Here are some technical terms used in Quixote. The terms that represent objects like "death of head of family", "wife's existence," and so on are called Object Terms. Terms that represent objects and their characteristics, such as inheritance/[wife=S/2, children=S/2, brothers=0, sisters=0, parents=0], and property/[sum=S] are called Attribute Terms. An Object Term is regarded as a special kind of Attribute Term without the symbol / and everything to the right of it.


2. Two kinds of Inheritance

In the following subsections I will explain the two kinds of inheritance used in Quixote, both of which come from the field of artificial intelligence where they were developed to enable re-use, sharing and organization of information.

2.1 Property Inheritance

In Quixote, property inheritance was adopted from object-oriented databases. A brief explanation follows:

Human beings have the characteristics of the family mammals. To represent this, we do not need to include the characteristics of the family mammals for human objects; we can just let humans inherit this characteristic. Allowing families to inherit characteristics like this allows us to classify and organize those characteristics.

Written in Quixote the inheritance rule might look like this:

	human_beings =< mammals
	mammals/[breathing=lung, temperature=homeotherm]

Quixote automatically assigns all the characteristics of mammals to human beings; they need not be defined again at the human level.

Anyone who had tried to represent the real world using a rule as the above property inheritance know that the real world has exceptions to the rule. Quixote can also incorporate exceptions to property inheritance.


2.2 Exceptions to the rule of property inheritance

All objects introduced so far are atomic objects. Quixote introduces structured object terms to enable exceptions to the property inheritance.

For example, here is a structured object term:

	apple[color=green]
Note that a structured object term looks like an attribute. The difference is that the structured object term has no slash / .

This object term represents a green apple. Let's use this example to look at the concept of exceptions to the rule of property inheritance.

[color=green] represents the fact that the apple's color is green. This is an important point - a green apple should be green. If it is not green any more, it cannot be a green apple!

When apple[color=green] is written in Quixote, apple[color=green] =< apple is automatically made. This relation means that a green apple is a kind of apple and it inherits the characteristics of the parent apple.

When the attribute term apple/[shape=round, color=red] (apples are round and red) is written, Quixote automatically assigns shape=round to apple[color=green], but doesn't assign color=red to it.

In general, if there exist two different definitions for the same characteristic in an attribute term and a structured object term, the definition in the structured object term has the higher priority. In the example, color=green in the structured object term has higher priority than color=red in the attribute term.

This is the way that Quixote handles exceptions to the property inheritance rule.


2.3 Inheritance of Rules

This subsection shows how Quixote implements the inheritance of rules for deductive databases.

Quixote uses modules in order to organize and classify rules. A set of rules are contained in a module with a unique module name.

The following Quixote statement lets module1 inherit all the rules of module2:

	module1 >- module2

Then module1 is assumed to contain all the rules that are in module2.

Let's look at the legal example we discussed previously. The law of inheritance was represented by a rule. The module containing the set of rules governing inheritance can be given the name "Law_of_Inheritance."

In the same way, the whole of the civil law could be represented by a set of rules in a module called "Civil_Law."

The module "Civil_Law" can be made to inherit the rules of the module "Law_of_Inheritance" by writing

	Civil_Law >- Law_of_Inheritance
Defining sets of rules as modules and setting the inheritance of those rules between modules saves redefining the rules in subsequent modules.


2.4 Exception to Inheritance of Rules

There can also be exceptions to the inheritance of rules in Quixote. I am not going to go into this in detail here, but here is a brief description. Basically there are two kinds of exceptions to the inheritance of rules:

	a.  Do not inherit
	b.  Overwrite
Exceptions to the inheritance of rules are implemented by adding a symbol which specifies the type of inheritance for the target rule.


To summarize, two kinds of inheritance were implemented in Quixote: one came from deductive databases and the other from object-oriented databases. Rules are organized and classified, shared and re-used based on these two kinds of inheritance as shown in the legal example.

I have explained the integration of objects and rules and the two kinds of inheritance to demonstrate the way that Quixote has merged deductive databases and object-oriented databases.