next up previous
Next: Matching dagsindex trees, Up: Definitional trees Previous: Definitional trees

Incremental definitional trees

Definitional trees are used to guide the search for a redex within the computation of tex2html_wrap_inline1801 (also instrumenting the possible variable instantiations). From the definition of tex2html_wrap_inline1801 , it is immediate to see that the pattern tex2html_wrap_inline1993 of a branch node tex2html_wrap_inline2119 is simply augmented by a flat term tex2html_wrap_inline2121 , which is placed at the inductive position o of tex2html_wrap_inline1993 , in order to attain the patterns of the (root nodes of the) sons tex2html_wrap_inline2011 , for tex2html_wrap_inline2129 . On the other hand, the decision about the definitional tree to be considered in the next step, only depends on the constructor symbol tex2html_wrap_inline2017 rather than on the entire pattern of the son tex2html_wrap_inline2011 .

Thus, we have developed an optimized representation of the definitional trees which moves the pattern matching information to the exact place where it is needed. Given a TRS tex2html_wrap_inline1937 , an incremental definitional tree tex2html_wrap_inline1771 with pattern tex2html_wrap_inline1993 is an expression of the form:

tex2html_wrap_inline2141
where tex2html_wrap_inline1997 is a variant of a rule tex2html_wrap_inline1999 .
tex2html_wrap_inline2147
where o is a variable position of tex2html_wrap_inline1993 ,
tex2html_wrap_inline2007 are constructors for n>0, and each tex2html_wrap_inline2157 is an incremental definitional tree with pattern tex2html_wrap_inline2013 where k is the arity of the constructor tex2html_wrap_inline2017 and tex2html_wrap_inline2019 are new variables.

The pattern of an incremental definitional tree, which is not explicitly included in its syntactic structure, can be easily obtained as follows:

displaymath2107

Standard and incremental definitional trees are related by means of a function tex2html_wrap_inline2173 which maps standard definitional trees to incremental definitional trees:

displaymath2108

eje416

   figure432
Figure 2: Incremental definitional tree for the function first

Note that it is immediate to redefine tex2html_wrap_inline1801 in terms of incremental definitional trees, although we don't include this definition in the paper.



Santiago Escobar
Fri Sep 3 14:51:16 MET DST 1999