Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!swrinde!ihnp4.ucsd.edu!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!lee
From: lee@munta.cs.mu.OZ.AU (Lee Naish)
Subject: Re: Preprocessor for Functional Rewriting?
Message-ID: <9503112.3971@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU (-)
Organization: Department of Computer Sci, University of Melbourne
References: <3ghvhj$e8@borg.cs.waikato.ac.nz>
Date: Tue, 31 Jan 1995 01:15:17 GMT
Lines: 47

In article <3ghvhj$e8@borg.cs.waikato.ac.nz> dsmith@borg.cs.waikato.ac.nz (Don Smith) writes:
>Can someone make available a preprocessor for Prolog to enable use of 
>functional notation (say, rewriting via flattening and residuation, or even
>narrowing) in body literals? I've heard it said that it's "easy" to write 
>such a preprocessor.  But there seem to be no preprocessors in widespread 
>use and it's probably not so easy to write a well-integrated and relatively
>foolproof system. 

If you have NU-Prolog you can get a copy of NUE-Prolog via ftp.

From http://muse.cs.mu.oz.au/~lee/papers/eq/index.html:

Adding equations to NU-Prolog 

Lee Naish 


This paper describes an extension to NU-Prolog which allows
evaluable functions to be defined using equations. We consider
it to be the most pragmatic way of combining functional and
relational programming. The implementation consists of several
hundred lines of Prolog code and the underlying Prolog
implementation was not modified at all. However, the system is
reasonably efficient and supports coroutining, optional lazy
evaluation, higher order functions and parallel execution.
Efficiency is gained in several ways. First, we use some new
implementation techniques. Second, we exploit some of the
unique features of NU-Prolog, though these features are not
essential to the implementation. Third, the language is
designed so that we can take advantage of implicit mode and
determinism information. Although we have not concentrated on
the semantics of the language, we believe that our language
design decisions and implementation techniques will be useful
in the next generation of combined functional and relational
languages. 


From http://muse.cs.mu.oz.au/~lee/src/eq/index.html:

ftp turiel.cs.mu.oz.au    (128.250.1.10)
cd pub
get nueprolog.tar.Z

To run it you will need a copy of NU-Prolog (maybe there will
be a portable version some day) 

	lee
