## A Transformational Approach to Polyvariant BTA of Higher-Order Functional Programs

### Cached

### Download Links

### BibTeX

@MISC{Arroyo_atransformational,

author = {Gustavo Arroyo and J. Guadalupe Ramos and Salvador Tamarit and Germán Vidal},

title = {A Transformational Approach to Polyvariant BTA of Higher-Order Functional Programs },

year = {}

}

### OpenURL

### Abstract

### Citations

997 |
Term Rewriting and All That
- Baader, Nipkow
- 1998
(Show Context)
Citation Context ... Section 5 shows a summary of the experimental results conducted to evaluate the usefulness of the approach. Finally, Sect. 6 discusses some related work and concludes. 2 Preliminaries Term rewriting =-=[7]-=- offers an appropriate framework to model the first-order component of many functional (logic) programming languages. Therefore, in the remainder of this paper we follow the standard framework of term... |

663 |
Partial evaluation and automatic program generation
- Jones, Gomard, et al.
- 1993
(Show Context)
Citation Context ... of Valencia, E-46022, Valencia, Spain {garroyo,stamarit,gvidal}@dsic.upv.es 2 Instituto Tecnológico de la Piedad, La Piedad, Michoacan, México guadalupe@dsic.upv.es 1 Introduction Partial evaluation =-=[10]-=- aims at specializing programs w.r.t. part of their input data (the static data). Partial evaluation may proceed either online or offline. Online techniques implement a single, monolithic procedure th... |

308 | Definitional interpreters for higher-order programming languages
- Reynolds
- 1972
(Show Context)
Citation Context ... partial evaluation time).In this work, we present a transformational approach to overcome the above drawbacks. Basically, we first transform the original higher-order program by defunctionalization =-=[13]-=-. In particular, we introduce an extension of previous defunctionalization techniques (like [3, 8]) that is specially tailored to improve the accuracy of the size-change analysis. Then, we introduce a... |

194 |
From Logic Programming to Prolog
- Apt
- 1997
(Show Context)
Citation Context ...ulyonkov’s approach. Other related approaches to improve the accuracy of termination analysis by labeling functions can be found in [14], which is based on a standard techniquefrom logic programming =-=[4]-=-. Here, some program clauses are duplicated and labeled with different modes—the mode of an argument can be input, if it is known at call time, or output, if it is unknown—in order to have a well-mode... |

185 | The size-change principle for program termination
- Lee, Jones, et al.
- 2001
(Show Context)
Citation Context ...(i.e., unknown information in our context). An offline approach to narrowing-driven partial evaluation has been introduced in [12]. In order to improve its accuracy, [5] adapts a size-change analysis =-=[11]-=- to the setting of narrowing. This analysis is then used to detect potential sources of non-termination, so that the arguments that may introduce infinite loops at partial evaluation time are annotate... |

160 | Definitional trees
- Antoy
- 1992
(Show Context)
Citation Context ...o terms s and t is a substitution σ with σ(s) = σ(t). In the following, we write on for the sequence of objects o1, . . . , on. In the remainder of this paper, we consider inductively sequential TRSs =-=[3]-=- as programs, a subclass of left-linear constructor-based TRSs. Essentially, a TRS is inductively sequential when all its operations are defined by rewrite rules that, recursively, make on their argum... |

80 | Higher-order narrowing with definitional trees
- Hanus, Prehofer
- 1996
(Show Context)
Citation Context ...uation of higher-order calls containing free variables as functions is not allowed in current implementations of narrowing (i.e., such calls are suspended to avoid the use of higher-order unification =-=[9]-=-). Regarding the code size increase due to our defunctionalization algorithm, the fact that it makes more higher-order information explicit comes at a cost: in the worst case, the source program can g... |

76 |
Automated theorem-proving for theories with simplifiers, commutativity and associativity
- Slagle
- 1974
(Show Context)
Citation Context ...us, it runs faster than in the online approach). Narrowing-driven partial evaluation [2] is a powerful technique for the specialization of functional (logic) programs based on the narrowing principle =-=[16]-=-, a conservative extension of rewriting to deal with logic variables (i.e., unknown information in our context). An offline approach to narrowing-driven partial evaluation has been introduced in [12].... |

71 | Defunctionalization at work
- Danvy, Nielsen
- 2001
(Show Context)
Citation Context ...f (potentially) dead code during the transformation process. 6 Related Work and Conclusions Let us first review some related works. Defunctionalization was first introduced by Reynolds [18] (see also =-=[10]-=-, where a number of applications are presented). Defunctionalization has already been used in the context of partial evaluation (see, e.g., [8]) as well as in the online approach to narrowing-driven p... |

50 |
Self-Applicable Partial Evaluation
- Bondorf
- 1990
(Show Context)
Citation Context ...ization was first introduced by Reynolds [18] (see also [10], where a number of applications are presented). Defunctionalization has already been used in the context of partial evaluation (see, e.g., =-=[8]-=-) as well as in the online approach to narrowing-driven partial evaluation [1]. The main novelty w.r.t. these approaches is that we introduced a more aggressive defunctionalization by instantiating fu... |

