%0 Conference Paper %B Draft Proceedings of the 14th International Workshop on the Implementation of Functional Languages - IFL %D 2002 %T Deriving Animations from Recursive Definitions %A Alcino Cunha %A José Bernardo Barros %A João Alexandre Saraiva %C Madrid, Spain %X

This paper describes a generic method to derive an animation from a recursive de nition, with the objective of debugging and understanding this de nition by expliciting its control structure. This method is based on a well known algorithm of factorizing a recursive function into the composition of the producer and the consumer of its call tree. We developed a systematic method to transform both the resulting functions in order to draw the tree step by step. The theory of data types as xed points of functors, generic recursion patterns, and monads, are fundamental to our work and are brie y presented. Using polytypic implementations of monadic recursion patterns and an application to manipulate and generate graph layouts we developed a prototype that, given a recursive function written in a subset of Haskell, returns a function whose execution yields the desired animation.

%8 September %> https://haslab.uminho.pt/sites/default/files/alcino/files/ifl02.pdf