I think Morten Vigel wrote:
> 

Look very carefully at the bit of stack trace below: you'll see rule
LHS things executing, followed by your deffunction, followed by a
defule, followed by more LHS stuff. In the full trace you sent, the
loop is repeated many times.

This is something we've talked about on the list many times; it's
mentioned in a round-about way in the release notes, too. (run-query)
calls (run), because it's nice to be able to have queries answered by
backwards chaining. As a result, though, calling queries on the LHS of
a rule is very dangerous. If a fact is being pattern-matched, and this
causes run-query to call run which fires a rule which modifies the
fact which was being matched (whew!) Bad Things Can Happen. Normally
concurrent modifies are no problem becuase Jess protects the Rete
network ith synchronization; but here it's all happening on one
thread, so things break down.

In an upcoming release, there will be an API to turn this on and off
for specific queries or query invocations. In the meantime, if you're
not using backward chaining at all, you can simply comment out the
line that says "engine.run(10)" in RunQuery.call() in
jess/MiscFunctions.java. 



> Jess reported an error in routine Node1TEQ.call
>         while executing rule LHS (TEQ)
>         while executing rule LHS (TECT)
>         while executing (modify ?post (test-status affirmed))
>         while executing defrule MAIN::causal-affirm-state-a
>         while executing (run-query causal-path-exists-query ?postB)
>         while executing (bind ?iter (run-query causal-path-exists-query
> ?postB))
>         while executing deffunction causal-path-exists
>         while executing (causal-path-exists ?postA ?postB)

>         while executing 'test' CE
>         while executing rule LHS (Node2)
>         while executing rule LHS (TEQ)
...



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [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
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to