Arggggggh. This is apparently not my week. I gave you this little
patch without even running the test suite. I'm sorry, everybody, for
the incredible stream of misinformation I've generated the last few
days!
To make this patch work, you also have to change line 96 in
Pattern.java. Change
m_slotLengths[i] = 0;
to
m_slotLengths[i] = -1;
I notice that the jess/examples/pumps/pumps.clp example file shipped
with jess50a3 lacks the final (run) command, so by itself it does
nothing.
I think [EMAIL PROTECTED] wrote:
>
>
> Ernest,
> After applying suggested fix small example I wrote works. Unfortunately it
> seems that matching
> Java Beans doesn't work any more. I noticed that not only on my code, but
> on examples
> like "jess\examples\pumps".
>
>
> [EMAIL PROTECTED] wrote:
>
>
> >I think [EMAIL PROTECTED] wrote:
> >
> >> Ernest,
> >> Thanks for the answers to my previous questions, now I have another one.
> >> Could you please explain why following code behaves differently in Jess
> 4.3
> >> and 5.0a3:
> >>
> >> (deftemplate param
> >> (multislot groups))
> >>
> >> (defrule test-empty-multislot
> >> ?f <- (param (groups))
> >> =>
> >> (modify ?f (groups 1))
> >> (printout t "modified" crlf))
> >>
> >> (assert (param))
> >> (run)
> >>
> >> In Jess 4.3 rule "test-empty-multislot" executes once.
> >> In Jess 5.0a3 it enters infinite loop.
> >>
> >> Thanks.
> >>
> >> Miroslav Madecki, I/T specialist - RS/6000
> >> Internet: [EMAIL PROTECTED]
> >> Tel: +385-1-6308-156, Fax: +385-1-6111-119
> >> IBM Croatia, Lastovska 23, 10000 Zagreb, Croatia
> >>
> >
> >
> >This one is a bug - thanks for finding it. You have to make two
> >trivial changes to fix this: in jess/ReteCompiler.java, at line 296,
> >change
> > if (p.getSlotLength(j) != 0)
> >
> >to
> >
> > if (p.getSlotLength(j) != -1)
> >
> >And in jess/Pattern.java, at line 335, change
> >
> > return 0;
> >to
> > return -1;
> >
>
>
>
> Miroslav Madecki, I/T specialist - RS/6000
> Internet: [EMAIL PROTECTED]
> Tel: +385-1-6308-156, Fax: +385-1-6111-119
> IBM Croatia, Lastovska 23, 10000 Zagreb, Croatia
>
>
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
>
---------------------------------------------------------
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]
---------------------------------------------------------------------