## Bottom-up Tree Acceptors (1986)

Venue: | Science of Computer Programming |

Citations: | 6 - 3 self |

### BibTeX

@INPROCEEDINGS{Hemerik86bottom-uptree,

author = {C. Hemerik and J. P. Katoen},

title = {Bottom-up Tree Acceptors},

booktitle = {Science of Computer Programming},

year = {1986},

pages = {13--51}

}

### OpenURL

### Abstract

This paper deals with the formal derivation of an efficient tabulation algorithm for tabledriven bottom-up tree acceptors. Bottom-up tree acceptors are based on a notion of match sets. First we derive a naive acceptance algorithm using dynamic computation of match sets. Tabulation of match sets leads to an efficient acceptance algorithm, but tables may be so large that they can not be generated due to lack of space. Introduction of a convenient equivalence relation on match sets reduces this effect and improves the tabulation algorithm. 1 Introduction Nowadays, many parts of a compiler can be generated automatically. For instance, the automatic generation of lexical and syntactic analyzers using notations based on regular expressions and context-free grammars is commonly used (see e.g. [1]). However, much research is still going on in the field of universal code-generator generators, which take a description of a machine as input and deliver a (good) code generator for that machine. C...

### Citations

235 |
Tree Automata. Akadémiai Kiadó
- Gécseg, Steinby
- 1984
(Show Context)
Citation Context ...able as a well-developed theory of tree grammars and tree automata has existed for some twenty years [3, 7, 11, 14]. A mathematical rigorous presentation in terms of universal algebra is presented in =-=[8]-=-, which does not pay any attention to applications, however. A systematic treatment of some parts of the theory, aimed at code generation applications, is given in [15]; a survey paper is in preparati... |

169 |
Tree acceptors and some of their applications
- Doner
- 1970
(Show Context)
Citation Context ...described [1, 6, 12], but a theoretical framework is unfortunately missing. This is the more remarkable as a well-developed theory of tree grammars and tree automata has existed for some twenty years =-=[3, 7, 11, 14]-=-. A mathematical rigorous presentation in terms of universal algebra is presented in [8], which does not pay any attention to applications, however. A systematic treatment of some parts of the theory,... |

137 |
M.J.: Pattern matching in trees
- Hoffmann, O’Donnell
- 1982
(Show Context)
Citation Context ...described [1, 6, 12], but a theoretical framework is unfortunately missing. This is the more remarkable as a well-developed theory of tree grammars and tree automata has existed for some twenty years =-=[3, 7, 11, 14]-=-. A mathematical rigorous presentation in terms of universal algebra is presented in [8], which does not pay any attention to applications, however. A systematic treatment of some parts of the theory,... |

119 |
Mappings and grammars on trees
- Rounds
- 1970
(Show Context)
Citation Context ...described [1, 6, 12], but a theoretical framework is unfortunately missing. This is the more remarkable as a well-developed theory of tree grammars and tree automata has existed for some twenty years =-=[3, 7, 11, 14]-=-. A mathematical rigorous presentation in terms of universal algebra is presented in [8], which does not pay any attention to applications, however. A systematic treatment of some parts of the theory,... |

67 |
Tabulation techniques for recursive programs
- Bird
- 1980
(Show Context)
Citation Context ...t (due to the fact that PS is finite) the number of match sets is finite. This allows tabulation, a general applied technique for a more efficient implementation of recursively defined functions (see =-=[2]-=-), of match sets. Observe that MS 1 (a(t 1 ; : : : ; t n )) is of the form f a (MS 1 (t 1 ); : : : ; MS 1 (t n )), where f a is defined as follows. Definition 4.1 f f a , transition function for symbo... |

53 |
Tree generating regular systems
- Brainerd
- 1969
(Show Context)
Citation Context |

50 |
A new method for compiler code generation
- Glanville, Graham
- 1978
(Show Context)
Citation Context ... considered as a code generation grammar. This suggests the use of traditional parsing techniques for code generation. For instance, Graham and Glanville use LR-parsing for instruction selection (see =-=[9]-=-). The main problem with this approach is the resolution of the large number of parsing conflicts caused by the fact that code generation grammars are inherently highly ambiguous. For example, an alte... |

