The Kansas University rewrite engine

@article{Sculthorpe2014TheKU,
  title={The Kansas University rewrite engine},
  author={Neil Sculthorpe and Nicolas Frisby and Andy Gill},
  journal={Journal of Functional Programming},
  year={2014},
  volume={24},
  pages={434 - 473}
}
Abstract When writing transformation systems, a significant amount of engineering effort goes into setting up the infrastructure needed to direct individual transformations to specific targets in the data being transformed. Strategic programming languages provide general-purpose infrastructure for this task, which the author of a transformation system can use for any algebraic data structure. The Kansas University Rewrite Engine (KURE) is a typed strategic programming language, implemented as a… 
Theorem Provers as Libraries - An Approach to Formally Verifying Functional Programs
TLDR
This dissertation details a hybrid approach that captures the best of both worlds: the formality of a proof system paired with the native integration of an embedded, domain specific language (EDSL) for testing.
HERMIT: Mechanized Reasoning during Compilation in the Glasgow Haskell Compiler
TLDR
This dissertation investigates a solution, called HERMIT, which mechanizes reasoning during compilation, and is the first system capable of directly reasoning about the full Haskell language.
The HERMIT in the Tree - Mechanizing Program Transformations in the GHC Core Language
This paper describes our experience using the HERMIT toolkit to apply well-known transformations to the internal core language of the Glasgow Haskell Compiler. HERMIT provides several mechanisms to
Lightweight Higher-Order Rewriting in Haskell
TLDR
A generic Haskell library for expressing rewrite rules with a safe treatment of variables and binders, and it is shown by example that the library is capable of expressing useful simplifications that might be used in a compiler.
Making a Century in HERMIT Extended Abstract
TLDR
This extended abstract presents a detailed case study of HERMIT usage in practice: mechanising Bird’s classic “Making a Century” pearl, and uses the mechanised pearl to introduce recent HERMIT developments for supporting for equational reasoning.
The HERMIT in the stream: fusing stream fusion's concatMap
TLDR
A custom optimization plugin is developed which implements the proposed concatMap transformation, and a new translation scheme for list comprehensions which enables them to be optimized, and extends the transformation to monadic streams.
Optimizing SYB traversals is easy!
Reasoning with the HERMIT: tool support for equational reasoning on GHC core programs
TLDR
HerMIT's recently developed support for equational reasoning is described, and two case studies of HERMIT usage are presented: checking that type-class laws hold for specific instance declarations, and mechanising textbook equational Reasoning.
Optimizing SYB is easy!
TLDR
This paper optimizes SYB-style traversals to be as fast as handwritten, non-generic code, and benchmarks show that this optimization improves the speed of SYB -style code by an order of magnitude or more.
True sums of products
TLDR
The sum-of-products (SOP) view for datatype-generic programming (in Haskell) allows for the definition of powerful high-level traversal combinators, which in turn encourage thedefinition of generic functions in a compositional and concise style.
...
...

References

SHOWING 1-10 OF 72 REFERENCES
First Class Rules and Generic Traversals for Program Transformation Languages
TLDR
A pure non-strict functional language called RhoStratego is developed, incorporating features from Stratego, and a type system is developed which consists of the Hindley-Milner type system extended with rank-2 polymorphism and typing rules to support generic traversals.
Modular specification and dynamic enforcement of syntactic language constraints when generating code
TLDR
This work has integrated support for typesmart constructors into the run-time system of Stratego to enforce usage of typesmartconstructors implicitly whenever a regular constructor is called, and demonstrates how to derive them automatically from a grammar.
Scrap your boilerplate: a practical design pattern for generic programming
TLDR
This work describes a design pattern for writing programs that traverse data structures built from rich mutually-recursive data types that makes essential use of rank-2 polymorphism, an extension found in some implementations of Haskell.
Alloy: fast generic transformations for Haskell
TLDR
This work describes use cases for a generic system derived from work on a nanopass compiler, and detail a new generics approach (Alloy) that is developed in Haskell to allow the authors' compiler passes to traverse the abstract syntax tree quickly.
Run your research: on the effectiveness of lightweight mechanization
TLDR
Redex is a domain-specific language for semantic models that is embedded in the Racket programming language and comes with tools for the semantics engineering life cycle.
Building program optimizers with rewriting strategies
TLDR
An extended language in which the side-conditions and contextual rules that arise in realistic optimizer specifications can themselves be expressed as strategy-driven rewrites, and a low-level core language which has a clear semantics, can be implemented straightforwardly and can itself be optimized.
Stratego/XT 0.17. A language and toolset for program transformation
A survey of strategies in rule-based program transformation systems
  • E. Visser
  • Computer Science
    J. Symb. Comput.
  • 2005
Monad transformers and modular interpreters
TLDR
A fully modular interpreter based on monad transformers that incudes features missing from Steele's, Espinosa's, and Wadler's earlier efforts is designed and implemented in Gofer, whose constructor classes provide just the added power over Haskell's type classes to allow precise and convenient expression of the ideas.
A Haskell Hosted DSL for Writing Transformation Systems
TLDR
KURE is a strongly typed strategy control language in the tradition of Stratego and Strafunski intended for writing reasonably efficient rewrite systems, makes use of type families to provide a delimited generic mechanism for tree rewriting, and provides support for efficient identity rewrite detection.
...
...