Subject: indeterministic ASSERT and RETRACT

From: [email-masked] (Jan Wedekind)
Date: Fri, 14 Apr 2000 12:24:30 +0200 (CES)

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.