ACM Home Page
Please provide us with feedback. Feedback
Down with Emacs Lisp: dynamic scope analysis
Full text PdfPdf (216 KB)
Source International Conference on Functional Programming archive
Proceedings of the sixth ACM SIGPLAN international conference on Functional programming table of contents
Florence, Italy
Session: Session 1 table of contents
Pages: 38 - 49  
Year of Publication: 2001
ISBN:1-58113-415-0
Also published in ...
Authors
Matthias Neubauer  Univ. Freiburg
Michael Sperber  Univ. Tübingen
Sponsor
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 0,   Downloads (12 Months): 20,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues   peer to peer  

Tools and Actions: Review this Article  
Save this Article to a Binder    Display Formats: BibTex  EndNote ACM Ref   
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/507635.507642
What is a DOI?

ABSTRACT

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 binding akin to Moreau's. Its implementation handles a substantial portion of Emacs Lisp, has been applied to realistic Emacs Lisp code, and is highly accurate and reasonably efficient in practice.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
2
 
3
P. Bothner. JEmacs-the java/scheme-based emacs. In Proceedings of the FREENIX Track; 2000 USENIX Annual Technical Conference (FREENIX-00), pages 271-278, Berkeley, CA. June 18-23 2000. USENIX Ass.
 
4
P. Bothner. JEmacs --the Java/Scheme-based Erases text editor. http://jemacs.sourceforge.net/. Feb. 2001.
 
5
H. B. Curry and R. Feys. Combinatory Logic, volume I. North-Holland, Amsterdam, 1958.
 
6
M. Felleisen and D. P. Friedman, Control operators, the SECD-machine, and the A-calculus. In M. Wirsing, editor, Formal Description of Programming Concepts III, pages 193-217. NorthHolland, 1986.
 
7
C. Flanagan and M. Felleisen. Set-based analysis for full scheme and its use in soft-typing. Technical Report TR95-254, Rice University, Oct., 1995.
8
 
9
 
10
Guile Emacs. http://gemacs.sourceforge.net/, July 2000.
 
11
R. Harper and C. Stone. An interpretation of Standard ML in type theory. Technical Report CMU-CS-97- i47, Carnegie Mellon University, Pittsburgh, PA, June 1997. (Also published as Fox Memorandum CMU-CS-FOX-97-01.).
12
 
13
14
 
15
 
16
B. Lewis, D. LaLiberte, R. Stallman, and the GNU Manual Group. GNU Emacs Lisp reference manual. http //vww gnu. org/manual/elisp-manual-20-2 .5/ elisp.html, 1785.
17
 
18
19
 
20
 
21
M. Neubauer. Dynamic scope analysis for Emacs Lisp. Master's thesis, Ebcrhard-KarlsUniversitt Tuhirigen, Dec. 2000. http: //www. ml ormatik. uni-freiburg. de/Theubauer/diplom.ps.gz.
22
 
23
G. D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN19. Computer Science Department, Aarhus University, Aarhus, Denmark. Sept. 1981.
 
24
 
25
K. Raeburn. Guile-based Emacs. http: //www.mit.edu/raeburn/guilemacs/, July 1999.
26
 
27
 
28
R. Stallman. GNU extension language plans. Usenet article. Oct. 1994.
 
29
B. Wing. XEmacs Lisp Reference Manual, ftp://ftp.xemacs.org/pub/xemacs/docs!a4/ lispref-a4.pdf.gz, May 1999. Version 3.4.
 
30
 
31
32


Collaborative Colleagues:
Matthias Neubauer: colleagues
Michael Sperber: colleagues

Peer to Peer - Readers of this Article have also read: