Abstract
Hybrid partial evaluation (HPE) is a pragmatic approach to partial evaluation that borrows ideas from both online and offline partial evaluation. HPE performs offline-style specialization using an online approach without static binding time analysis. The goal of HPE is to provide a practical and predictable level of optimization for programmers, with an implementation strategy that fits well within existing compilers or interpreters. HPE requires the programmer to specify where partial evaluation should be applied. It provides no termination guarantee and reports errors in situations that violate simple binding time rules, or have incorrect use of side effects in compile-time code. We formalize HPE for a small imperative object-oriented language and describe Civet, a straightforward implementation of HPE as a relatively simple extension of a Java compiler. Code optimized by Civet performs as well as the output of a state-of-the-art offline partial evaluator.
- Andersen, L.: Program Analysis and Specialization for the C Programming Language. Ph.D. thesis, University of Copenhagen (1994), DIKU Research Report 94/19Google Scholar
- Braux, M., Noyé, J.: Towards partially evaluating reflection in Java. In: Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM). pp. 2--11. ACM, New York, NY, USA (1999) Google Scholar
Digital Library
- Brzozowski, J.A.: Derivatives of regular expressions. J. ACM 11, 481--494 (October 1964), http://doi.acm.org/10.1145/321239.321249 Google Scholar
Digital Library
- Bulyonkov, M.: A theoretical approach to polyvariant mixed computation. Partial Evaluation and Mixed Computation (PEMC) pp. 51--64 (1988)Google Scholar
- Consel, C.: Polyvariant binding-time analysis for applicative languages. In: Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM). pp. 66--77 (1993) Google Scholar
Digital Library
- Consel, C., Hornof, L., Marlet, R., Muller, G., Thibault, S., Volanschi, E.N., Lawall, J., Noyé, J.: Tempo: specializing systems applications and beyond. ACM Comput. Surv. p. 19 (1998) Google Scholar
Digital Library
- Dean, J., Chambers, C., Grove, D.: Identifying profitable specialization in object-oriented languages. Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM) pp. 85--96 (1994)Google Scholar
- Dussart, D., Bevers, E., Vlaminck, K.D.: Polyvariant constructor specialisation. In: Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM). pp. 54--65 (1995) Google Scholar
Digital Library
- Ekman, T., Hedin, G.: The JastAdd system -- modular extensible compiler construction. Sci. Comput. Program. 69(1--3), 14--26 (2007) Google Scholar
Digital Library
- Ershov, A.P., Ostrovski, B.N.: Controlled mixed computation and its application to systematic development of language-oriented parsers. In: The IFIP TC2/WG 2.1 Working Conference on Program specification and transformation. pp. 31--48. North-Holland Publishing Co. (1987) Google Scholar
Digital Library
- Futamura, Y.: Partial evaluation of computation process - an approach to a compiler-compiler. Systems, Computers, Controls 2, 45--50 (1999)Google Scholar
- Hen-Tov, A., Lorenz, D.H., Pinhasi, A., Schachter, L.: Modeltalk: When everything is a domain-specific language. IEEE Softw. 26, 39--46 (July 2009) Google Scholar
Digital Library
- Jones, N.D., Gomard, C.K., Sestoft, P.: Partial evaluation and automatic program generation. Prentice-Hall, Inc., Upper Saddle River, NJ, USA (1993) Google Scholar
Digital Library
- Jones, S.P.: Haskell 98 Language and Libraries. Cambridge University Press (2003)Google Scholar
- Lawall, J.L., Danvy, O.: Continuation-based partial evaluation. SIGPLAN Lisp Pointers VII, 227--238 (July 1994) Google Scholar
Digital Library
- Le Meur, A.F., Lawall, J.L., Consel, C.: Specialization scenarios: A pragmatic approach to declaring program specialization. Higher Order Symbol. Comput. 17(1--2), 47--92 (2004) Google Scholar
Digital Library
- Lindholm, T., Yellin, F.: Java(TM) Virtual Machine Specification, The (2nd Edition). Prentice Hall PTR, 2 edn. (April 1999) Google Scholar
Digital Library
- Löh, A.: lhs2tex. http://people.cs.uu.nl/andres/lhs2tex/Google Scholar
- Marquard, M., Steensgaard, B.: Partial Evaluation of an Object-Oriented Imperative Language. Master's thesis, University of Copenhagen (DIKU) (April 1992)Google Scholar
- Meyer, U.: Correctness of on-line partial evaluation for a Pascal-like language. Sci. Comput. Program. 34(1), 55--73 (1999) Google Scholar
Digital Library
- Møller, A.: Finite-state automata and regular expressions for Java (2010), \texttthttp://www.brics.dk/automaton/Google Scholar
- Poole, J.D.: Model-driven architecture: Vision, standards and emerging technologies. In: ECOOP 2001, Workshop on Metamodeling and Adaptive Object Models (2001)Google Scholar
- Ruf, E., Weise, D.: Opportunities for online partial evaluation. Tech. Rep. CSL-TR-92--516, Computer Systems Laboratory, Stanford University, Stanford, CA (April 1992) Google Scholar
Digital Library
- Ruf, E.S.: Topics in online partial evaluation. Ph.D. thesis, Stanford University, Stanford, CA, USA (1993) Google Scholar
Digital Library
- Schultz, U.P., Lawall, J.L., Consel, C.: Automatic program specialization for Java. ACM Trans. Program. Lang. Syst. 25(4), 452--499 (2003) Google Scholar
Digital Library
- Schultz, U.P.: Partial evaluation for class-based object-oriented languages. In: PADO '01: Proceedings of the Second Symposium on Programs as Data Objects. pp. 173--197. Springer-Verlag, London, UK (2001) Google Scholar
Digital Library
- Thiemann, P., Dussart, D.: Partial evaluation for higher-order languages with state (1996), unpublished manuscriptGoogle Scholar
- Wadler, P.: Monads for functional programming. In: Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text. pp. 24--52. Springer-Verlag, London, UK (1995) Google Scholar
Digital Library
Index Terms
Hybrid partial evaluation
Recommendations
Hybrid partial evaluation
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsHybrid partial evaluation (HPE) is a pragmatic approach to partial evaluation that borrows ideas from both online and offline partial evaluation. HPE performs offline-style specialization using an online approach without static binding time analysis. ...
Realistic compilation by partial evaluation
Two key steps in the compilation of strict functional languages are the conversion of higher-order functions to data structures (closures) and the transformation to tail-recursive style. We show how to perform both steps at once by applying first-order ...
Practical partial evaluation for high-performance dynamic language runtimes
PLDI 2017: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and ImplementationMost high-performance dynamic language virtual machines duplicate language semantics in the interpreter, compiler, and runtime system. This violates the principle to not repeat yourself. In contrast, we define languages solely by writing an ...







Comments