Optimal-time incremental semantic analysis for syntax-directed editors
Optimal-time incremental semantic analysis for syntax-directed editors
复制标题
语法导向编辑器的最佳时间增量语义分析
DOI:
10.1145/582153.582172
复制
发表时间:
1982
影响因子:
3.6
通讯作者:
T. Reps
中科院分区:
文献类型:
--
作者:
T. Reps
Attribute grammars permit the specification of static semantics in an applicative and modular fashion, and thus are a good basis for syntax-directed editors. Such editors represent programs as attributed trees, which are modified by operations such as subtree pruning and grafting. After each modification, a subset of attributes, AFFECTED, requires new values. Membership in AFFECTED is not known a priori; this paper presents an algorithm that identifies attributes in AFFECTED and computes their new values. The algorithm is time-optimal, its cost is proportional to the size of AFFECTED.