Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!sappho!cdsm From: cdsm@sappho.doc.ic.ac.uk (Chris Moss) Newsgroups: comp.lang.prolog Subject: Re: Legitimate uses of "assert"? Message-ID: <1649@gould.doc.ic.ac.uk> Date: 28 Feb 90 19:41:13 GMT References: <8205@pt.cs.cmu.edu> Sender: news@doc.ic.ac.uk Reply-To: cdsm@doc.ic.ac.uk (Chris Moss) Organization: Logic Group, Dept. of Computing, Imperial College, London, UK. Lines: 19 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. (retract is used simply to clean up at the end) Another example is the (bottom-up) chart parser in Rob Simmons' "Computations from the English" p.202. Here again the information is additive, because every part of the well-formed substring table remains valid. Chris Moss.