Abstract
HOP is a Scheme-based multi-tier programming language for the Web. The client-side of a program is compiled to JavaScript, while the server-side is executed by a mix of natively compiled code and interpreted code. At the time where HOP programs were basic scripts, the performance of the server-side interpreter was not a concern; an inefficient interpreter was acceptable. As HOP expanded, HOP programs got larger and more complex. A more efficient interpreter was necessary. This new interpreter is described in this paper. It is compact, its whole implementation counting no more than 2.5 KLOC. It is more than twice faster than the old interpreter and consumes less than a third of its memory. Although it cannot compete with static or JIT native compilers, our experimental results show that it is amongst the fastest interpreters for dynamic languages.
- J. Bell. Threaded code. Communications of the ACM, 16(6):370--372, 1973. Google Scholar
Digital Library
- C.-F. Bolz and A. Rigo. How to not write Virtual Machines for Dynamic Languages. July 2007.Google Scholar
- G. Boudol, Z. Luo, T. Rezk, and M. Serrano. Towards Reasoning for Web Applications: an Operational Semantics for Hop. In Proceedings of the first Workshop on Analysis and Programming Languages for Web Applications and Cloud Applications (APLWACA'10), Toronto, Canada, June 2010. Google Scholar
Digital Library
- S. Brunthaler. Efficient Interpretation using Quickening. In Proceedings of the Second Dynamic Languages Symposium, pages 1--14, 2010. Google Scholar
Digital Library
- S. Brunthaler. Interpreter instruction scheduling. In Proceedings of the 14th International Conference on Compiler Construction (CC), pages 164--178, Mar. 2011. Google Scholar
Digital Library
- CPython development team. Python/ceval.c, Feb. 2011.Google Scholar
- N. De Bruijn. Lambda Calculus Notation with Nameless Dummies: A Tool for Automatic Formula Manipulation, with Application to the Church-Rosser Theorem. Indagationes Mathematicae, 34(5):381--392, 1972.Google Scholar
Cross Ref
- A. Ertl and D. Gregg. The structure and performance of efficient interpreters. Journal of Instruction-Level Parallelism, 5:1--25, 2003.Google Scholar
- M. Feeley and G. Lapalme. Using closures for code generation. Computer Languages, 12:47--66, 1987. Google Scholar
Digital Library
- A. Gal, B. Eich, M. Shaver, D. Anderson, D. Mandelin, M.-R. Haghighat, B. Kaplan, G. Hoare, B. Zbarsky, J. Orendorff, J. Ruderman, E. W. Smith, R. Reitmaier, M. Bebenita, M. Chang, and M. Franz. Trace-based just-in-time type specialization for dynamic languages. In Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation, PLDI '09, pages 465--478, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- R. Ierusalimschy, L. H. de Figueiredo, and W. Celes. The implementation of Lua 5.0. Journal of Universal Computer Science, 7(11):1159--1176, 2005.Google Scholar
- R. Kelsey, W. Clinger, and J. Rees. The Revised(5) Report on the Algorithmic Language Scheme. Higher-Order and Symbolic Computation, 11(1), Sept. 1998. Google Scholar
Digital Library
- P. Klint. Interpretation techniques. Software - Practice & Experience, 11(9):963--973, September 1981.Google Scholar
- F. Loitsch and M. Serrano. Trends in Functional Programming, volume 8, chapter Hop Client-Side Compilation, pages 141--158. Seton Hall University, Intellect Bristol (ed. Morazán, M. T.), UK/Chicago, USA, 2008.Google Scholar
- M. Mihocka. No execute! - The Common CPU Interpreter Loop Revisited, Sept. 2008.Google Scholar
- S. Pemberton and M. Daniels. Pascal Implementation: the P4 Compiler and Interpreter. Ellis Horwood, 1983.Google Scholar
- M. Serrano. HOP, a Fast Server for the Diffuse Web. In Invited paper of the 11th international conference on Coordination Models and Languages (COORDINATION'09), Lisbon, Portugal, June 2009. Google Scholar
Digital Library
- M. Serrano and M. Feeley. Storage Use Analysis and its applications. In 1fst ACM Sigplan Int'l Conference on Functional Programming (ICFP), pages 50--61, Philadelphia, Penn, USA, May 1996. Google Scholar
Digital Library
- M. Serrano, E. Gallesio, and F. Loitsch. HOP, a language for programming the Web 2.0. In Proceedings of the First Dynamic Languages Symposium, Portland, Oregon, USA, Oct. 2006.Google Scholar
- M. Serrano and C. Queinnec. A multi-tier semantics for Hop. Higher Order and Symbolic Computation (HOSC), 2010. Google Scholar
Digital Library
- D. Tarditi, A. Acharya, and P. Lee. No assembly required: Compiling Standard ML to C. ACM Letters on Programming Languages and Systems, 2(1):161--177, 1992. Google Scholar
Digital Library
- O. Waddell, D. Sarkar, and K. Dybvig. Fixing letrec: A faithful yet efficient implementation of scheme's recursive binding construct. Higher-Order and Symbolic Computation, 18(3-4):299--326, 2005. Google Scholar
Digital Library
Index Terms
An interpreter for server-side hop
Recommendations
An interpreter for server-side hop
DLS '11: Proceedings of the 7th symposium on Dynamic languagesHOP is a Scheme-based multi-tier programming language for the Web. The client-side of a program is compiled to JavaScript, while the server-side is executed by a mix of natively compiled code and interpreted code. At the time where HOP programs were ...
Language design and implementation using ruby and the interpreter pattern
SIGCSE 08In this paper, the S-expression Interpreter Framework (SIF) is presented as a tool for teaching language design and implementation. The SIF is based on the interpreter design pattern and is written in the Ruby programming language. Its core is quite ...
Definitional Interpreters for Higher-Order Programming Languages
Higher-order programming languages (i.e., languages in which procedures or labels can occur as values) are usually defined by interpreters that are themselves written in a programming language based on the lambda calculus (i.e., an applicative language ...







Comments