Sciweavers

ICFP
2001
ACM

Down with Emacs Lisp: Dynamic Scope Analysis

14 years 4 months ago
Down with Emacs Lisp: Dynamic Scope Analysis
It is possible to translate code written in Emacs Lisp or another Lisp dialect which uses dynamic scoping to a more modern programming language with lexical scoping while largely preserving structure and readability of the code. The biggest obstacle to such an idiomatic translation from Emacs Lisp is the translation of dynamic binding into suitable instances of lexical binding: Many binding constructs in real programs in fact exhibit identical behavior under both dynamic and lexical binding. An idiomatic translation needs to detect as many of these binding constructs as possible and convert them into lexical binding constructs in the target language to achieve readability and efficiency of the target code. The basic prerequisite for such an idiomatic translation is thus a dynamic scope analysis which associates variable occurrences with binding constructs. We present such an analysis. It is an application of the Nielson/Nielson framework for flow analysis to a semantics for dynamic bi...
Matthias Neubauer, Michael Sperber
Added 13 Dec 2009
Updated 13 Dec 2009
Type Conference
Year 2001
Where ICFP
Authors Matthias Neubauer, Michael Sperber
Comments (0)