Language-based editors and browsers allow users to create, browse, and modify structured documents in terms of the syntax and semantics of the underlying language. The feasibility of editors which fully combine text- and structure-oriented operations has already been shown. However, prior investigations show limitations which are addressed by the research reported here. First, earlier systems have either constrained text-oriented editing or have forced the user to manipulate a structure based on the needs of an incremental parser rather than on the abstract syntax of the language. Second, specifications of contextual constraints generally have been difficult to write and to understand. In the quest for efficiency, the logical form of the specification has been obscured by concentration on low-level details. Third, the approach to checking contextual constraints has often been oriented toward translation rather than browsing. The information gathered during analysis is made available only to the analyzer, and not shared by other tools.

Grammatical abstraction and logical constraint grammars are new approaches to specifying and enforcing the syntactic and static-semantic constraints of a language within a language-based editor. Grammatical abstraction defines a formal correspondence between the concrete (parsing) syntax of the language and the abstract syntax of the language as viewed by a user of the system. This correspondence allows a decorated abstract syntax tree to be used during incremental LR parsing.

Logical constraint grammars couple logic programming with consistency maintenance to describe and enforce the static-semantic constraints of a language. The information required for incremental consistency maintenance is derived directly from the description of the semantic constraints. The author of a language description is shielded from most of the details of information flow and storage management. Information gathered during enforcement is retained in a logic database accessible by other tools.

Pan is an experimental language-based editing and browsing system that uses grammatical abstraction and logical constraint grammars. Experience with Pan confirms the utility of these approaches.




Download Full History