A study on the effectively optimized algorithm for an incremental attribute grammar

점진적 속성문법을 위한 효과적인 최적화 알고리즘에 관한 연구

  • 장재춘 (영동전문대학 전자계산과) ;
  • 안희학 (관동대학교 컴퓨터공학과)
  • Published : 2001.09.01


The effective way to apply incremental attribute grammar to a complex language process is the use of optimized algorithm. In optimized algorithm for incremental attribute grammar, the new input attribute tree should be exactly compared with the previous input attribute tree, in order to determine which subtrees from the old should be used in constructing the new one. In this paper the new optimized algorithm was reconstructed by analyzing the algorithm suggested by Carle and Pollock, and a generation process of new attribute tree d’copy was added. Through the performance evaluation for the suggested matching algorithm, the run time is approximately improved by 19.5%, compared to the result of existing algorithm.


  1. Aho, A. V., Sethi, R. and Ullman, J. D., 'Compilers Principles. Techniques, and Tools,' Addison-wesley publishing Co., 1986
  2. Teitelbaum, T. and Demers, A., 1983, 'Incremental context dependent analysis for language-based editors,' ACM Trans. Program. Lang. Syst., 5,3(July), pp.449-477 https://doi.org/10.1145/2166.357218
  3. Teitelbaum, T. and Chamman, R., 1990, 'Higher-order attribute grammars and editing environments,' processing of the SIGPLAN'90 Symposium on Programming Language Design and Implementation. ACM, New York, pp.197-208 https://doi.org/10.1145/93542.93567
  4. Carle, A. and Pollock, L., 1990, 'Incremental evaluators for hierarchical attribute grammars,' Tech. Rep. TR90-103, Rice Univ., Houston, Tex. Jan.
  5. Carle, A., 1992, 'Hierarchical attribute grammars : Dialects, applications and evaluation algorithms,' Ph.D. thesis, Dept. of Computer Science, Rice Univ., Houston, Tex.
  6. Carle, A. and Pollock, L., 1995a, 'A context-based incremental evaluators for hierachical attribute grammars,' J. Program. Lang., 3, pp.1-29
  7. Carle, A. and Pollock, L., 1995b, 'Matching-based incremental evaluators for hierarchical attribute grammar dialects,' ACM Trans. Program. Lang. Syst., 17,2, pp.394-429 https://doi.org/10.1145/201059.201071
  8. Jia, A. and Qian, J., 1985, 'Incremental evaluation of attributed grammars for incremental programming environments,' IEEE COMPSAC'85(Chicago, Ⅲ), IEEE, New York, pp.342-349