Rapid Software Prototyping Using Visual Language Techniques
Total Page:16
File Type:pdf, Size:1020Kb
Rapid Software Prototyping Using Visual Language Techniques Kang Zhang Guang-Lei Song Jun Kong Department of Computer Science, University of Texas at Dallas Richardson, Texas 75083-0688, USA {kzhang, gxs017800, jxk019200}@utdallas.edu Abstract fashion [14]. Visual languages include languages where programming is done by manipulation of visual objects, Rapid prototyping of domain-specific software requires a languages designed to facilitate algorithm and program systematic software development methodology and user- animation, and languages for use in computer-oriented ap- friendly tools. Being both executable and easy to use, visual plications such as software engineering and database design languages and their automatic generation mechanisms are and access [3]. Different from CASE toolsets, visual lan- highly suitable for software prototyping. This paper pre- guages are executable specification languages that are de- sents a software prototyping methodology based on the fined by graph grammars and syntax-directed rewriting visual language generation technology, that allows visual rules, apart from being at high level [19]. This means that prototyping languages to be specified and generated using prototyped domain software can also be rigorously verified an expressive graph grammar formalism. Executable proto- according to the provided specification. We will call the types and their verification and code generation are made visual languages designed for rapid software prototyping as possible by syntax-directed computations. The paper dem- visual executable prototyping languages (VEPLs). This onstrates this methodology through a prototyping example paper presents an automatic language-generation mecha- built on our current implementation. nism as a meta-tool for the fast generation and reuse of do- main-specific language modules, using a graph grammar- based approach to the specification and verification of do- main software prototypes. 1 Introduction Automatic generation of VEPLs involves the generation Prototyping is an effective way to gain understanding of of a visual programming environment with a graphical user the requirements, reduce the complexity of the problem and interface tailored for the VEPL users. A VEPL generation provide an early validation of the system design. There has system enforces the definition of graph grammars and syn- been no commonly accepted executable specification lan- tax-directed rewriting rules according to domain require- guage or high-level programming language for computer- ments, before a VEPL is generated. The generated VEPL, aided prototyping of quality domain-specific software. Ex- therefore, can be used to rapidly prototype high quality isting prototyping tools are either too specialized to be use- domain software. The execution trace and measurements of ful in a wide spectrum of application domains, or too diffi- a domain prototype written in the VEPL may be specified cult to use by non-computing professionals. Also, few using syntax-directed rewriting rules so that the prototype specification or prototyping languages or tools support non- can be quantitatively and functionally analyzed. Iterative disposable prototyping. In most cases, an accepted proto- and incremental prototyping is naturally supported by the type has to be re-implemented in a conventional program- two-step process. The domain software could be easily re- ming language. prototyped by visual programming in the VEPL, or, if structural (syntactical) or behavioral (semantic) changes are Rapid prototyping of domain-specific software requires required, the VEPL could be re-generated by specifying the a systematic software development methodology and user- grammars and rewriting rules with new and evolving fea- friendly tools. Being both executable and easy to use, visual tures. languages and their automatic generation mechanisms are highly suitable for software prototyping. As visual tools are The thrust of this methodology is the meta-tool capabil- becoming increasingly popular for non-computing profes- ity, i.e. a software engineer has a VEPL generator at his/her sionals and end-users, visual languages would potentially disposal for generating any required VEPL or re-generating challenge traditional specification languages for rapid soft- a modified VEPL whenever needed. This methodology is ware prototyping due to their intuitiveness and ease-of-use. explained in the next section. Section 3 gives a detailed prototyping example using this methodology. Related work Visual programming refers to a process in which the user specifies a program in a two (or higher) dimensional is compared in Section 4, followed by the conclusions in software engineers. Once a software engineer has provided Section 5. the specification through production rules, a VEPL with its visual programming environment will be automatically generated in the same fashion as generating textual lan- 2 Automatic Generation of Visual Executa- guages using Lex/Yacc. A programmer (or user), without ble Prototyping Languages any knowledge of the prototyping language syntax or the detailed specification, will be able to use the programming environment to construct prototypes visually on the graphi- 2.1 Design Criteria cal editor of the tool and run the prototypes to verify their Tools and formalisms have been created for automati- requirements. Once the content of each software component cally generating visual languages. Most of them are special- (i.e. node of the graph) is provided, the system is able to ized in certain aspects of visual language generation, e.g., generate the final prototypical and executable programs. ;3¤ . ! )£ for user interface generation [10], and for parsing [4][13]. * ) 2/.3 ! 4#£¥¡ * ! Little work has been done in automatically generating de- %¥ ¡ 5 67¡ ¦ £¥¤§¦©¨¥¡ © § sired visual languages from rigorous specifications. In a ¢¡ visual programming environment, users must be able to 67 . 18£ )£¥ + &¡ £ ¥¤ ©£ ¥¡ ! £ #" $ &%¥¨§'( interactively construct and manipulate reusable components ¨§¡ in the visual language. The graphical requirements of a *&¡ £4++£¥ 9¨§¡ :§ § 9/. £¥¤ ¦ )£¥ * ) + !,¨§¡ ¥¤ visual language include defining the reusable visual com- ¢¡ §¡ £¥1;1<¡=$ >¡ ( ponents of the language and the control and dataflow rela- ¨§¡ E F§G©HG¥IKJ A L E M E B>H¥D E F G©H.NH E GOD L AP CE L A Q;AGD O tionships that must be maintained when these components ?@¥A BC D are connected together. The editing operations themselves 67 . 18£ £ + 7¥¥¡ £ £¥/¥ 0¨§¡ §¤§ £ ¨§¡ ¡ £¥1+ are event-driven, and appropriate interpretations of mouse %- . and keyboard events must be provided. When considering the design of a visual software proto- Figure 1: The meta-tool concept typing framework that supports the whole process of auto- matic generation of VEPLs, we need to consider the follow- Therefore, more disciplined software development is en- ing design criteria: couraged by the 2-level process, i.e. the meta-tool used by • It is necessary for the VEPL generation framework to the software engineer and the visual prototypical tool by the be an executable programming environment so that programmer. The development can be iterative and incre- VEPLs can be automatically generated and the soft- mental. Thus, the grammar-based specification approach ware engineer is free from the general tasks in the advocates a sound yet flexible design practice. construction of a new VEPL. He/she needs only to The VEPL generation framework concept is shown in provide domain-related specifications for the desired Figure 2, which illustrates four groups of specifications, to VEPL using an automated toolset. be provided by a software engineer through three graphical • The toolset should support syntactic and semantic tools. Visual component specifications define a set of visual specifications for effectively designing VEPLs and ef- objects (using the Visual Object Tool) representing soft- ficiently parsing and executing prototypes constructed ware components to be used in the domain VEPL. The as visual programs in a VEPL. VOT can access software components from the component repository by either reusing existing components or con- • It is desirable for the framework to be customizable to structing new components using the generated VEPLs. a wide spectrum of VEPLs, and to support an iterative They can also be reused in generating VEPLs. Control and and incremental process of prototyping. simulation specifications provide a formal method for de- scribing the interactive behavior of different parts of the 2.2. The Meta-Tool Concept VEPL and how the VEPL will be executed (including how its execution to be visualized). They also define how the Software engineers of complex software systems typi- generated VEPL environment interacts with the program- cally use diagramming methods, such as UML, as concep- mer. Formal method specifications provide grammar rules tual devices to conceptualize their architectural design. that determine the syntax and semantics of a VEPL and can Compared with text, graphs can represent semantic and reason or transform a diagram for debugging, animation, or structural information more intuitively. As shown in Figure other purposes. Control and parsing specifications are pro- 1, we provide a structural specification and verification vided using the Control and Parsing Tool. With the visual mechanism in the form of graphical production rules for objects, control and parsing rules specified, the framework is automatically