first, thx for Dona & Jason for their valuable comments. Yes, Dona, your guess is right. I am using protege in combo with Jess. I see protege is more powerful if you combine the Jess features. As Dona have accurately guessed, I used JessTab to map instances and classes created in protege to Jess.

Jason, Assert(ion) in Jess(with protoge) is done by a GUI interface (Form based).  The problem is that the object variable (for the multislots) is a single instance address and doesnt contain the actual contents.

As of the contents of the Hello and Node Spoof class;

Hello class contain two slots: Resource ID and Neighbor Address(multislot type string)

Node Spoof: Behavior ID (string) and Resouce sequence (multislot type Hello)

When I pattern - match the resource sequence, the matching returns false always since LHS obtains just the instance address of resource sequence and not the contents of the multislot.

One more silly question; is CLIPS more advanced than JESS? I see lot of common syntax and features between them. Then why not use CLIPS? Also from some sources, I heard CLIPS is more powerful and portable to various other language.

Thx in advance.

On 6/22/06, Dona Mommsen <[EMAIL PROTECTED]> wrote:
Hi,

I apologize for barging in. I'm just guessing that John might be using
Jess in combination with Protégé

>>  (object (is-a Node\ Spoof) (resource\ sequence $? ?o $?) (Behavior\
>> ID ?bid))

looks very much like a mapped instance with JessTab. Asserting facts
with mapclass or mapinstance creates facts that have

> this "object/is-a" thing

Usually this shouldn't interfere with the efficiency and possibilities
of using Jess.

Dona

On Jun 21, 2006, at 6:47 AM, friedman_hill ernest j wrote:

> This should work fine if the "resource sequence" multislot contains
> the actual fact object; if you showed us where you assert the "Hello"
> fact, then I could probably tell you what's gone wrong.
>
> While we're here, I should ask why you're doing this "object/is-a"
> thing, rather than having a "hello" template and a "node spoof"
> template; you're doing a lot of extra work to make sure Jess can't
> work very efficiently. And I can tell you that the "and" is not needed
> here; all the patterns on the LHS of a rule are implicitly "and"-ed
> together. And finally, my goodness, you're going to drive yourself
> nuts embedding spaces into symbols like this -- don't do that!
>
> I think John wrote:
> [Charset iso-8859-1 unsupported, filtering to ASCII...]
>> Hi all,
>>
>> I am a rookie to jess. I was stuck-up with this problem for the past
>> 24-hrs.
>> So kindly advice.
>>
>> I created two classes with multislots. The second class has a
>> multislot of
>> type - instance of the previous class. I am not able to pattern match
>> the
>> instance in the second class's object. Multislot pattern works well
>> for
>> strings. How can i do it for multislot of instances? I have attached
>> the
>> snippet for your kind perusal. Please Help.
>>
>>
>> (defrule testnest
>> (and
>>
>> ?o<- (object (is-a Hello) (Neighbor\ Address $? "10.0.0.1" $?)
>> (Resource\ ID
>> ?rid))
>>
>> ?r2 <- (object (is-a Node\ Spoof) (resource\ sequence $? ?o $?)
>> (Behavior\
>> ID ?bid))
>> =>
>>
>> (printout t "Attack" crlf))
>>
>> The Two Classes: Hello and Node Spoof
>>
>> Multifield slots : Neighbor Address (type STRING) and resource
>> sequence
>> (is-a Hello)
>>
>> Thanx in Advance
>
>
>
> ---------------------------------------------------------
> 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].
> --------------------------------------------------------------------
>


Reply via email to