TY - JOUR
T1 - Conditional evaluation in simple multi-visit attribute-grammar evaluators
AU - Yang, Wuu
PY - 1997/11/5
Y1 - 1997/11/5
N2 - Attribute grammars are a formalism for specifying computations on context-free languages. Due to the nonstrictness of the if constructs in attribution equations, it is possible to avoid evaluating certain attribute instances in a syntax tree. A dynamic evaluator can easily avoid such useless computations with a demand-driven approach. However, dynamic evaluators are not efficient because they need to keep the attribute dependence graph during evaluation, and they need to decide an evaluation order for each syntax tree. In contrast, a visit-oriented (static) evaluator can carefully re-arrange the evaluation order and still avoid unnecessary computations. We propose such a technique in this paper.
AB - Attribute grammars are a formalism for specifying computations on context-free languages. Due to the nonstrictness of the if constructs in attribution equations, it is possible to avoid evaluating certain attribute instances in a syntax tree. A dynamic evaluator can easily avoid such useless computations with a demand-driven approach. However, dynamic evaluators are not efficient because they need to keep the attribute dependence graph during evaluation, and they need to decide an evaluation order for each syntax tree. In contrast, a visit-oriented (static) evaluator can carefully re-arrange the evaluation order and still avoid unnecessary computations. We propose such a technique in this paper.
UR - http://www.scopus.com/inward/record.url?scp=0031273633&partnerID=8YFLogxK
U2 - 10.1109/APSEC.1997.640202
DO - 10.1109/APSEC.1997.640202
M3 - Article
AN - SCOPUS:0031273633
SN - 0255-6588
VL - 21
SP - 601
EP - 610
JO - Proceedings of the National Science Council, Republic of China, Part A: Physical Science and Engineering
JF - Proceedings of the National Science Council, Republic of China, Part A: Physical Science and Engineering
IS - 6
ER -