This package contains a partial evaluator for Curry implemented in Curry by Elvira Albert, German Vidal (UPV), and Michael Hanus (CAU Kiel). Note that this partial evaluator is based on technical results published in 2002 and does not consider sharing. As a consequence, the partial evaluator is correct only for programs which do not contain non-deterministic operations, i.e., are confluent in the sense of classical term rewriting systems.
This partial evaluator is integrated in PAKCS as follows:
After loading some program into PAKCS, this program can be partially evaluated by the command ":peval".
The expressions to be partially evaluated must be marked in the program by (PEVAL ...) where PEVAL is the identity function (defined in the standard prelude).
The marked expressions are partially evaluated and replaced by their partially evaluated versions. This modified program is stored in "
The partially evaluated program "
If you want to run this version stand-alone (i.e., independent from PAKCS), you can partially evaluate program
curry-pevalns <prog>