Let's start from a concrete example. The program below runs and
produces what I expect as output. Do you agree? Can you modify it to
produce surprising output??

(defmodule UPDATE)

(defrule UPDATE::foo
  (MAIN::a)
  =>
  (printout t "foo" crlf))

(defrule MAIN::bar
  (MAIN::b)
  =>
  (assert (MAIN::a))
  (printout t "bar" crlf))

(defmodule CLEAN-UP)
(defrule CLEAN-UP::baz
  (MAIN::c)
  =>
  (assert (MAIN::b))
  (printout t "baz" crlf))

(reset)
(assert (MAIN::c))

(focus UPDATE)
(focus MAIN)
(focus CLEAN-UP)

(run)



I think Scott Moss wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> I called, in this order,
> 
>     engine.setFocus("UPDATE");
>     engine.setFocus("MAIN");
>     engine.setFocus("CLEAN-UP");
>      engine.run();
> 
> from a Java program.  I had understood from JIA  (p.127) that I could 
> push the MAIN module onto the focus stack in this way (though it would 
> always be on the bottom of the stack as well).  In my Jess program, 
> rules firing in the MAIN module activate rules in the UPDATE module but, 
> at least in some cases, the latter do not fire unless I move them to the 
> MAIN module.  It appears that the MAIN module ONLY gets focus last.  
> This seems at odds with the JIA description -- unless, of course, I am 
> doing something wrong.
> 
> -- 
> Scott Moss
> Professor of Social Simulation
> Centre for Policy Modelling
> Manchester Metropolitan University
> Aytoun Building
> Manchester M1 3GH
> 
> http://cfpm.org/~scott
> 
> (t) +44 (0)161 247 3886
> (f) +44 (0)161 247 6802
> (m) +44 (0)7740 942564 
> 
> --------------------------------------------------------------------
> 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]
> --------------------------------------------------------------------
> 



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