Re: JESS: Replacing Facts

2008-09-12 Thread Wolfgang Laun
You could write the patterns pretty much the same way. You just have to call functions (wrap, replace, deref - see below) providing the extra layer. -W ; ; A wrapper template contains a single slot pointing to ; the actual fact. This could be changed arbitrarily; not ; only in its slot values due

Re: JESS: Replacing Facts

2008-09-11 Thread Hal Hildebrand
How would you write the rules relying on the referred to facts? Just curious to find out, as this would be a useful technique... On Sep 11, 2008, at 6:00 PM, [EMAIL PROTECTED] wrote: Thank you Wolfgang, this is a clever idea. I will think about it some more. On Sep 11, 2008, at 10:24 AM, W

Re: JESS: Replacing Facts

2008-09-11 Thread griesser
Thank you Wolfgang, this is a clever idea. I will think about it some more. On Sep 11, 2008, at 10:24 AM, Wolfgang Laun wrote: Perhaps a wrapper fact with a single slot containing a reference of the actual fact could server as a stable point of reference. That means that the many references i

Re: JESS: Replacing Facts

2008-09-11 Thread Wolfgang Laun
Perhaps a wrapper fact with a single slot containing a reference of the actual fact could server as a stable point of reference. That means that the many references in other "real" facts would remain stable, but, of course, dereferencing becomes more complicated. Only the pointer in the wrapper wou

Re: JESS: Replacing Facts

2008-09-10 Thread griesser
Thank you Ernest, I can see how that would sometimes work, but in my case I would need to change the old fact's template. I am using the rules to control graph rewriting: the new facts are usually quite different. Presuming the template change is possible, it might involve modifying the to-

Re: JESS: Replacing Facts

2008-09-10 Thread Ernest Friedman-Hill
The holders of the replaced fact may be unrelated, but aren't the old and new facts related? I would think in most such systems you'd be able to design things to modify the old fact rather then needing to remove it and replace it with a new one. Jess behaves differently than its ancestor C

JESS: Replacing Facts

2008-09-10 Thread griesser
Hello, It would be much easier to write rules necessary for my application, were it possible to assert that a new fact completely replaces an old one: this needs to replace all references to the old fact with references to the new fact. This is more than just retracting the old fact, and asserti