Slide 1

Slide 1 text

Introduction to Partial Evaluation Anthony M. Sloane [email protected] @inkytonik Programming Languages Research Group Department of Computing Macquarie University October 20, 2011

Slide 2

Slide 2 text

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)

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Further information Haskell version and DSL 2011 paper draft: http://softlang.uni-koblenz.de/dsl11/ Scala version: https://bitbucket.org/inkytonik/partialeval