The following sequence of screen dumps show how DRAFTER could be used to define the procedure for saving a new file in a Microsoft Word-like text editor, and then to generate text for that procedure. It is easiest for the technical writer if the process starts by defining the interface to be documented with some interface building tool. In this example, we use an implementation of parts of the text editor's functions in a VisualWorks prototype, as shown in the following figure:
DRAFTER has facilities for reading the interface definition produced by VisualWorks in Smalltalk, and finding all the objects relevant for the generation of the instructions. It can also infer some of the actions involved in using these objects. It uses this information to define a set of object and action entities in the DRAFTER knowledge base for use in text generation (the knowledge base is implemented in LOOM). The following DRAFTER screen shows the state of the system after the VisualWorks input has been processed, but before the author has defined anything by hand:
Note that all the interface objects and actions listed in the INTERFACE and ACTION panes are automatically defined by DRAFTER. These entities will certainly be used in the documentation of the interface, perhaps in more than one place. Clearly, however, these entities are not all that is needed to document the interface properly. Because of this (and because of the potential for the user to be without a supported interface design tool like VisualWorks) DRAFTER provides a manual definition facility. This facility is based on an English pseudo-text grammar. The following screens show the system in operation:
Once the action nodes of the graph have been created, or perhaps while they are being created, the author has the ability to link them together using a set of predefined procedural relations: goal, precondition, sub-action, side-effect, warning, and cancellation. This is done in the workspace, with a graphical outlining mechanism. This mechanism allows authors to drag actions from the ACTIONS pane and drop them on the various procedural relation slots in the workspace pane, or, alternatively, to create new actions to fill the slots. The result is a procedural hierarchy such as the one shown in outline form on the following screen:
In this screen, the WORKSPACE contains the procedure being documented in an outline format. The outer box represents the main user goal, a goal which is achieved by executing all the actions inside the box. It contains a single method specifying a cancellation action (i.e., that the Save-As File window may be closed by performing a particular method), and a set of sub-steps (i.e., opening the Save-As File window, typing the name of the file and clicking the save button).
The first two tools operate in sequence and plan, respectively, the high-level rhetorical structure of the text and the low-level grammatical details of the sentences. When this is finished, the KPML generator is called, once for each sentence, to produce the actual text. The text is produced in English and in French, using the Nigel grammar, produced in the Penman text generation project, and a new French grammar we are developing at the ITRI. One of the texts produced for this procedure is shown on the following screen: