Browse Prior Art Database

An Incremental Unparser for Structured Editors* (summary)

IP.com Disclosure Number: IPCOM000128271D
Original Publication Date: 1984-Dec-31
Included in the Prior Art Database: 2005-Sep-15
Document File: 9 page(s) / 30K

Publishing Venue

Software Patent Institute

Related People

Michael Caplinger: AUTHOR [+4]

Abstract

Michael Caplinger Robert Hood Rice COW TR84-4 November 1984 Department of Computer Science Rice University P.O. Box 1892 Houston, TX 77251-1892 (713) 527-8101

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 15% of the total text.

Page 1 of 9

THIS DOCUMENT IS AN APPROXIMATE REPRESENTATION OF THE ORIGINAL.

An Incremental Unparser for Structured Editors* (summary)

Michael Caplinger Robert Hood

Rice COW TR84-4 November 1984

Department of Computer Science Rice University P.O. Box 1892 Houston, TX 77251-1892

(713) 527-8101

*This research has been supported in part by Nati~nal Science Foundation grants MCS 78- 05850, MCS-8104006, and MCS-81218M and by International Business Machines Corporation under a Faculty Development Award.

Abstract

This paper describes the incremental unparsing algorithm used in Rice University's Programming Environment for Fortran. The algorithm takes as an argument an arbitrary location within the abstract syntax tree, and unparses the tree around that location. It does only as much work at each redisplay request as is necessary to fill one screen with text. This remains true even in the presence of code elision and other forms of inf ormation hiding.

1. Introduction

Recent interest in structured editors has prompted research into unparsers-programs that take the abstract tree form used internally in the editor and convert it into text which the pro-grammer can examine. One such editor is used in Rice University's Programming Environment for Fortran-part of its IR11 project[31.

Many previous unparsers, such as the one used in the Comell Program Synthesizer[51, have been non-incremental in nature; whenever a change was made to the program, they simply regen-erated the text form of the entire program, and then put the desired portion on the screen. While adequate for small programs, or languages where the editable unit is typically small, such an approach is not feasible for typical Fortran programs, or programs in many other Algol-like languages.

As part of his work on programming environments for Usp and PL/l, Mikelsons has developed an incremental algorithm for prettyprinting[41. His algorithm uses quite a different approach toward code elision than the one presented here; the result is that less user specification is allowed (and less required as well), One phase of his algorithm requires time proportional to the square of the size of the display. Although sufficiently fast for standard 24x8O terminal screens, his algorithm may prove too slow for larger displays.

The initial implementation of the Gandalf system at Camegie-Mellon[2] did not use an incre- mental unparser. Although we understand that the current version does(l] we do not know at the time of this writing any details about its efficiency or its ability to display elided code.

Rice University Page 1 Dec 31, 1984

Page 2 of 9

An Incremental Unparser for Structured Editors* (summary)

In this paper, we describe an incremental unparser. The algorithm used does only as much work at each redisplay request as is necessary to fill one screen with text. This remains true even in the presence of code elision and other forms of information hiding.

IThis research has been supported in part by Nationa...