Losing functions without gaining data: another look at defunctionalisation

  • Authors:
  • Neil Mitchell;Colin Runciman

  • Affiliations:
  • University of York, UK, York, United Kingdom;University of York, UK, York, United Kingdom

  • Venue:
  • Proceedings of the 2nd ACM SIGPLAN symposium on Haskell
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

We describe a transformation which takes a higher-order program, and produces an equivalent first-order program. Unlike Reynolds-style defunctionalisation, it does not introduce any new data types, and the results are more amenable to subsequent analysis operations. We can use our method to improve the results of existing analysis operations, including strictness analysis, pattern-match safety and termination checking. Our transformation is implemented, and works on a Core language to which Haskell programs can be reduced. Our method cannot always succeed in removing all functional values, but in practice is remarkably successful.