List-Processing Optimizer for Curry

An automatic optimizer for Functional Logic Programs


This is a prototype implementation of the list-processing optimizations described in [AFSV00]. Our system implements source-to-source transformations for improving the efficiency of list-processing functions in Curry programs. In particular, we consider two list-processing optimizations which are fully automatic:

  • Short-cut deforestation: this is an adaptation of the short cut deforestation intoduced by Gill et al. [GLP93]. The goal of deforestation is the removal of some intermediate data structures which are not necessary to compute the final result.

  • Optimization by Accumulating Parameters: this technique achieves a similar effect than the logic difference-list transformation [MS93] but over functional (logic) programs. The goal is to optimize functions which build independently sections of a list to be later combined together by a concatenation.
  • Our prototype system optimizes FlatCurry programs, i.e., programs written in the standard intermediate Curry language. Moreover, it is completely written in Curry itself using facilities provided by the meta-programming module of PACS. The system reads a Curry program and translates it to FlatCurry. Then, it applies both optimizations and, finally, writes out the optimized program (in FlatCurry form). Thus, it can be easily incorporated into a real compiler (e.g., PACS) since the process is fully automatic and transparent to the user. A detailed description of the transformations can be found in [AFSV00].

    A user's manual describing the system is available.

    Here, you can get a prototype implementation of the system (no modification in the PACS system is required!). The prototype system contains the following files:



     
    ELP GPLIS DSIC UPV

     

    Last update March 2000# cferri@dsic.upv.es , gvidal (at) dsic (dot) upv (dot) es