I think [EMAIL PROTECTED] wrote:
>
>
>
> Ernest,
> Bean Multislot matching now works fine, but there are still some problems.
> The result I got from rule like:
> (defrule test-multislots-2
> ?f <- (param (groups))
> =>
> (modify ?f (param (create$))))
> is:
Is this a typo on your part, or is this the rule you really tried?
You've written 'param' where your surely meant to write 'groups'.
> -------------------------------------------------
> Jess> (run 1)
> Wrong number of args in funcall?
> java.lang.NullPointerException
> at jess.reflect.ReflectFunctions.valueToObject(Compiled Code)
Yes, you're right, I see this too.
> In this particular case "groups" is Java Bean property of type int[]. I
> assume that the result of
> "(create$)" is different from "null" or "new int[0]" so it doesn't work. I
> expected such result and that's
> why your answer is a little bit confusing to me.
Well, this is apparently another bug.
>
> This situation looks like cyclical restriction to me. I can't match null
> array properties, but I can set them
> to null. On the other hand I can match zero length array properties but I
> can't set them back to zero
> lenght once they are modified.
It's not intentional - this needs to be fixed.
>
> While I was trying to make my code run I encountered some strange problems
> when trying to
> execute "(clear)" command. That was after my code run fine (in this test
> case rules with
> "(modify ?f (multislot (create$)))" on the RHS were not fired, so there
> were no exceptions). I tried
> to recreate problem with some simpler code (currently my prototype has 135
> rules) and only
> discovered problems with modify. Do you have any idea what can cause such
> behaviour ?
>
> ----------------------------------------------------
> Jess> (clear)
> Wrong number of args in funcall?
> java.lang.ArrayIndexOutOfBoundsException: 6 >= 6
> at java.util.Vector.elementAt(Compiled Code)
> at jess.Rete.broadcastEvent(Compiled Code)
...
> Jess> (facts)
> For a total of 0 facts.
I think I understand what could be causing this. I'll have a
look. Thanks for the pointer.
I feel as though I must point out: remember, this is alpha software -
that means it's got known bugs, and it's got parts that are just
thrown together as placeholders for later versions of new features. No
claim has been made that 5.0a3 is not without bugs (although the
(create$) problem might exist in 4.3 too.)
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9214 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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]
---------------------------------------------------------------------