Cliche-Based Program Editing

    •  Waters, R.C., "Cliche-based Program Editing", ACM Transactions on Programming Languages and Systems, Vol. 16, No. 1, pp. 102-150, January 1994.
      BibTeX Download PDF
      • @article{Waters1994jan,
      • author = {Waters, R.C.},
      • title = {Cliche-based Program Editing},
      • journal = {ACM Transactions on Programming Languages and Systems},
      • year = 1994,
      • volume = 16,
      • number = 1,
      • pages = {102--150},
      • month = jan,
      • url = {}
      • }
  • MERL Contact:

Programs can be constructed and modified more rapidly and reliably if they are built out of standard fragments (cliches) than if they are written from scratch. Three experimental cliche-based program editors have been implemented, exploring the tradeoff between power and simplicity.

The Knowledge-Based Editor in Emacs (KBEmacs) is the most powerful of the three editors. It supports a wide range of editing operations and can represent a wide range of cliches, because it uses an internal representation called {sl plan diagrams}, which combines features of flowcharts and data-flow schemas. Unfortunately, the need to convert back and forth between program text and plan diagrams causes KBEmacs to be complex.

The Tempest editor is the simplest and fastest of the three editors. Because it uses text as its internal representation, it does not have to do any conversions. Unfortunately, Tempest is not useful for editing programs, because the manipulations required when combining programming cliches are too complex to be performed directly on program text. However, Tempests capabilities are useful in other, simpler contexts.

The Ace editor retains much of the simplicity of Tempest while supporting much of the power of KBEmacs. Ace is relatively simple, because it uses parse-trees as its internal representation. It achieves high power by using a specially modified programming-language grammar, which facilitates the representation and easy combination of cliches. This approach could be used to add powerful and efficient cliche-based editing capabilities to any programming environment.