Hi,

I'm just now experimenting with the power of having one fact type extend 
another.  Question : If I have a rule that fires on a common parent, how
do I then decide what the actual type of the fact is so that I can work
on it?

For example:

(deftemplate ANIMAL (slot name))
(deftemplate MAMMAL extends ANIMAL (slot number-legs))

...
(assert (MAMMAL (name CAT) (number-legs 4)))
...

(defrule findAnimals
 (ANIMAL (name ?x))
 ...how do I now check if this thing is a MAMMAL, so that I can then check
    it's number-legs?  Do I have to say:
 (MAMMAL (name ?x)(number-legs ?y))

???


Thanks.  It's a lousy example, I know, but it's the best I could think of 
without writing a minor treatise on what I want to do :)

Duane
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to