SHOW-AND-TELL PLAY-IN: COMBINING NATURAL LANGUAGE WITH USER INTERACTION FOR SPECIFYING BEHAVIOR Michal Gordon and David Harel Weizmann Institute of Science Rehovot, Israel ABSTRACT In search of improving the ways to create meaningful systems from requirements specifications, this paper combines the showing and telling of how a system should behave. Using scenario-based programming and the language of live sequence charts, we suggest how user interaction with the system and user written requirements in natural language can interleave to create specifications through an interface that is both natural and agile. KEYWORDS Intelligent interfaces, Requirement engineering, Scenario-based programming, Live sequence charts 1. INTRODUCTION Scenario-based programming is a method that allows specifying system behavior by describing system scenarios using precise and executable methods. The language of live sequence charts (LSC) (Damm and Harel 2001) is one method for these types of descriptions. LSCs add expressive power to earlier sequence- based languages by being multi-modal: an LSC can distinguish what must happen from what may happen, and can specify also what is forbidden from happening. The resulting specification is fully executable. One of the advantages of LSCs is their use for describing system behavior for reactive systems. The language constitutes a step in the direction of liberating programming and making programming more accessible to people who are not programmers, as described in (Harel 2008). The LSC language has been extended with a tool (the Play-Engine) that supports intuitive GUI-based methods for capturing the behavior (termed play-in) and for executing a set of LSCs (termed play-out); see (Harel and Marelly 2003). The present work focuses on introducing an enriched method for play-in, which creates an improved interface for specifying system requirements and for scenario-based programming. The new method combines natural language parsing methods with user interaction and uses these to create an intelligent user interface. The user specifying the system’s behavior can use the method most relevant for the type of behavior he/she is specifying, by showing — interacting with the system or by telling — describing (parts of) the scenario in a semi-natural language (Gordon and Harel 2009). Any textual requirements thus entered are parsed, so that our show-and-tell (S&T) play-in algorithm can intelligently guess the user’s intention when there are multiple possibilities. As in real life, a picture is often worth a thousand words and other times a textual description is more appropriate. In analogy, there may be cases when the interaction is simpler to put in words than to demonstrate, or vice-versa. The main contribution of this paper is in combining the two in a natural and semantically meaningful way. 2. THE LANGUAGE OF LSCS AND PLAY-IN In its basic form, an LSC specifies a multi-modal piece of behavior as a sequence of message interactions between object instances. It can assert mandatory behavior — what must happen (with a hot temperature) — ISBN: 978-972-8939-52-6 © 2011 IADIS 360