Partial evaluation and automatic program generation
Partial evaluation and automatic program generation
PEPM '95 Proceedings of the 1995 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
SIGGRAPH '95 Proceedings of the 22nd annual conference on Computer graphics and interactive techniques
Building domain-specific embedded languages
ACM Computing Surveys (CSUR) - Special issue: position statements on strategic directions in computing research
Two for the price of one: composing partial evaluation and compilation
Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation
Static and Dynamic Program Compilation by Interpreter Specialization
Higher-Order and Symbolic Computation
Partial Evaluation of Computation Process—AnApproach to a Compiler-Compiler
Higher-Order and Symbolic Computation
Offline partial evaluation can be as accurate as online partial evaluation
ACM Transactions on Programming Languages and Systems (TOPLAS)
Functional programming with the FC++ library
Journal of Functional Programming
A methodology for generating verified combinatorial circuits
Proceedings of the 4th ACM international conference on Embedded software
In search of a program generator to implement generic transformations for high-performance computing
Science of Computer Programming - Special issue on the first MetaOCaml workshop 2004
A transformational approach which combines size inference and program optimization
SAIG'01 Proceedings of the 2nd international conference on Semantics, applications, and implementation of program generation
Reasoning about multi-stage programs
ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
Hi-index | 0.00 |
We propose a combination of partial evaluation and staged interpretation with MetaOCaml for rapid prototyping of domain-specific languages. Interpretation is an easy way to implement such languages. MetaOCaml can eliminate the overhead of interpretation at run-time, if the interpreter is written in a staged form, i.e., takes the source program separate from the input data in a first stage. Partial evaluation of the source program with values known at compile time can further improve the target code performance. Additional aggressive optimizations are possible due to the absence of general recursion. Algebraic simplifications can even achieve binding-time improvements during the online partial evaluation. Our approach both saves the application programmer completely from binding-time considerations and exploits staged interpretation with MetaOCaml for target code generation.The example domain presented in this paper is image processing, in which the domain-specific language permits the specification of convolution matrices, summations, case distinctions and non-local pixel accesses. All expressions known at compile time are simplified and all remaining expressions are turned into MetaOCaml code parts, which are combined to form the compiled application program.The example specifications deal with filtering by convolution and iterations in a series of images for wave effects and temperature distribution.The experimental results show significant speed-ups if online partial evaluation with algebraic simplifications is used for the elimination of interpretation overhead and optimization of code expressions.