Incremental Context-Dependent Analysis for Language-Based Editors

Knowledge of a programming language's grammar allows language-based editors to enforce syntactic correctness at all times during development by restricting editing operations to legitimate modifications ot ~ the program's context-free derivation tree; however, not all language constraints can be enforced in this way because not all features can be described by the context-free formalism. Attribute grammars permit context-dependent language features to be expressed in a modular, declarative fashion and thus are a good basis for specifying language-based editors. Such editors represent programs as attributed trees, Which are modified by operations such as subtree pruning and grafting. Incremental analysis is performed by updating attribute values after every modification. This paper discusses how updating can be carried out and presents several algorithms for the task, including one that is asymptotically optimal in time.

[1]  Mayer D. Schwartz,et al.  The design of a language-directed editor for block-structured languages , 1981 .

[2]  Thomas W. Reps,et al.  Generating Language-Based Environments , 1982 .

[3]  Dean B. Krafft AVID: A system for the Interactive Development of Verifiably Correct Programs , 1981 .

[4]  Wilfred J. Hansen,et al.  Creation of hierarchic text with a computer display , 1971 .

[5]  Kari-Jouko Räihä,et al.  Dynamic allocation of space for attribute instances in multi-pass evaluators of attribute grammars , 1979, SIGPLAN '79.

[6]  Thomas W. Reps Optimal-time incremental semantic analysis for syntax-directed editors , 1982, POPL '82.

[7]  Ken Kennedy,et al.  A Deterministic Attribute Grammar Evaluator Based on Dynamic Scheduling , 1979, TOPL.

[8]  Thomas Reps,et al.  Programming Techniques and Data Structures , 1981 .

[9]  Wayne Theodore Wilner Declarative semantic definition, as illustrated by a definition of Simula 67 , 1971 .

[10]  Bernard Lorho Semantic attributes processing in the system DELTA , 1975, Methods of Algorithmic Language Implementation.

[11]  Isu Fang,et al.  FOLDS, a declarative formal language definition system , 1972 .

[12]  Susan L. Gerhart,et al.  Correctness-preserving program transformations , 1975, POPL '75.

[13]  Martin David Yonke A knowledgeable, language-independent system for program construction andmodification. , 1975 .

[14]  Donald E. Knuth The art of computer programming: fundamental algorithms , 1969 .

[15]  Paul Abrahams Proceedings of the ACM SIGPLAN SIGOA symposium on Text manipulation , 1981 .

[16]  David Notkin,et al.  ALOE Users' and Implementors' Guide, , 1981 .

[17]  Reinhard Wilhelm,et al.  Automatic Generation of Optimizing Multipass Compilers , 1977, IFIP Congress.

[18]  Jean H. Gallier,et al.  Building friendly parsers , 1982, POPL '82.

[19]  Gregory F. Johnson,et al.  Non-syntactic attribute flow in language based editors , 1982, POPL '82.

[20]  Joseph M. Morris,et al.  The design of a language-directed editor for block-structured languages , 1981 .

[21]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[22]  Rodney Wayne Farrow Attributed grammar models for data flow analysis. , 1977 .

[23]  Gregor von Bochmann,et al.  Semantic evaluation from left to right , 1976, CACM.

[24]  Bernard Lang,et al.  Programming Environments Based on Structured Editors: The MENTOR Experience, , 1980 .

[25]  Jayashree Ramanathan,et al.  Design of Analyzers for Selective Program Analysis , 1981, IEEE Transactions on Software Engineering.

[26]  Thomas W. Reps,et al.  Incremental evaluation for attribute grammars with application to syntax-directed editors , 1981, POPL '81.

[27]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[28]  B. R. Rowland,et al.  An all(1) compiler generator , 1979, SIGPLAN '79.

[29]  Raul I. Medina-Mora,et al.  Syntax-directed editing: towards integrated programming environments , 1982 .

[30]  Alan M. Davis,et al.  The design and implementation of a table driven, interactive diagnostic programming system , 1976, CACM.

[31]  D. Neel,et al.  Semantic attributes and improvement of generated code , 1974, ACM '74.

[32]  Uwe Kastens,et al.  GAG: A Practical Compiler Generator , 1982, Lecture Notes in Computer Science.

[33]  Joost Verhofstad,et al.  Recovery Techniques for Database Systems , 1978, CSUR.

[34]  Waldean Allen Schulz Semantic analysis and target language synthesis in a translator. , 1976 .

[35]  Daniel J. Rosenkrantz,et al.  Attributed Translations , 1974, J. Comput. Syst. Sci..

[36]  Peter H. Feiler,et al.  An Incremental Programming Environment , 1981, IEEE Transactions on Software Engineering.