Hey,

I've gotten myself bogged down in an infinite loop, and can't seem to
coax any more information out of Jess to help me find it.

Using the Jess debugger (in a5) I've proven that that last call is to
(retract).  This call never returns, and my CPU show 100% consumption.
There doesn't seem to be any memory consumption as I let this run for an
hour and never got an OutOfMemory exception.

The last rule to fire is my 'remove-word-facts' rule (see below).  If I
set a breakpoint there, then single-step past it, I hit the second
pattern in my 'determine-adjacency' rule, and single stepping from then
on just stays at that location with no helpful information available in
the variables view, etc.

Here are the involved code snippets:

(defrule remove-word-facts
    ?fact <- (word)
=>
    (retract ?fact))   <=== BREAKPOINT HERE...

(defrule determine-adjacency
    "Determine 'word' adjacency"
    ?lw <- (word (x ?xl)(y ?yl))
    ?rw <- (word (x ?xr&:(> ?xr ?xl))(y ?yr&:(same-row ?yl ?yr)))   <===
LOOPS HERE!!!!!
    (not (word (x ?xm&:(and (> ?xm ?xl)(< ?xm ?xr)))(y ?ym&:(same-row
?ym ?yl))))
=>
    (assert (adjacent (left ?lw)(right ?rw))))

(deffunction same-row (?p0 ?p1)(and (< ?p1 (+ ?p0 10) )(> ?p1 (- ?p0
10))))

Is there something I can do at this point that will help me determine
why it is looping?

Thanks.
-Mitch

--------------------------------------------------------------------
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