Non-procedural (Declarative)
Languages. A set of facts
and a set of rules is declared - from which, information is
deduced. Declarative languages consist of logic languages
(eg PROLOG) and functional languages
(eg LISP).
PROLOG is particularly suited to developing expert
systems.
- a program consists of a number of facts
parent(Tom, Bob)
parent(Pam, Bob)
male(Tom)
and a set of rules
father(X,Y) :=
parent(X,Y)
male(X)
brother(X,Y) :=
parent(Z,X)
parent(Z,Y)
male(X)
and a query which is answered by applying
the facts and rules eg
? father(who, Bob)
which would return the answer
who = Tom
LISP is useful for programming AI (Artificial
Intelligence) systems.
LISP stands for
LISt Processing. It is an example of a functional
language, and a LISP program consists of a series of function
definitions.
Example : The
statement
(insects(beetles
biting_flies (mosquitoes midges horseflies) dragon_flies))
is a representation of the hierarchical
diagram :

|