Hi All, yeah i am sorry i didnt give you all the details.
i have a fact : (list-of-names (names john ronnie mark pat meg cindi)) which is defined from the template (deftemplate list-of-names (multislot names)) and another fact: (person (name Bob)) I have a rule: (defrule matches-names (list-of-names (names $? ?var1 $?)) (person (name ?var1)) => (printout t ?var1 crlf)) As per the given facts this rule wont fire. What i am trying to do is find out all values of ?var1 that were matched with in pattern (list-of-names) on the rule LHS. I want to access the values of ?var1 from java so that i can then print the rule with variable values substituted in it which i think would make easier figuring out why this rule didnt fire. (hence had put the subject line as debugger for jess) thnx, --- [EMAIL PROTECTED] wrote: > > I think =?iso-8859-1?q?Moderator?= wrote: > > Hi All, > > [I changed the subject line of this post as it > didn't seem to make > sense.] > > > > > I have a pattern and a list of facts for that > pattern. > > How can i get all possible instantiations for the > > variables in the patterns in java. > > ie. > > Pattern : (list-of-names (names $? ?var1 $?)) > > > > fact: (list-of-names (names john ronnie mark pat > meg > > cindi)) > > > > In this case the variable var1 matches all the > > elements of the list. > > How can i match this pattern against the fact and > get > > the results of the match in java. > > Any help is highly appreciated. > > Thanks in advance. > > I'm not really sure what you're after here, or what > you're starting > with. Of course you don't "have a pattern," as > patterns have no > independent existence. I can't tell if this question > means that the > pattern is on the LHS of a rule and you just want to > pass the value of > ?var1 to Java somehow, or if you're after something > else. > > Why don't you tell us more clearly exactly what > you're starting with > and exactly what you're trying to accomplish. > > > > --------------------------------------------------------- > Ernest Friedman-Hill > Distributed Systems 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] > -------------------------------------------------------------------- > ________________________________________________________________________ Missed your favourite TV serial last night? Try the new, Yahoo! TV. visit http://in.tv.yahoo.com -------------------------------------------------------------------- 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] --------------------------------------------------------------------