If -Term then an error error(type, Message) is thrown if either Functor or Arity are unbound. If Arity < 0 then error(value, Message) is thrown.
Errors thrown are
The database is a logical database. Which means that the a call to a predicate uses the list of clauses that exist at the time the call was made. According to the ANSI standard prolog.
assert((+Head :- ?Body)) For this case, head must be an atom or a compound term.
assert(Fact) :- Fact \= (_Head :- _Body)
If the first case does not apply this case does. A fact is asserted in the database with functor(Fact, Functor, Arity) and no body.
retract(+Head, Body)
retractall(Head)
abolish(Head)
Head is an atom or a compound term. All clauses whose head unifies with Head will be removed from the database. All information about the predicate Functor/Arity (where functor(Head, Functor, Arity)) will be removed.
findall(?Term, +Call, ?Terms) Terms is a list where each element in Terms is the value of Term after a call to call succeeds. The element appear in the same order that Call generates them. throws error(type, Message) is Call is not callable.
setof(X, Call, List)
Same as bagof/3 except List is sorted and contains no duplicates, (using @=/2 test). There seems to be a bug in this.
Equivalent to repeat. repeat :- repeat.