__  __
 _ __  _ __ ___  / _|/ _|
| '_ \| '__/ _ \| |_| |_
| |_) | | | (_) |  _|  _|
| .__/|_|  \___/|_| |_|
|_|

A web interface is now available!


proff: a Prolog offline partial evaluator (v0.2b)

This is a simple implementation (less than 2000 lines of code) of an offline partial evaluator for Prolog programs. The current implementation contains 5 files:

A technical description of the size-change analysis, the annotation procedure and the offline partial evaluator can be found in this paper.

The source code of the partial evaluator can be downloaded here: proff.tgz. Once you have downloaded this file, you should unpack it, e.g.

tar xvfz proff.tgz
so that a folder proff is created which contains the source files of the partial evaluator and a subfolder examples with several simple examples. In order to run the partial evaluator, you can follow these steps:

You may try partially evaluating of all examples in folder examples (detailed instructions appear in the source code of every example). The following table shows some experimental results using these examples. We used SICStus 3.12.5 (x86-linux-glibc2.3) running on a PC, Pentium D 2.8GHz, 2GB of RAM, with Fedora Core 5 Linux.

benchmark run time
(original program)
run time
(specialised program)
speedup
applast 640 390 1.64
depth 280 120 2.33
incList 280 50 5.60
match 850 560 1.52
matchappend 240 230 1.04
power 290 300 0.97
regexp 130 90 1.44
rev_acc_type 510 490 1.04
average speedup 1.95

Please report any bug or comment to gvidal (at) dsic (dot) upv (dot) es.

MiST ELP GPLIS DSIC UPV


Last update / Germán Vidal