function - translate Prolog with functional notation into "raw" Prolog
--------

Files in this directory:

fun.nl     - code to translate a ".fun" file into a ".nl" file
fun_gr.gr  - the grammar rules
test.fun   - a sample program for testing


To Run
------

% ../../ptn				% load ptn

NU-Prolog 1.6.4
1?- gr2nl(fun_gr).			% translate grammar rules
true.					% create ".nl" file - once only

2?- consult(fun_gr).			% consult grammar rules
Consulting fun_gr.nl.			% (ignore warning)	
Warning: descendent/2 redefined
true.					  

3?- consult(fun).			% consult functional notation translator
Consulting fun.nl.
true.

4?- fun(test).				% perform translation on file test.fun
true.					% new file test.nl created

				% Inspect the file test.nl

Some Explanation
----------------

This directory contains an example of using PTN to translate Prolog
predicates which use a functional notation (i.e. terms can be
functions). In this example, terms can be of the form:

	Goal >>	Var

Such a term is replaced by the Var, and the Goal is added to the front 
of the body.

For example,

fact1( X, fred>>Y) :-
	fact2( one).

will be replaced by:

fact1( X, Y) :-
	fred,
	fact2( one). 



{Liz Haywood May 1994}

