University of Limerick
Browse

A practical solution for achieving language compatibility in scripting language compilers

Download (316.31 kB)
journal contribution
posted on 2012-07-17, 14:54 authored by Paul Biggar, Edsko de Vries, David Gregg
Although scripting languages have become very 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 C APIs, used both for foreign-function interfaces and to write third-party extensions. These APIs typically have tight integration with the original implementation, and are used to provide large standard libraries, which are difficult to re-use, and costly to reimplement. Finally, they support run-time code generation. These features make it difficult to design a fully compatible compiler. 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 in our generated code. We support all of these important scripting language features. Additionally, our approach allows us to automatically support limited future language changes. We present a discussion and performance evaluation of this technique.

Funding

A new method for transforming data to normality with application to density estimation

National Research Foundation

Find out more...

History

Publication

Science of Computer Programming;77(9), pp. 971-989

Publisher

Elsevier

Note

peer-reviewed

Other Funding information

IRCSET, SFI

Rights

This is the author’s version of a work that was accepted for publication in Science of Computer Programming. Changes resulting from the publishing process, such as peer review, editing, corrections, structural formatting, and other quality control mechanisms may not be reflected in this document. Changes may have been made to this work since it was submitted for publication. A definitive version was subsequently published in Science of computer Programming 77(9), pp. 971-989 http://dx.doi.org/10.1016/j.scico.2011.01.004

Language

English

Usage metrics

    University of Limerick

    Categories

    No categories selected

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC