Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Partial Evaluation

Introduction to Partial Evaluation

Talk at fp-syd October 2011

Tony Sloane

August 21, 2014
Tweet

More Decks by Tony Sloane

Other Decks in Programming

Transcript

  1. Introduction to Partial Evaluation Anthony M. Sloane [email protected] @inkytonik Programming

    Languages Research Group Department of Computing Macquarie University October 20, 2011
  2. Credit Tutorial on Online Partial Evaluation William R. Cook and

    Ralf Laemmel DSL 2011 Tutorial Implements the examples in Haskell My version is in Scala (of course)
  3. Partial Evaluation Evaluation of programs when some of the information

    they need is not available Offline: resolve as much as possible before evaluation Online: Evaluation proceeds as much as it can Termination is an important issue for online partial evaluation
  4. Demo and code walk Interpreter: evaluate everything Naive partial evaluation:

    unfold expressions, may not terminate Proper partial evaluation: differentiate between static and dynamic function arguments, evaluate function calls with their static arguments, creating new functions of the dynamic arguments