Assert and retract

For compatibility reasons BinProlog has them, implemented on top of the more efficient blackboard manipulation builtins.

This is an approximation of other Prologs assert and retract predicates. It tries to be close to Sicstus and Quintus with their semantics. For efficiency and programming style reasons I strongly suggest not to use them too much.

If you want maximal efficiency use bb_def/3, bb_set/3, bb_val/3, bb_rm They give you access to a very fast hashing table <key,key>--> value, the same that BinProlog uses internally for indexing by predicate and first argument. They are close to other Prolog's `record' family, except that they do even less.

To use dynamic predicates it is a good idea to declare them with dynamic/1 although asserts will now be accepted even without such a declaration. To define dynamic code in a file you compile, dynamic declarations are mandatory.

To activate an asserted predicate it is a good idea to alway call it with

	?-metacall(Goal).

instead
of

	?- Goal.

However, this is not a strong requirement anymore, as an important number of users were unhappy with this restriction.

The dynamic predicates are:

assert/1
asserta/1
assertz/1

retract/1
clause/2
metacall/1
abolish/2

You can easily add others or improve them by looking to the sources in the file extra.pl.