Partial evaluation of pattern matching in strings
Information Processing Letters
How to make ad-hoc polymorphism less ad hoc
POPL '89 Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Realistic compilation by program transformation (detailed summary)
POPL '89 Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Deforestation: transforming programs to eliminate trees
Proceedings of the Second European Symposium on Programming
Partial evaluation and automatic program generation
Partial evaluation and automatic program generation
Combining analyses, combining optimizations
ACM Transactions on Programming Languages and Systems (TOPLAS)
Realistic compilation by partial evaluation
PLDI '96 Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation
C++ gems
Derivatives of Regular Expressions
Journal of the ACM (JACM)
MetaML and multi-stage programming with explicit annotations
Theoretical Computer Science - Partial evaluation and semantics-based program manipulation
Composing dataflow analyses and transformations
POPL '02 Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A Hybrid Approach to Online and Offline Partial Evaluation
Higher-Order and Symbolic Computation
Partial Evaluation of Computation Process—AnApproach to a Compiler-Compiler
Higher-Order and Symbolic Computation
SAIG '00 Proceedings of the International Workshop on Semantics, Applications, and Implementation of Program Generation
Array Design and Expression Evaluation in POOMA II
ISCOPE '98 Proceedings of the Second International Symposium on Computing in Object-Oriented Parallel Environments
ISCOPE '98 Proceedings of the Second International Symposium on Computing in Object-Oriented Parallel Environments
Automatically proving the correctness of compiler optimizations
PLDI '03 Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation
Implementing multi-stage languages using ASTs, Gensym, and reflection
Proceedings of the 2nd international conference on Generative programming and component engineering
Fast partial evaluation of pattern matching in strings
ACM Transactions on Programming Languages and Systems (TOPLAS)
Stream fusion: from lists to streams to nothing at all
ICFP '07 Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
The JastAdd system — modular extensible compiler construction
Science of Computer Programming
WebDSL: a domain-specific language for dynamic web applications
Companion to the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
GPCE '08 Proceedings of the 7th international conference on Generative programming and component engineering
Equality saturation: a new approach to optimization
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Regular-expression derivatives re-examined
Journal of Functional Programming
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages
Journal of Functional Programming
Generating compiler optimizations from proofs
Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Polyglot: an extensible compiler framework for Java
CC'03 Proceedings of the 12th international conference on Compiler construction
Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs
GPCE '10 Proceedings of the ninth international conference on Generative programming and component engineering
Lime: a Java-compatible and synthesizable language for heterogeneous architectures
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
The Spoofax language workbench
Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion
Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation
Firepile: run-time compilation for GPUs in scala
Proceedings of the 10th ACM international conference on Generative programming and component engineering
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
Classification and utilization of abstractions for optimization
ISoLA'04 Proceedings of the First international conference on Leveraging Applications of Formal Methods
PEPM '12 Proceedings of the ACM SIGPLAN 2012 workshop on Partial evaluation and program manipulation
A Heterogeneous Parallel Framework for Domain-Specific Languages
PACT '11 Proceedings of the 2011 International Conference on Parallel Architectures and Compilation Techniques
With-Loop fusion for data locality and parallelism
IFL'05 Proceedings of the 17th international conference on Implementation and Application of Functional Languages
Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs
Communications of the ACM
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
Program Transformation with Scoped Dynamic Rewrite Rules
Fundamenta Informaticae - Program Transformation: Theoretical Foundations and Basic Techniques. Part 2
Shonan challenge for generative programming: short position paper
PEPM '13 Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
Reify your collection queries for modularity and speed!
Proceedings of the 12th annual international conference on Aspect-oriented software development
Optimising purely functional GPU programs
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Data flow fusion with series expressions in Haskell
Proceedings of the 2013 ACM SIGPLAN symposium on Haskell
Forge: generating a high performance DSL implementation from a declarative specification
Proceedings of the 12th international conference on Generative programming: concepts & experiences
Spiral in scala: towards the systematic construction of generators for performance libraries
Proceedings of the 12th international conference on Generative programming: concepts & experiences
Composition and reuse with compiled domain-specific languages
ECOOP'13 Proceedings of the 27th European conference on Object-Oriented Programming
Proceedings of the 19th ACM SIGPLAN symposium on Principles and practice of parallel programming
Unifying functional and object-oriented programming with Scala
Communications of the ACM
Hi-index | 0.02 |
High level data structures are a cornerstone of modern programming and at the same time stand in the way of compiler optimizations. In order to reason about user- or library-defined data structures compilers need to be extensible. Common mechanisms to extend compilers fall into two categories. Frontend macros, staging or partial evaluation systems can be used to programmatically remove abstraction and specialize programs before they enter the compiler. Alternatively, some compilers allow extending the internal workings by adding new transformation passes at different points in the compile chain or adding new intermediate representation (IR) types. None of these mechanisms alone is sufficient to handle the challenges posed by high level data structures. This paper shows a novel way to combine them to yield benefits that are greater than the sum of the parts. Instead of using staging merely as a front end, we implement internal compiler passes using staging as well. These internal passes delegate back to program execution to construct the transformed IR. Staging is known to simplify program generation, and in the same way it can simplify program transformation. Defining a transformation as a staged IR interpreter is simpler than implementing a low-level IR to IR transformer. With custom IR nodes, many optimizations that are expressed as rewritings from IR nodes to staged program fragments can be combined into a single pass, mitigating phase ordering problems. Speculative rewriting can preserve optimistic assumptions around loops. We demonstrate several powerful program optimizations using this architecture that are particularly geared towards data structures: a novel loop fusion and deforestation algorithm, array of struct to struct of array conversion, object flattening and code generation for heterogeneous parallel devices. We validate our approach using several non trivial case studies that exhibit order of magnitude speedups in experiments.