Like Ernest, I was confused by the terminology being used to describe the problem, until I loaded the Protege project and saw what you are trying to do. I think the JESS rule you want is (minus the back-slashes and spaces):

(defrule simple-multi-multi-match
   (object (is-a Hello)(OBJECT ?hello) (ResourceID $?b 111 $?a))
?behavior <- (object (is-a NodeSpoof) (Resourcesequence $?before ?hello $?after))
     =>
    (printout t "Behavior ID: " (slot-get ?behavior BehaviorID)  crlf))

In JessTab translation of Protege instances to Jess facts, you have the Jess template slot OBJECT that references the object corresponding to the translated fact. That's what you can use in your subsequent matches for objects.


John wrote:

Q1. what is the logical difference between

(defglobal ?*re* = (nth$ 1 (find-all-instances ((?h Hello)) (member$ 111 (slot-get ?h Resource\ ID)))))

and

(defglobal ?*re* = (nth$ 1 (find-all-instances ((?h Hello)) (eq (slot-get ?h Resource\ ID) 111))))

Because, the second statement points to the first instance, even if there is no field matching 111. Just try slot-get after the defglobal in Jess prompt to confirm.

The second statement should be empty, if your Resource\ ID slot has cardinality multiple. Thus (slot-get ?h Resource\ ID) is a list, and can never equal 111. So find-all-instances should return the empty list.

Samson
--
Samson Tu                    email: [EMAIL PROTECTED]
Senior Research Scientist    web: www.stanford.edu/~swt/
Stanford Medical Informatics phone: 1-650-725-3391
Stanford University          fax: 1-650-725-7944
--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to