Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!burdvax!finin@prc.unisys.com From: finin@prc.unisys.com (Tim Finin) Newsgroups: comp.lang.prolog Subject: Re: Legitimate uses of "assert"? Message-ID: <13005@burdvax.PRC.Unisys.COM> Date: 1 Mar 90 21:43:49 GMT References: <8205@pt.cs.cmu.edu> <1649@gould.doc.ic.ac.uk> Sender: news@PRC.Unisys.COM Reply-To: finin@prc.unisys.com (Tim Finin) Organization: Unisys Center for Advanced Information Technology Lines: 29 In-reply-to: cdsm@sappho.doc.ic.ac.uk (Chris Moss) In article <1649@gould.doc.ic.ac.uk>, cdsm@sappho (Chris Moss) writes: >In article <8205@pt.cs.cmu.edu> fp@PROOF.ERGO.CS.CMU.EDU (Frank Pfenning) writes: >>I am looking for papers/reports/code/information on "legitimate" uses >>of "assert" and "retract" in logic programming, that is, uses which are >>considered to be in good taste by the connoisseurs of the field. > >Many of the best uses are for assert WITHOUT retract. They generally come into >the area of "lemmas": asserting things you've found to be true so you don't >have to prove them all over again. This is mentioned in Sterling and Shapiro >(The Art of Prolog) p.181 - section entitled "Memo Functions" with an example >of Towers of Hanoi. ... Slightly more general than this is allowing some rules to be forward chaining rules which always add their conclusions to the database. If you do this and want to support default rules or a dynamic database, then retractions are needed, although they should be done in a principled way using a truth maintenance system. The result is a very useful component for building certain kinds of systems in Prolog. It supports the use of a blackboard type architecture and also provides a very easy and potentially efficient way to do certain computations in which the deductive closure of a set of clauses needs to be computed. Our own work in this area is described in Finin, Tim, Rich Fritzson and Dave Matuzsek, ``Adding Forward Chaining and Truth Maintenance to Prolog'', IEEE Artificial Intelligence Applications Conference, (pp. 123 - 130), Miami, March 1989. -- Tim Finin finin@prc.unisys.com Center for Advanced Information Technology 215-648-2840, 215-648-2288 (fax) Unisys, PO Box 517, Paoli, PA 19301 215-386-1749 (home)