ACM Home Page
Please provide us with feedback. Feedback
No assembly required: compiling standard ML to C
Full text PdfPdf (1.09 MB)
Source ACM Letters on Programming Languages and Systems (LOPLAS) archive
Volume 1 ,  Issue 2  (June 1992) table of contents
Pages: 161 - 177  
Year of Publication: 1992
ISSN:1057-4514
Authors
David Tarditi  Carnegie Mellon Univ., Pittsburgh, PA
Peter Lee  Carnegie Mellon Univ., Pittsburgh, PA
Anurag Acharya  Carnegie Mellon Univ., Pittsburgh, PA
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 5,   Downloads (12 Months): 38,   Citation Count: 10
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/151333.151343
What is a DOI?

ABSTRACT

C has been used as a portable target language for implementing languages like Standard ML and Scheme. Previous efforts at compiling these languages to C have produced efficient code, but have compromised on portability and proper tail recursion. We show how to compile Standard ML to C wihout making such compromises. The compilation technique is based on converting Standard ML to a continuation-passing style &lgr;-calculus intermediate language and then compiling this language to C. The code generated by this compiler achieves an execution speed that is about a factor of two slower than that generated by a native code compiler. The compiler generates highly portable code, yet still supports advanced features like garbage collection and first-class continuations. We analyze the performance and determine the aspects of the compilation method that lead to the observed slowdown. We also suggest changes to C compilers that would better support such compilation methods.


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
ACHARYA, A., AND KALP, D. Release notes for CParaOPS5 5.3 and ParaOPS5 4.4. Available with the CParaOPS5 release from School of Computer Science, Carnegie-Mellon Univ. Pittsburgh, Pa., May 1990.
 
2
 
3
 
4
APPEL, A.W. Compihng with Contmuatwns. Cambridge University Press, New York, 1992.
5
 
6
7
 
8
BARTLETT, J.F. SCHEME --~ C: A portable Scheme-to-C compiler. Tech. Rep., DEC Western Research Laboratory, Palo Alto, Calif., Jan. 1989.
 
9
COOPER, E. C., AND MORRISETT, J.G. Adding threads to Standard ML. Tech. Rep. CMU-CS- 90-186, School of Computer Science, Carnegie-Mellon Univ., Pittsburgh, Pa., Dec. 1990.
10
 
11
FELDMAN, S., GAY, D., MAIMONE, M. W., AND SCHYER, N. A Fortran-to-C converter. Comput. Sci. Tech. Rep. 149, AT & T Bell Laboratories, Murray Hill, N.J., May 1990.
 
12
GILLESPIE, D. The p2c translator. Available by anonymous ftp from csvax.cs.caltech.edu under the GNUcopyleft, 1989.
13
14
 
15
 
16
17
 
18
MARTIN, M. Entwurfund Implementierung eines bersetzers von Modula-2 nach C. Master's thesis, Faklutt fur Informatik, Univ. of Karlsruhe, Germany, Feb. 1990.
 
19
 
20
21
 
22
23
 
24
STALLMAN, R.M. Using and porting GNU CC. GNU CC is a widely available C compiler developed by the Free Software Foundation, Cambridge, Mass., Sept. 1989.
 
25
 
26
TARDITI, D., ACHARYA, A., AND LEE, P. No assembly required: Compiling Standard ML to C. Tech. Rep. CMU-CS-90-187, School of Computer Science, Carnegie-Mellon Univ., Pittsburgh, Pa., Nov. 1990.

CITED BY  10


REVIEW

"Martin Joseph Jourdan : Reviewer"

The authors show how ML, a higher-order functional language, can be implemented both quickly and efficiently on most commercial computers by compiling it to C, used as a portable intermediate language. The authors' compiler, sml2c, is based o  more...

Collaborative Colleagues:
David Tarditi: colleagues
Peter Lee: colleagues
Anurag Acharya: colleagues