This module performs some compression on the resultants. This is necessary because the termination criteria leads to many intermediate specializations which occur only once and can therefore be inlined.
Note that some optimizations may never be applied depending on the partial evaluation mechanism.
Author: Elvira Albert, German Vidal, Michael Hanus, Björn Peemöller
Version: September 2015
postUnfold
:: Options -> [(String,String)] -> [(Expr,((String,String),[Int]))] -> [(((String,String),[Int]),Expr)] -> ([(Expr,((String,String),[Int]))],[(((String,String),[Int]),Expr)])
Compress the resultants. |
unAlias
:: [(Expr,((String,String),[Int]))] -> [(((String,String),[Int]),Expr)] -> ([(Expr,((String,String),[Int]))],[(((String,String),[Int]),Expr)])
Remove aliases and duplicates. |
removeCopies
:: Prog -> [(Expr,((String,String),[Int]))] -> [(((String,String),[Int]),Expr)] -> ([(Expr,((String,String),[Int]))],[(((String,String),[Int]),Expr)])
Removes any resultants that are copies of ordinary program functions to avoid code duplication. |
Compress the resultants.
|