35 |
An improvement to bottom-up tree pattern matching
- Chase
- 1987
(Show Context)
Citation Context ...n be tabulated, which leads to a linear time acceptance algorithm. In practical applications the size of the resulting tables may be prohibitive, however. Therefore in section 5, using ideas of Chase =-=[4]-=-, an improved algorithm is described which generates compressed transition tables. Finally, section 6 contains some concluding remarks. 2 Tree grammars In this section we define the basic concepts of ... |

15 |
High-Quality Code Generation via bottom-up Tree Pattern Matching
- Hatcher, Christopher
- 1986
(Show Context)
Citation Context ...R i R i ! c MOV *R j , R i R i ! M R j MOV c(R j ), R i R i ! M + c R j \Gamma @ ADD R i , R j R i ! + R i R j \Gamma @ 2 Several code generation algorithms based on tree grammars have been described =-=[1, 6, 12]-=-, but a theoretical framework is unfortunately missing. This is the more remarkable as a well-developed theory of tree grammars and tree automata has existed for some twenty years [3, 7, 11, 14]. A ma... |

3 |
Using dynamic programming to generate optimized code in a Graham-Glanville style code generator
- Christopher, Hatcher, et al.
- 1984
(Show Context)
Citation Context ... c 2 (R 2 ), R 2 R 1 := c 1 + R 2 MOV #c 1 , R 1 R 1 := R 1 + R 2 ADD R 1 , R 2 2 A way to overcome this problem could be to use a more general parsing method like Earley's algorithm, as suggested in =-=[5]-=-, but the resulting space and time complexity is unacceptable for practical use in code generators. Neither of these methods takes into account a special property of code generation grammars, viz. tha... |

1 |
Dinther, Acceptors and parsers for regular tree grammars, in preparation
- Hemerik, van
(Show Context)
Citation Context ...hich does not pay any attention to applications, however. A systematic treatment of some parts of the theory, aimed at code generation applications, is given in [15]; a survey paper is in preparation =-=[10]-=-. In this paper we consider a particular class of tree acceptors, called deterministic bottomup tree acceptors, which have a time complexity proportional to the size of the tree to be analyzed. Our ma... |

1 |
Up-down parsing with prefix grammars
- Turner
- 1986
(Show Context)
Citation Context ...R i R i ! c MOV *R j , R i R i ! M R j MOV c(R j ), R i R i ! M + c R j \Gamma @ ADD R i , R j R i ! + R i R j \Gamma @ 2 Several code generation algorithms based on tree grammars have been described =-=[1, 6, 12]-=-, but a theoretical framework is unfortunately missing. This is the more remarkable as a well-developed theory of tree grammars and tree automata has existed for some twenty years [3, 7, 11, 14]. A ma... |

1 |
Small programming exercises 5, Science of Computer Programming 4(3
- Rem
- 1984
(Show Context)
Citation Context ...e. the smallest set Z ` P(PS) closed under all f a 's. To compute the reachable part Z and the tabulation of f a , ~ T a 2 Z n \Gamma! Z, where n = r(a), the standard reachability algorithm (see e.g. =-=[13]-=-) is used. This leads to the following algorithm, which is called A 1 . j[ var x; y : P(PS) j Z; W;G := ;; P(PS); ; ; for all a 2 V 0 do y := f a ; W;G := W n fyg; G[ fyg; ~ T a := y od ; do G 6= ; \G... |

1 |
The systematic derivation of acceptors and parsers for tree grammars
- Dinther
- 1987
(Show Context)
Citation Context ...niversal algebra is presented in [8], which does not pay any attention to applications, however. A systematic treatment of some parts of the theory, aimed at code generation applications, is given in =-=[15]-=-; a survey paper is in preparation [10]. In this paper we consider a particular class of tree acceptors, called deterministic bottomup tree acceptors, which have a time complexity proportional to the ... |