A Tabulation Transformation Tactic Using Haskell Arrays.
TL;DRAbstract
In this paper we propose a transformation tactic that provides general tabulation of functional algorithms. This tabulation tactic can be applied to dependency graphs in which variable size cuts can be defined. The tactic can be considered a generalization of the tupling tactic proposed by other authors. Tables are dynamically created and their sizes determined at execution time. The tactic is greatly simplified by the use of the data type array present in the functional language Haskell. According to the size of the tables used, two forms of tabulation are distinguished, respectively named total and partial tabulation. Some significative examples are developed using the tactic, including dynamic programming problems. Finally, we apply the loop inversion tactic to the partially tabulated algorithms to show that, in many cases, these algorithms can be transformed into tail recursive versions, similar to their imperative counterparts.
Chat with Paper
AI Agents for this Paper
In this paper we propose a transformation tactic that provides general tabulation of functional algorithms. This tabulation tactic can be applied to dependency graphs in which variable size cuts can be defined. The tactic can be considered a generalization of the tupling tactic proposed by other authors. Tables are dynamically created and their sizes determined at execution time. The tactic is greatly simplified by the use of the data type array present in the functional language Haskell. According to the size of the tables used, two forms of tabulation are distinguished, respectively named total and partial tabulation. Some significative examples are developed using the tactic, including dynamic programming problems. Finally, we apply the loop inversion tactic to the partially tabulated algorithms to show that, in many cases, these algorithms can be transformed into tail recursive versions, similar to their imperative counterparts.
Keywords
Chat
Click to start Chat