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-be-replaced fact to remove its outdated data and
references. I think that would complicate matters as much as
identifying all the holders.
On Sep 10, 2008, [EMAIL PROTECTED] wrote:
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 CLIPS in this regard; a modified fact retains its
original fact id, so references by number or by the jess.Fact object
are all preserved across a "modify" call.
On Sep 10, 2008, at 2:18 PM, [EMAIL PROTECTED] wrote:
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 asserting the new
one, because that does not update the references.
Without this ability, I must write many variant rules to handle all
the references that need to be replaced.
In general, the holders of a replaced fact are not related by
inheritance (and can't be faked that way).
This seems to me like a reasonable thing to want to do, and something
that could probably be done efficiently. Perhaps I'm just obtuse, but
I don't see a way to do it. Am I missing something?
Thanks,
Art
--------------------------------------------------------------------
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]
--------------------------------------------------------------------