作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

›› 1986, Vol. 12 ›› Issue (06): 15-.

• 论文 • 上一篇    下一篇

增量程序设计环境中属性文法的增量计值

贾肖平   

  1. 复旦大学
  • 发布日期:1986-12-25

INCREMENTAL EVALUATION OF ATTRIBUTED GRAMMARS FOR INCREMENTAL PROGRAM-MING ENVIRONMENTS

Jia Xiaoping   

  • Published:1986-12-25

摘要: 近年来,在增量式程序设计环境的领域中,许多工作在致力于开发各种各样的功能和特色。而在增量程序设计环境的形式化描述和自动生成方面所做的工作还很少。属性文法是用来表示程序设计语言语义的很好的工具,它已经被成功地应用于编译程序的自动生成。但当应用于增量程序设计环境时,遇到了一些特殊的困难。困难之一就是属性增量计值的效率问题。T.Reps在这方面做了一些工作,本文改进了他的工作。我们对应用于增量程序设计环境的属性文法作了一个修改,然后提出了一个针对修改后的属性文法的增量计值算法。这一算法在时间和空间上都优于Reps的算法,并且在时间上是最优的。

Abstract: In recent years, much has been done to explore the various functions and features of incremental programming environments, but less has been done on the formali-zation of constructing and generating incremental programming environments. Attributed grammar is a good tool to express the semantics of programming languages, and it has been successfully used in generating compilers. So it is also expectedly used in generating the incremental programming environments, but some special problems are raised. One of them is the efficiency of incremental attribute evaluation. Some work has been done by T. Reps. This paper is to improve his work. We modify the attributed grammar used in incremental programming environments, then an algorithm of incremental attribute evaluation for the modified attributed grammar is put forward. The algorithm is better than that Reps, did both in time and space, and is optimal in time.