The search functionality is under construction.

Author Search Result

[Author] Yoshihiko FUTAMURA(3hit)

1-3hit
  • Recursion Removal from Recursive Programs with Only One Descent Function

    Yusuke ICHIKAWA  Zenjiro KONISHI  Yoshihiko FUTAMURA  

     
    PAPER-Fundamentals of Software and Theory of Programs

      Vol:
    E88-D No:2
      Page(s):
    187-196

    Recursive programs are often easier to read and write than iterative ones, but their execution frequently requires large numbers of procedure calls and stack operations. This causes problems in program optimization related to inline coding and the locality of data references. In addition to these problems, defining programs recursively sometimes leads to repetitive execution of similar computations, causing programs to have exponential time complexity. As a result, recursion removal methods, which transform a given recursive program to an iterative one without using the stack and increasing the amount of computation time, have been studied since the 1970s. In 1998, our group proposed a recursion removal method for a linear recursive program. In this paper, we extend the method to deal with non-linear recursive programs with one descent function (RPODs), which are programs of the form f(x) = if p(x) then b(x) else a(c(x),f(d(x)),f(d2(x)),...,f(dn(x))). First, we define the cumulative function for an RPOD. Next, based on the new cumulative function, several transformation techniques for RPODs are shown. These include a unified method of deriving logarithmic-order iterative programs or loop-free programs. Finally, the relationships between our method and various tupling strategies are discussed.

  • Loop Quasi-Invariance Code Motion

    Litong SONG  Yoshihiko FUTAMURA  Robert GLUCK  Zhenjiang HU  

     
    PAPER-Theory and Models of Software

      Vol:
    E83-D No:10
      Page(s):
    1841-1850

    Loop optimization plays an important role in compiler optimization and program transformation. Many sophisticated techniques such as loop-invariance code motion, loop restructuring and loop fusion have been developed. This paper introduces a novel technique called loop quasi-invariance code motion. It is a generalization of standard loop-invariance code motion, but based on loop quasi-invariance analysis. Loop quasi-invariance is similar to standard loop-invariance but allows for a finite number of iterations before computations in a loop become invariant. In this paper we define the notion of loop quasi-invariance, present an algorithm for statically computing the optimal unfolding length in While-programs and give a transformation method. Our method can increase the accuracy of program analyses and improve the efficiency of programs by making loops smaller and faster. Our technique is well-suited as supporting transformation in compilers, partial evaluators, and other program transformers.

  • An Extension of Shortcut Deforestation for Accumulative List Folding

    Kazuhiko KAKEHI  Robert GLUCK  Yoshihiko FUTAMURA  

     
    PAPER-Theory and Models of Software

      Vol:
    E85-D No:9
      Page(s):
    1372-1383

    Deforestation is a well-known program transformation technique which eliminates intermediate data structures that are passed between functions. One of its weaknesses is the inability to deforest programs using accumulating parameters. We show how certain kinds of intermediate lists produced by accumulating parameters can be deforested. In this paper we introduce an accumulative variant of foldr, called rdlof, and show the composition of functions defined by foldr and rdlof. As a simplified instance of foldr and rdlof, we then examine dmap, an accumulative extension of map, and give the corresponding fusion rules. While the associated composition rules cannot capture all deforestation problems, they can handle accumulator fusion of fold- and map-style functions in a simple manner. The rules for accumulator fusion presented here can also be viewed as a restricted composition scheme for attribute grammars, which in turn may help us to bridge the gap between the attribute and functional worlds.