From unoh@rz.uni-karlsruhe.de  Fri Apr 14 12:24:05 2000
Received: from mailgate.rz.uni-karlsruhe.de (exim@mailgate.rz.uni-karlsruhe.de [129.13.64.97])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id MAA17442
	for <prolog@swi.psy.uva.nl>; Fri, 14 Apr 2000 12:24:05 +0200 (MET DST)
Received: from rzstud1.rz.uni-karlsruhe.de (exim@rzstud1.rz.uni-karlsruhe.de [129.13.197.1])
	by mailgate.rz.uni-karlsruhe.de with esmtp (Exim 3.02 #2)
	id 12g3H6-0006IT-00; Fri, 14 Apr 2000 12:24:32 +0200
Received: from unoh by rzstud1.rz.uni-karlsruhe.de with local (Exim 2.12 #1)
	id 12g3H5-00048d-00
	for prolog@swi.psy.uva.nl; Fri, 14 Apr 2000 12:24:31 +0200
Subject: indeterministic ASSERT and RETRACT
To: prolog@swi.psy.uva.nl
Date: Fri, 14 Apr 2000 12:24:30 +0200 (CES)
From: unoh@rz.uni-karlsruhe.de (Jan Wedekind)
X-Mailer: ELM [version 2.4ME+ PL72 (25)]
Message-Id: <E12g3H5-00048d-00@rzstud1.rz.uni-karlsruhe.de>

   I would like to write an application in prolog, that will extract
knowledge from english sentences. I think, this program should add
the learned predicates to the prolog-database by using "assert/1".
   But the problem is, that "assert/1" has no indeterministic (I think you
all know this). So I do not now, how to write an indeterministic rule, which
will clean up all created predicates on backtracking. Can anyone propose
a solution for this?
   The reason, why I am posting to the SWI-Prolog specific mailing-list is,
that perhaps there is a possibility to solve this problem by creating a
new predicate "xassert" with the C-interface. However I do not now, how to
create such a predicate: The problem is, that after a cut-and-fail
(..., assertx( ... ), !, fail ) SWI-Prolog does not inform the C-routine
"PL_assertx" about the failure.
   If anyone has an answer to this problem, tell me! If there is a simple
PROLOG-solution for this problem, forgive me!

Jan Wedekind, student at University of Karlsruhe, Germany.

