1 research outputs found

    Minimizing Space Usage in Evaluation of Expression Trees

    No full text
    . An important issue in the evaluation of expression trees (and more generally, directed acyclic graphs (dags)) is the order in which the nodes of the graph are evaluated. In the register sufficiency problem, the evaluation begins with none of the nodes of the dag being placed in registers. On the other hand, if an expression dag, containing variables, is being evaluated in an environment then the nodes of the graph, with out-degree zero, are variables, whose values are contained in the environment. Hence space occupied before the evaluation begins equals the size of the environment. Thus, the strategy to minimize space usage during the evaluation of the dag has to take into account the initial space occupied by the nodes of out-degree zero. By a simple reduction from the register sufficiency problem it is shown that, for an arbitrary dag, the problem of selecting an optimal evaluation strategy which minimizes space is NP-Complete. While the register sufficiency problem for a tree has ..
    corecore