首页> 美国政府科技报告 >Efficient Incremental Evaluation of Higher Order Attribute Grammars
【24h】

Efficient Incremental Evaluation of Higher Order Attribute Grammars

机译:高阶属性语法的有效增量评估

获取原文

摘要

A new algorithm for the incremental evaluation of Ordered Attribute Grammars(OAGs), which also solves the problem of the incremental evaluation of Ordered Higher order Attribute Grammars (OHAGs) is presented. Two new approaches are used in the algorithm. First, instead of caching all results of semantic functions in the grammar, all results of visits to trees are caught. There are no attributed trees, because all attributes are stored in the cache. Trees are built using hash consing, thus sharing multiple instances of the same tree and avoiding repeated attributions of the same tree with the same inherited attributes. Second, each visit computes not only synthesized attributes but also bindings for subsequent visits. Bindings, which contain attribute values computed in one visit and used in subsequent visits, are also stored in the cache. As a result, second and further visits get a subtree containing only all necessary earlier computer values (the bindings) as a parameter. The algorithm runs in O((Affected) + (paths-to-roots)) steps after modifying subtrees, where paths-to-roots is the sum of the lengths of all paths from the root to all modified subtrees.

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号