Retraction

80 views
Skip to first unread message

Stacy

unread,
Dec 14, 2011, 9:49:04 PM12/14/11
to PyKE
I have seen discussions in the past about the possibility of allowing
retractions of asserted facts. Has anyone tried to implement that?

Bruce Frederiksen

unread,
Dec 15, 2011, 11:35:18 AM12/15/11
to py...@googlegroups.com
Not I.  It has been asked for a lot, so I'd like to encourage somebody to take a shot at this!  If so, I am always available for questions.

-Bruce

On Wed, Dec 14, 2011 at 9:49 PM, Stacy <stacym...@gmail.com> wrote:
I have seen discussions in the past about the possibility of allowing
retractions of asserted facts. Has anyone tried to implement that?

--
You received this message because you are subscribed to the Google Groups "PyKE" group.
To post to this group, send email to py...@googlegroups.com.
To unsubscribe from this group, send email to pyke+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyke?hl=en.


Stacy

unread,
Dec 15, 2011, 8:00:56 PM12/15/11
to PyKE
I am willing to take a look at doing it when i have some time but
don't want to approach it blindly.
Do you have suggestions as to how to approach it?

Bruce Frederiksen

unread,
Dec 17, 2011, 7:02:01 PM12/17/11
to py...@googlegroups.com
There are three aspects:
  1. Should retracting fact A also retract any other facts asserted by forward chaining based on fact A?  I think that the answer to this is no.
  2. Should retracting fact A cause forward chaining rules with a "notany A" to fire immediately.  I'm less certain on this one, but would lean towards yes.
  3. The remaining aspect is to keep the fact_list caches up to date.  Look at the add_args method in the fact_list class in pyke/fact_base.py to see how facts are added to the cache (self.hashes is the cache and is kept in the fact_list object).

This work should be done in the "pyke" hg repository.

You will need a sourceforge ID to be able to commit to the repository.  If you give me your sourceforge username, I would be happy to add you to the project!

Welcome aboard!

-Bruce

Reply all
Reply to author
Forward
0 new messages