33 | The narrowing-driven approach to functional logic program specialization
- Albert, Vidal
(Show Context)
Citation Context ...nnotated program so that the second phase—the proper specialization—only needs to follow these annotations (and, thus, it runs faster than in the online approach). Narrowing-driven partial evaluation =-=[2]-=- is a powerful technique for the specialization of functional (logic) programs based on the narrowing principle [16], a conservative extension of rewriting to deal with logic variables (i.e., unknown ... |

31 | A practical partial evaluation scheme for multiparadigm declarative languages
- Albert, Hanus, et al.
(Show Context)
Citation Context ...revious offline partial evaluator did not accept higher-order programs, we now compare the new offline partial evaluator with an online partial evaluator for Curry that accepts higher-order functions =-=[1]-=-. As expected, the results in this case are worse compared with the online partial evaluator. Nevertheless, run times are still reasonable and the offline partial evaluator is much faster than the onl... |

21 |
Automated termination proofs for logic programs by term rewriting
- Schneider-Kamp, Giesl, et al.
- 2007
(Show Context)
Citation Context ...arison can be made since we are not aware of any implementation of Bulyonkov’s approach. Other related approaches to improve the accuracy of termination analysis by labeling functions can be found in =-=[14]-=-, which is based on a standard techniquefrom logic programming [4]. Here, some program clauses are duplicated and labeled with different modes—the mode of an argument can be input, if it is known at ... |

21 |
Binding time analysis for polymorphically typed higher order languages
- Mogensen
- 1989
(Show Context)
Citation Context ...bols. No experimental comparison can be made since we are not aware of any implementation of Bulyonkov’s approach. Other approaches to polyvariant BTA of higher-order programs include Mogensen’s work =-=[16]-=- for functional programs and Vanhoof’s modular approach [22] for Mercury programs. In contrast to our approach, Mogensen presents a direct (i.e., not based on defunctionalization) approach for polyvar... |

13 | Typed higher-order narrowing without higher-order strategies
- Antoy, Tolmach
- 1999
(Show Context)
Citation Context ...above drawbacks. Basically, we first transform the original higher-order program by defunctionalization [13]. In particular, we introduce an extension of previous defunctionalization techniques (like =-=[3, 8]-=-) that is specially tailored to improve the accuracy of the size-change analysis. Then, we introduce a source-to-source transformation that aims at improving the accuracy of both the size-change analy... |

12 | A correctness proof for warren’s ho into fo translation
- González-Moreno
- 1993
(Show Context)
Citation Context ...above drawbacks. Basically, we first transform the original higher-order program by defunctionalization [13]. In particular, we introduce an extension of previous defunctionalization techniques (like =-=[3, 8]-=-) that is specially tailored to improve the accuracy of the size-change analysis. Then, we introduce a source-to-source transformation that aims at improving the accuracy of both the size-change analy... |

12 | Fast Narrowing-Driven Partial Evaluation for Inductively Sequential Systems
- Ramos, Silva, et al.
- 2005
(Show Context)
Citation Context ... [16], a conservative extension of rewriting to deal with logic variables (i.e., unknown information in our context). An offline approach to narrowing-driven partial evaluation has been introduced in =-=[12]-=-. In order to improve its accuracy, [5] adapts a size-change analysis [11] to the setting of narrowing. This analysis is then used to detect potential sources of non-termination, so that the arguments... |

12 | Binding-time analysis by constraint solving: A modular and higher-order approach for Mercury
- Vanhoof
- 2000
(Show Context)
Citation Context ...t aware of any implementation of Bulyonkov’s approach. Other approaches to polyvariant BTA of higher-order programs include Mogensen’s work [16] for functional programs and Vanhoof’s modular approach =-=[22]-=- for Mercury programs. In contrast to our approach, Mogensen presents a direct (i.e., not based on defunctionalization) approach for polyvariant BTA of higherorder functional programs. 11 Vanhoof’s ap... |

9 |
Extracting polyvariant binding time analysis from polyvariant specializer
- Bulyonkov
- 1993
(Show Context)
Citation Context ...) higher-order programs Table 1 (a) shows the effectiveness of the polyvariant transformation over some first-order programs (Ackermann’s function, Fibonacci’s function, and a couple of examples from =-=[6]-=-). Here, we consider the previous offline partial evaluator of [12, 5], the only difference being that in the last two columns the considered program is first transformed with the polyvariant transfor... |

8 |
Termination analysis and call graph construction for higher-order functional programs
- Sereni
- 2007
(Show Context)
Citation Context ...nstructs such as (map f . . .) but also to programs that make essential use of higher-order features, as the following example illustrates. Example 3. Consider the following higher-order program from =-=[15]-=-: main x y = f x y g r a = r (r a) f Z = inc inc n = Succ n f (Succ n) = g (f n) where natural numbers are built from Z and Succ. The first step of the defunctionalization process returns main(x, y) =... |

5 | Improving Offline NarrowingDriven Partial Evaluation using Size-Change Graphs
- Arroyo, Ramos, et al.
- 2007
(Show Context)
Citation Context ...ting to deal with logic variables (i.e., unknown information in our context). An offline approach to narrowing-driven partial evaluation has been introduced in [12]. In order to improve its accuracy, =-=[5]-=- adapts a size-change analysis [11] to the setting of narrowing. This analysis is then used to detect potential sources of non-termination, so that the arguments that may introduce infinite loops at p... |