I think erich.oliphant wrote: [Charset iso-8859-1 unsupported, filtering to ASCII...] > Hi, > Do jess rules that fire based on shadow facts work with > polymorphism/inheritance? >
If you have two classes A and B, and two defclasses a and b created from them, any inheritance relationship between A and B is not automatically reflected in a and b. But you *can* specify the relationship by making defclass b extend defclass a -- i.e., (defclass a A) (defclass b B extends a) With these definitions, then facts of type b will match rules written for a. Regardless of these definitions, you can always say (definstance a ?instanceOfB) and such a fact will match all of the "a" rules, but not any "b" rules. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
