Results 21 - 21 of 21
- M.SC. THESIS IN THE PROGRAMME "MÁSTER DE INVESTIGACIÓN EN TECNOLOGÍAS PARA EL DESARROLLO DE SISTEMAS SOFTWARE COMPLEJOS", DEPARTAMENTO DE LENGUAJES Y SISTEMAS INFORMÁTICOS E INGENIERÍA DEL SOFTWARE, UNIVERSIDAD POLITÉCNICA DE MADRID , 2009
"... Regarding higher-order functional languages, Reynolds noted that the semantics of the implementation language can interfere with the semantics of the object language. The same can be said about evaluation order in the context of evaluators. The culprit is the interpretation (or evaluation) of functi ..."
Abstract - Add to MetaCart
Regarding higher-order functional languages, Reynolds noted that the semantics of the implementation language can interfere with the semantics of the object language. The same can be said about evaluation order in the context of evaluators. The culprit is the interpretation (or evaluation) of function application. To solve the problem, Reynolds proposed the use of continuation-passing style and defunctionalisation. Danvy extended Reynolds’s work and showed that abstract machines can be derived from interpreters. In both cases, the object language is a typed extension of the lambda calculus with primitives and often the implementation language is call-by-value. We systematically study and implement evaluators and interpreters for the pure lambda calculus in Haskell, a non-strict, call-by-need, purely functional language. We start with naive (and inaccurate) versions, discussing the, now important, issues of free variables and independence from Haskell’s evaluation order. We present classic (non-monadic eval-apply and eval-case) as well as monadic evaluators that really implement appropriate semantics and evaluation orders by dint of special features such as strict application, continuations, and monads. We present novel generic evaluators and interpreters that generalise all previous ones. Genericity is achieved by parametrisation and by mixin composition. We explore and reduce the parameter space, or β-hypercube as we like to call it, and discuss parameter minimalisation and its impact on expressiveness. To our knowledge, our work is the first systematic Haskell implementation of lambda calculus interpreters and evaluators and the first generalistaion in generic versions. Generic interpreters open up an interesting research path to explore: the development of generic (if you will, “pluggable”) abstract machines.