PLOGHELP DATABASE                           Kathryn Seifert  July 1986

Overview of Prolog database operations

Keywords: overview, database, facts, clauses


A collection of facts and rules in Prolog is called a 'database'.  Since
Prolog programs are just such collections of facts and rules, programs
can be altered or examined by performing operations on the database.
Built-in predicates provided by Prolog enable programmers to construct
Prolog structures which are represented as clauses in the database, to
add clauses to the database, and to remove clauses from the database.

HELP files which cover these built-in predicates and related library
packages are listed below:

PLOGHELP * ABOLISH
 Predicate to remove all clauses with a given functor and arity from
 database.

PLOGHELP * ASSERT
 Predicate to add a clause to the database.

PLOGHELP * ASSERTA
 Predicate to add a clause to database before other clauses with the
 same predicate.

PLOGHELP * ASSERTZ
 Predicate to add a clause to database after other clauses with the same
 predicate.

PLOGHELP * CLAUSE
 Predicate which succeeds if a clause with a given body and head exists
 in the database.

PLOGHELP * LISTING
 Predicates for writing clauses in the database to output file.

PLOGHELP * RECORD
 Library program which provides indexed database facilities.

PLOGHELP * RETRACT
 Predicate to remove clauses matching a given pattern from database.

PLOGHELP * RETRACTALL
 Predicate to remove clauses whose heads match a given pattern from
 database.

PLOGHELP * DYNAMIC
 A facility for declaring predicates to be dynamic, meaning that their
 definitions are likely to change during the course of the program, usually
 because of clauses being asserted or retracted.

--- C.all/plog/help/database
--- Copyright University of Sussex 1991. All rights reserved. ----------
