next up previous contents
Next: The database: definition of Up: Toward a finite state Previous: Formal definition

Prolog preliminaries

%% A basic Prolog FSA
%% prologfsa.pl
%% D. Gibbon
%% 28 Oct 1997

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Basic predicates (do not worry about the definitions at this stage):

%% Backtrack (go back and take the next choice):
backtrack :- fail.

%% Carry on after backtracking:
perform(X) :- call(X),!,fail.
perform(_).

%% Member predicate:
member(Element,[Element|_]).
member(Element,[_|Rest]) :- member(Element,Rest).



Dafydd Gibbon
Fri Nov 28 02:24:58 MET 1997