
- 62 - What are Visual Programming, Programming by Example, and Program Visualization? Brad A. Myers Dynamic Graphics Project . Computer Systems Research Institute University of Toronto Toronto, Ontario, M5S lA4 Canada ABSTRACT Extended Summary. NOTE: This paper is a summary of [Myers 86J . There has been a great interest recently in systems The reader should refer to that paper for full informa­ that use graphics to aid in the programming, debug­ tion. ging, and understanding of computer programs. The As the distribution of personal computers and the terms "Visual Programming" and "Program Visuali­ more powerful personal workstations grows, the zation" have been applied to these systems. Also, majority of computer users now do not know how to there has been a renewed interest in using examples program. They buy computers with packaged to help alleviate the complexity of programming. s()f\ware and are not able to modify the software even This· technique is called "Programming by Example." to make small changes. In order to allow the end user This paper attempts to provide more meaning to these to reconfigure and modify the system, the software terms by giving precise definitions, and then uses may provide various options, but these often make the these definitions to classify existing systems into a system more complex and still may not address the taxonomy. users' problems. "Easy-to-use" software, such as the "Direct Manipulation" systems [Shneiderman 83] actually make the user-programmer gap worse since more people will be able to use the software (since it RESUME is easy to use), but the internal program code is now much more complicated (due to the extra code to han­ Les systemes qui utilisent l'infographie pour aider a dle the user interface). Therefore, systems are mov­ la programmation, a la mise-au-point et a .la ing in the direction of providing end user program­ comprehension de logiciels ont recemment susclte ming. It is well-known that conventional program­ beaucoup d'interet. Les termes "program mat ion ming languages are difficult to learn and use [Gould visuelle" et "visualisation de programmes" ont ete 84), requiring skills that many people do not have. In associes it ces systemes. Il y a aussi eu un renouveau an attempt to make the programming task easier, d'inteTl!t pour l'utilisation d'exemples pour aider a recent research has been directed towards using simplifier la programmation. On parle alors de "pr?­ graphics. This has been called "Visual Programming" grammation par exemples". Nous essaierons de defimr or "Graphical Programming". Some Visual Program­ ces termes avec plus de precision et utiliserons ces ming systems have successfully demonstrated tllat definitions comme base pour etablir une taxonomie non-programmers can create fairly complex programs des systemes disponibles actuellement. with little training [Halbert 84). Another motivation for using grapllics is that it tends to be a higher-level description of tile desired actions (often de-emphasizing issues of syntax and providing a higher level of abstraction) and may Key Words and Phrases: Visual Programming, Pro­ tllerefore make the programming task easier even for gram Visualization, Programming by Example, professional programmers. This may be especially Inferencing, Automatic Programming, Flowcharts, true during debugging, where graphics can be used to Debugging Aids, Program Synthesis, Documentation, present much more information about the program Computer Languages. state (such as current variables and data structures) than is possible with purely textual displays. This is one of the goals of Program Visualization. Other Pro­ gram Visualization systems use graphics to help teach computer programming. Graphics Interface '88 Vision Interface '88 - .63 - Programming-by-Example is another technology Visual Programming "Visual Programming" (VP) that has been investigated to make programming refers to any system that allows the user to specify a easier, especially for nOh-programmers. It involves program in a two (or more) dimensional fashion. Con­ presenting to the computer examples of the data that ventional textual languages are not considered · two the program is supposed to process and using these dimensional since the compiler or interpreter examples during the development of the program. processes it as a long, one-dimensional stream. Many, although not all,Programming-by-Example Visual Programming includes conventional flow systems have also used Visual Programming, s6 these charts and graphical programming languages. It does two 'technologies are often linked. not include systems that use conventional (linear) pro­ Recently, there has been a large number of arti­ gramming languages to define pictures. This elim­ cles about systems that incorporate some or all of inates most graphics editors, like Sketchpad [Suther­ these features [Grafton 85][Raeder 85]. Unfor­ land 63]. tunately, the terms have been used impreciselyl, and Program Visualization' "Program Visualization" (PV) there has not been a comprehensive taxonomy that is an entirely different concept from Visual Program­ classifies these systems. This paper summarizes ming. lit Visual Programming, the graphics is the research that attempts fill this gap in the literature. program itself, but in Program Visualization, the pro­ The full results are reported in [Myers 86]. First, the gram is specified in the conventional, textual manner, important terms are defined in a precise manner, and and the graphics is used to illustrate some aspect of then these definitions are used to differentiate some the program or its run-time execution. Unfortunately, example systems. in the past, many Program Visualization system have There are many systems that could be included in been incorrectly labeled "Visual Programmi~g" (as in this paper in the various categories, but no attempt [Grafton 85]). Program Visualization systems can be has been made to be comprehensive. It is hoped that divided along two axes: whether they illustrate the the selection of systems listed will help the reader code or the data of the program, and whether they are understand the intent of the classification system. dynamic or static. "Dynamic" refers to systems that can show an animation of the program running, whereas "static" systems are limited to snapshots of Definitions. the program at certain points. If a program created Programming: What is meant by computer "program­ using Visual Programming is to be displayed or ming" is probably well understood, but it is important debugged, clearly this should be done in a graphical to have a definition that can be used to eliminate manner, but this would not be considered Program some limited systems. In this paper, "program" is Visualization. Although these two terms are similar defined as "a set of statements that can be submitted and confusing, they have been widely used in the as a unit to some computer system and used to direct literature, so it was felt appropriate to continue to use the behavior of that system" [Oxford 83]. While the the common terms. ability to compute "everything" is not required, the system must include the ability to handle conditionals Programming by Example The term "Programming and iteration, at least implicitly. by Example" (PBE) has been used to describe a large Interactive vs. Batch Any programming language variety of systems. Some early systems attempted to system may either be "interactive" or "batch." A create an entire program from a set of input-output batch system has a large processing delay before pairs. Other systems require the user to "work statements can be run while they are compiled, through" an algorithm on a number of examples and whereas an interactive system allows statements to be then the system tries to infer the general program executed when they are entered. This characteriza­ structure. This is often called "automatic program­ tion is actually more of a continuum than a dichotomy ming" and has generally been an area of Artificial since even interactive languages like LISP typically Intelligence research. require groups of statements (such as an entire pro­ Recently, there have been a number of systems cedure) to be specified before they are executed. that require the user to specify everything about the program (there is no inference involved), but the user can work out the program on a specific example. The system executes the user's commands normally, but 1 For example, Zloofs Query-By-Example system [Zloof 77 and remembers them for later re-use. Bill Buxton coined 81] is not a Programming by Example system. the phrase "Programming with Examples" to more accurately describe these systems. Halbert [84] characterizes Programming with Examples as "Do What I Did" whereas inferential Programming by Example might be "Do What I Mean". The term "Programming by Example" will be used to include both inferencing systems and Programming With Example systems. Graphics Interface '86 Vision Interface '86 - 64 - Of course, whenever code is executed in any sys­ Not Programming by Example tem, test data must be entered to run it on. The dis­ tinction between normal testing and "Programming Batch Interact.ive with Examples" is that in the latter the system requires or encourages the specification of the' exam­ All Conventional LISP, APL, etc. Not VP Languages: ples before programming begins, and then applies the Pascal, Fortran, program as it develops to the examples. This essen­ etc. tially requires all Programming-with-Example sys­ tems (but not Programming-by-Example systems with GraiI Graphical Program Editor [Ellis 69] [Sutherland 66] inferencing) to be interactive. AMBIT/G/L PIGS VP [Christensen 68,71] [Pong 83) Taxonomy of Programming Systems. Query by Example Pict [Zloof 77,81) [Glinert 84) This paper presents two taxonomies. The first is FORMAL PROGRAPH for systems that support programming. The second [Shu 85] [Pietrzyko'Nski 83,84) taxonomy is for systems that use graphics after the GAL State Transition U[MS programming process is finished (Program Visualiza­ [Albizuri-Romero 84] [Jacob 85) tion systems).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages4 Page
-
File Size-