I'm sorry if you receive this e-mail duplicated.
On Wed, 1 Mar 2000, friedman_hill ernest j wrote:
> Hi,
>
> I just tried this on a simple Bean and I did not observe the problem
> you're reporting (nor did I expect to.) A transcript is below.
>
> If you can reproduce the problem in a similar transcript, please send
> it along - you may have found a bug. But make sure that it's not
> something else - for instance, the "not" wont trigger if you retract
> the (initial-fact).
>
>
> ----------------------------------------------------------------------
> c:/users/root/jess5> cat Bean.java
> public class Bean
> {
> public String getName() { return "Fred"; }
> }
>
> c:/users/root/jess5> java jess.Main
>
> Jess, the Java Expert System Shell
> Copyright (C) 1998 E.J. Friedman Hill and the Sandia Corporation
> Jess Version 5.0 1/28/2000
>
> Jess> (defclass bean Bean)
> Bean
I have my bean class. My defclass is in the top of my script
(defclass element VisualElem)
> Jess> (bind ?bean (new Bean))
> <External-Address:Bean>
This part is the one that i find different, because I dont do 'bind'.
I expect this doesn't affect.
> Jess> (definstance bean ?bean static)
> <Fact-0>
I do the definstance in the Java program in this way:
f = new Funcall("definstance", rete);
f.add(new Value("element", RU.ATOM));
f.add(new Value(objInMemory));
f.execute(rete.getGlobalContext());
After this I run the kb.
When I return I do the (undefinstance *)
After this the cycle takes the program to the next part again:
f = new Funcall("definstance", rete);
f.add(new Value("element", RU.ATOM));
f.add(new Value(objInMemory));
f.execute(rete.getGlobalContext());
And run again, but no rules are fired.
The way you do the definstance is equivalent to the mine, isn't it?
Does the bind affect?
And no, I'm not retracting the initial-fact.
Thank you...
> Jess> (watch rules)
> TRUE
> Jess> (defrule test-rule
> (bean (name "Fred"))
> =>)
> TRUE
> Jess> (run)
> FIRE 1 test-rule f-0
> 1
> Jess> (undefinstance *)
> TRUE
> Jess> (definstance bean ?bean static)
> <Fact-1>
> Jess> (run)
> FIRE 1 test-rule f-1
> 1
> Jess>
> ----------------------------------------------------------------------
>
>
> I think Calicrates Policroniades Borraz wrote:
> >
> > Hi, I have a simple question.
> >
> > If I have the next simple rule in a script:
> >
> > (defrule I-cant-see-the-object
> > (not (element (name "object")))
> > =>
> > (assert (no_object))
> > )
> >
> > where element is a bean that comes from a Java program and name is a slot.
> >
> > I clear the kb of elements with rete.executeCommand("(undefinstance *)")
> > If the previous rule is fired once, it will not be fired again because the
> > element wich name is "object" has fired the rule even though I had
> > cleared the kb of elements. I mean, If I include a new element with name
> > "object" it won't fire the rule. I suppouse that Jess takes the new income
> > as if were the one that fired the rule previously.
> >
> > I understand this property with simple asserted facts (because support
> > the refraction property of an expert system), but it's not clear for me
> > why a bean that has bean removed with undefinstance and included again in
> > the kb is not recognized by the rule as a new fact.
> >
> > How can I activate the rule with the new income that comes in the shape
> > of a bean without Jess thinks that is the same fact?
> >
> > Thank you in advance...
> >
> > Calicrates.
> >
> > ---------------------------------------------------------------------
> > 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
> 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]
---------------------------------------------------------------------
Re: JESS: A question about the knowledge base and rules..
Calicrates Policroniades Borraz Thu, 2 Mar 2000 04:31:06 -0800
- JESS: A question about the knowledge base ... Calicrates Policroniades Borraz
- Re: JESS: A question about the knowle... ejfried
- Re: JESS: A question about the kn... Calicrates Policroniades Borraz
- Re: JESS: A question about the knowle... Calicrates Policroniades Borraz
- Re: JESS: A question about the knowle... Calicrates Policroniades Borraz
