Attribute grammars as a functional programming paradigm
Proc. of a conference on Functional programming languages and computer architecture
The use of program dependence graphs in software engineering
ICSE '92 Proceedings of the 14th international conference on Software engineering
Partial evaluation and automatic program generation
Partial evaluation and automatic program generation
A calculational fusion system HYLO
Proceedings of the IFIP TC 2 WG 2.1 international workshop on Algorithmic languages and calculi
Attribute grammars in the functional style
Proceedings of the IFIP TC2 WG2.4 working conference on Systems implementation 2000 : languages, methods and tools: languages, methods and tools
Breadth-first numbering: lessons from a small exercise in algorithm design
ICFP '00 Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
Higher Order Attribute Grammars
Proceedings on Attribute Grammars, Applications and Systems
Data Structure Free Compilation
CC '99 Proceedings of the 8th International Conference on Compiler Construction, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS'99
A Survey of Program Slicing Techniques.
A Survey of Program Slicing Techniques.
Using Circular Programs to Deforest in Accumulating Parameters
Higher-Order and Symbolic Computation
A shortcut fusion rule for circular program calculation
Haskell '07 Proceedings of the ACM SIGPLAN workshop on Haskell workshop
Shortcut fusion rules for the derivation of circular and higher-order monadic programs
Proceedings of the 2009 ACM SIGPLAN workshop on Partial evaluation and program manipulation
Strictification of circular programs
Proceedings of the 20th ACM SIGPLAN workshop on Partial evaluation and program manipulation
Shortcut fusion rules for the derivation of circular and higher-order programs
Higher-Order and Symbolic Computation
Hi-index | 0.00 |
This paper presents techniques to model circular lazy programs in a strict, purely functional setting. Circular lazy programs model any algorithm based on multiple traversals over a recursive data structure as a single traversal function. Such elegant and concise circular programs are defined in a (strict or lazy) functional language and they are transformed into efficient strict and deforested, multiple traversal programs by using attribute grammars-based techniques. Moreover, we use standard slicing techniques to slice such circular lazy programs. We have expressed these transformations as an Haskell library and two tools have been constructed: the HaCirc tool that refactors Haskell lazy circular programs into strict ones, and the OCirc tool that extends Ocaml with circular definitions allowing programmers to write circular programs in Ocaml notation, which are transformed into strict Ocaml programs before they are executed. The first benchmarks of the different implementations are presented and show that for algorithms relying on a large number of traversals the resulting strict, deforested programs are more efficient than the lazy ones, both in terms of runtime and memory consumption.