FPCA '93 Proceedings of the conference on Functional programming languages and computer architecture
Building program optimizers with rewriting strategies
ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
Continuation-Based Program Transformation Strategies
Journal of the ACM (JACM)
Scrap your boilerplate: a practical design pattern for generic programming
Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation
Typed Combinators for Generic Traversal
PADL '02 Proceedings of the 4th International Symposium on Practical Aspects of Declarative Languages
Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming
Typed combinators for generic traversal
Typed combinators for generic traversal
Term rewriting with traversal functions
ACM Transactions on Software Engineering and Methodology (TOSEM)
Journal of Functional Programming
Scrap more boilerplate: reflection, zips, and generalised casts
Proceedings of the ninth ACM SIGPLAN international conference on Functional programming
Monadification of functional programs
Science of Computer Programming - Special issue on program transformation
Scrap your boilerplate with class: extensible generic functions
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
Program Transformation with Scoped Dynamic Rewrite Rules
Fundamenta Informaticae - Program Transformation: Theoretical Foundations and Basic Techniques. Part 2
A survey of strategies in rule-based program transformation systems
Journal of Symbolic Computation
“Scrap your boilerplate” reloaded
FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
Uniform boilerplate and list processing
Haskell '07 Proceedings of the ACM SIGPLAN workshop on Haskell workshop
Programming Errors in Traversal Programs Over Structured Data
Electronic Notes in Theoretical Computer Science (ENTCS)
Programming errors in traversal programs over structured data
Science of Computer Programming
Hi-index | 0.00 |
Haskell programmers who deal with complex data types often need to apply functions to specific nodes deeply nested inside of terms. Typically, implementations for those applications require so-called boilerplate code, which recursively visits the nodes and carries the functions to the places where they need to be applied. The scrap-your-boilerplate approach proposed by Lämmel and Peyton Jones tries to solve this problem by defining a general traversal design pattern that performs the traversal automatically so that the programmers can focus on the code that performs the actual transformation.In practice we often encounter applications that require variations of the recursion schema and call for more sophisticated generic traversals. Defining such traversals from scratch requires a profound understanding of the underlying mechanism and is everything but trivial.In this paper we analyze the problem domain of recursive traversal strategies, by integrating and extending previous approaches. We then extend the scrap-your-boilerplate approach by rich traversal strategies and by a combination of transformations and accumulations, which leads to a comprehensive recursive traversal library Reclib in a statically typed framework.We define a two-layer library targeted at general programmers and programmers with knowledge in traversal strategies. The highlevel interface defines a universal combinator that can be customized to different one-pass traversal strategies with different coverage and different traversal order. The lower-layer interface provides a set of primitives that can be used for defining more sophisticated traversal strategies such as fixpoint traversals. The interfaceis simple and succinct. Like the original scrap-your-boilerplate approach, it makes use of rank-2 polymorphism and functional dependencies, implemented in GHC.