ACM Home Page
Please provide us with feedback. Feedback
A practical solution for scripting language compilers
Full text PdfPdf (316 KB)
Source
Symposium on Applied Computing archive
Proceedings of the 2009 ACM symposium on Applied Computing table of contents
Honolulu, Hawaii
SESSION: Programming languages track table of contents
Pages 1916-1923  
Year of Publication: 2009
ISBN:978-1-60558-166-8
Authors
Paul Biggar  Trinity College Dublin, Ireland
Edsko de Vries  Trinity College Dublin, Ireland
David Gregg  Trinity College Dublin, Ireland
Sponsor
SIGAPP: ACM Special Interest Group on Applied Computing
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 20,   Downloads (12 Months): 72,   Citation Count: 0
Additional Information:

abstract   references   index terms   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/1529282.1529709
What is a DOI?

ABSTRACT

Although scripting languages are becoming increasingly popular, even mature scripting language implementations remain interpreted. Several compilers and reimplementations have been attempted, generally focusing on performance.

Based on our survey of these reimplementations, we determine that there are three important features of scripting languages that are difficult to compile or reimplement. Since scripting languages are defined primarily through the semantics of their original implementations, they often change semantics between releases. They provide large standard libraries, which are difficult to re-use, and costly to reimplement. They provide C APIs, used both for foreign-function-interfaces and to write third-party extensions. These APIs typically have tight integration with the original implementation. Finally, they support run-time code generation. These features make the important goal of correctness difficult to achieve.

We present a technique to support these features in an ahead-of-time compiler for PHP. Our technique uses the original PHP implementation through the provided C API, both in our compiler, and an our generated code. We support all of these important scripting language features, particularly focusing on the correctness of compiled programs. Additionally, our approach allows us to automatically support limited future language changes. We present a discussion and performance evaluation of this technique, which has not previously been published.


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
J. Aycock. Converting Python virtual machine code to C. In Proceedings of the 7th International Python Conference, 1998.
2
 
3
J. Aycock, D. Pereira, and G. Jodoin. UCPy: Reverse engineering Python. In PyCon DC2003, March 2003.
 
4
J. Benda, T. Matousek, and L. Prosek. Phalanger: Compiling and running PHP applications on the Microsoft .NET platform. In .NET Technologies 2006, May 2006.
 
5
E. de Vries and J. Gilbert. Design and implementation of a PHP compiler front-end. Dept. of Computer Science Technical Report TR-2007-47, Trinity College Dublin, 2007.
 
6
M. Dufour. Shed Skin: An optimizing Python-to-C++ compiler. Master's thesis, Delft University of Technology, 2006.
 
7
G. Ewing. Pyrex - a Language for Writing Python Extension Modules. http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/.
8
 
9
S. Golemon. Extending and Embedding PHP. Sams, Indianapolis, IN, USA, 2006.
 
10
R. Ierusalimschy, L. H. de Figueiredo, and W. Celes. The implementation of Lua 5.0. Journal of Universal Computer Science, 11(7):1159--1176, Jul 2005.
 
11
G. Johnson and Z. Slattery. PHP: A language implementer's perspective. International PHP Magazine, pages 24--29, Dec 2006.
 
12
D. M. Jones. Forms of language specification: Examples from commonly used computer languages. ISO/IEC JTC1/SC22/OWG/N0121, February 2008.
 
13
JRuby {online}. http://www.jruby.org.
 
14
Jython {online}. http://www.jython.org.
 
15
 
16
N. Lopes. Building a JIT compiler for PHP in 2 days {online}. http://11vm.org/devmtg/2008-08/.
 
17
H. Muhammad and R. Ierusalimschy. C APIs in extension and extensible languages. Journal of Universal Computer Science, 13(6):839--853, 2007.
18
 
19
Quercus: PHP in Java. http://www.caucho.com/resin/doc/quercus.xtp.
20
 
21
Roadsend, Inc. Roadsend PHP 2.9.x Manual. http://code.roadsend.com/pcc-manual.
 
22
M. Salib. Starkiller: A static type inferencer and compiler for Python. Master's thesis, Massachusetts Institute of Technology, 2004.
 
23
 
24
The PHP Group. Zend benchmark {online}. http://cvs.php.net/viewvc.cgi/ZendEngine2/bench.php?view=co.
 
25
26

Collaborative Colleagues:
Paul Biggar: colleagues
Edsko de Vries: colleagues
David Gregg: colleagues