Re: Storing data and code in a Db with LISP-like interface

From: Neo <neo55592_at_hotmail.com>
Date: 22 Apr 2006 15:53:57 -0700
Message-ID: <1145746437.660905.240120_at_g10g2000cwb.googlegroups.com>


>> Now, suppose I wanted to classify an actual tomato as both a fruit and a vegetable, where would I add it to the above "class hierarchy"? (You don't need to show me actual Prolog, just adjust above tree). .
> Prolog is a graph, not a tree.
> To illustrate it as a tree misses the point.
> Humans <categorize> in trees, but our brains <think> in graphs.

Yes, I think displaying graphs in tree might mislead some people into believing the underlying capabilities are limited to trees; and sometimes it is better to display it as a list of statements as Prolog does.

> To solve the problem posed, I placed the entire prolog program below, with
the two facts you provided (Tomato is both a fruit and a vegetable).

> named_instance(john,person).
> named_instance(mary,person).
> subtype(apple,fruit).
> subtype(banana,fruit).
> subtype(tomato, fruit).
> subtype(tomato, vegetable).

Ok, I see. Suppose we start with the following:

subtype(doctor, human).
subtype(engineer, human).
named_instance(john, doctor).
named_instance(mary, doctor).

And now comes along an alien named bob, who has all the major characteristics of a doctor, but he is not a human. How do I handle this situation? Received on Sun Apr 23 2006 - 00:53:57 CEST

Original text of this message