Introduction Serpent is a user interface management system (UIMS) being developed at the Software Engineering Institute (SEI). Serpent supports the devel- opment and implementation of user interfaces, providing an editor to specify the user interface and a runtime system that enables communica- tion between the application and the end user. What Is a User Interface Management System? A UIMS is a set of tools for the specification and execution of the user interface portion of the system. A UIMS provides tools for the specifica- tion of the static, layout portion of the user interface, for the specification of the dynamic portion, and for the execution of the specifications. A UIMS also separates the user interface portion of a system from the func- tional portion, allowing for modifications to the user interface with min- imal impact on the remainder of the system. The user interface is a major concern of most computing systems and, generally, is distinct from the concerns of the application. Separating the user interface from the application leads to a three-part division of a soft- ware system: the presentation of the user interface, the functionality of the application, and the mapping between the user interface and the ap- plication. The advantages of this division are that: o It allows modifications of the user interface to be done with minimal modification to the functional portion and vice versa. It does this by isolating the functional portion of the application from the details of the user interface. For example, whether a command is specified through a menu choice or through a textual string is not relevant to the functional portion of an application. Removing these concerns from the functional portion of the application allows the type of interface to be modified dramatically without any modifications to the applica- tion. o It allows the development of tools that are specialized for the design, specification, and execution of the user interface. For example, a lay- out editor, a dynamic specification language, and a runtime to support them can be included. What Is Serpent? Serpent is a UIMS that supports the incremental development of the user interface from prototyping through production and maintenance. It does this by providing an interactive layout editor for prototyping, by integrat- ing the layout editor with a dynamic specification language for produc- tion and maintenance, and by having an open architecture so that new user interface functionality can be added during the maintenance phase. The basic features of Serpent are simple enough for use during the pro- totyping phase, yet sophisticated enough for use in developing the proto- type into an operational system. Serpent is designed to be extensible in the user interface toolkits that can be supported. Hence, a system devel- oped using Serpent can be migrated to new technologies without time- consuming and expensive re-engineering of the application portion. Serpent consists of: o A language designed for the specification of user interfaces. o A language to define the interface between the application and Serpent. o A transaction processing library. o An interactive editor for the specification of dialogues and for the construction and previewing of displays. o Input/output (I/O) technologies. Serpent Features Serpent provides many features to address the requirements, develop- ment, and maintenance phases of a project. For the requirements phase, Serpent provides a language and an editor to define the user interface. For the development phase, Serpent provides a set of tools that simplify the development of the user interface. For the maintenance phase, Ser- pent allows integration of new technologies as well as the ability to mod- ify the user interface. Specifically, Serpent: o Provides generality in supporting a wide range of both applications and I/O toolkits through its use of database-like schemas. o Provides a set of tools that simplify the user interface implementation process. o Encourages the separation of software systems into user interface and "core" application portions, a separation which will decrease the cost of subsequent modifications to the system. o Supports rapid prototyping and incremental development of user interfaces. o Facilitates the integration of new user interface toolkits into the user interface portion of a system. o Supports both synchronous and asynchronous communication. This allows real-time applications to satisfy timing constraints without waiting for user input. Serpent Documentation The following documents provide information about the Serpent system. Serpent Overview Introduces the Serpent system. Serpent: System Guide Describes installation procedures, specific input/output file descriptions for intermediate sites and other information necessary to set up a Serpent application. Serpent: Saddle User's Guide Describes the language that is used to specify interfaces between an application and Serpent. Serpent: Dialogue Editor User's Guide Describes how to use the editor to develop and maintain a dialogue. Serpent: Slang Reference Manual Provides a complete reference to Slang, the language used to specify a dialogue. Serpent: C Application Developer's Guide Serpent: Ada Application Developer's Guide Describe how the application interacts with Serpent. These guides de- scribe the runtime interface library, which includes routines that manage such functions as timing, notification of actions, and identification of specific instances of the data. Serpent: Guide to Adding Toolkits Describes how to add user interface toolkits, such as various Xt-based widget sets, to Serpent or to an existing Serpent application. Currently, Serpent includes bindings to the Athena Widget Set and the Motif Widget Set. System Description Serpent is based on the UIMS architecture defined by the Seeheim work- ing group on graphical interfaces. The architecture consists of three lay- ers: 1. The presentation layer is responsible for layout and device issues. 2. The dialogue layer specifies the presentation of application information and user interactions 3. The application layer provides the functionality for the system under development. The architecture is intended to encourage the proper separation of func- tionality between the application and the user interface portions of a soft- ware system and to allow for the development of specialized tools to sup- port the different layers. The three different layers of the standard archi- tecture provide differing levels of control over user input and system output. Serpent Architecture Presentation Layer The presentation layer controls the end user interactions and generates low-level feedback. As illustrated in the following figure, the presenta- tion layer consists of various I/O toolkits that have been incorporated into Serpent. A standard interface is used that simplifies the addition of new toolkits. Each I/O toolkit defines a collection of interaction objects visi- ble to the end user. The interaction objects that exist at this level depend upon which I/O toolkits have been integrated into Serpent at a particular installation. Currently, Serpent supports the X Window System, Version 11, with the Athena Widget set and the OSF Motif Widget set. Dialogue Layer The dialogue layer specifies the user interface and provides the mapping between the presentation and application layers. The data that is passed between the application layer and the dialogue layer is referred to as application shared data. The application shared data definition provides the format of the data, while the application shared data represents the actual value of the data. The dialogue layer determines which information is currently available to the end user and specifies the form that the presentation will take as previously defined by the dialogue specifier (individual responsible for creating the dialogue). The dialogue layer acts as a traffic manager for communications between the application and I/O toolkits. The presenta- tion layer manages the presentation; the dialogue layer tells the presenta- tion layer what to do. For example, the presentation layer will display a button that the end user can select; the dialogue layer will tell the presen- tation layer the position and the contents of the button, and will respond when the button is selected. Application Layer The application layer performs those functions that are specific to the ap- plication. Since the other two layers are designed to take care of all the user interface details, the application should be written to be presenta- tion-independent: there should be no dependency upon a specific I/O toolkit. While the application developer should be aware that there is an end user and should provide the end user with information, that informa- tion should be presented in application terms. The application layer is not part of the Serpent system. Serpent currently supports applications developed in C or Ada. Serpent Components Dialogue editor - Interactive editor used to specify a dialogue. The ed- itor contains manipulation capabilities to construct and preview a dia- logue. I/O toolkits - Components of the presentation layer. Included are both the toolkits that have been integrated into Serpent and the integration code itself. Saddle - Database-like schema language used to define the interface be- tween the application layer and the dialogue layer. Slang - Language used to specify the dialogue. This language is compiled into the dialogue layer of the Serpent architecture. Transaction processing library - Library of procedures linked to the ap- plication layer to provide access to Serpent. Using Serpent for Prototyping Serpent is designed to allow incremental development of the user inter- face from prototyping through production. Serpent can be used either with or without an application layer. Simple prototyping is the construction of displays with a fixed collection of objects on the screen. The visual aspects of these objects are best spec- ified with the dialogue editor and the active aspects are best specified us- ing the Serpent textual dialogue description language, Slang. This chap- ter presents the concepts that underlie the dialogue description. In Serpent terms, a simple prototype has no application layer.