Removing Redundant Arguments of Functions
*
María Alpuente6
, Santiago Escobar6
and Salvador Lucas6 
| (6) |
DSIC, UPV, Camino de Vera s/n, 46022 Valencia, Spain |
Abstract
The application of automatic transformation processes during the formal development and optimization of programs can introduce
encumbrances in the generated code that programmers usually (or presumably) do not write. An example is the introduction of
redundant arguments in the functions defined in the program. Redundancy of a parameter means that replacing it by any expression
does not change the result. In this work, we provide a method for the analysis and elimination of redundant arguments in term
rewriting systems as a model for the programs that can be written in more sophisticated languages. On the basis of the uselessness
of redundant arguments, we also propose an erasure procedure which may avoid wasteful computations while still preserving
the semantics (under ascertained conditions). A prototype implementation of these methods has been undertaken, which demonstrates
the practicality of our approach.
Work partially supported by CICYT TIC2001-2705-C03-01, Acciones Integradas HI2000-0161, HA2001-0059, HU2001-0019, and Generalitat
Valenciana GV01-424.
References secured to subscribers.