Generating program animators from programming language semantics

I present a theory of program animation based on formal semantics. This theory shows how an animator for a language can be generated from a formal specification of that language. Such an animator presents a model of evaluation that is formally correct with respect to the semantics. The theory also provides a framework for comparing definitions of animation operations. The main part of the theory is the definition of an evaluation step. I compare two definitions. The first is based on the transitions used in the transitional style of structured operational semantics, and is motivated by the idea that these transitions represent an intuitive idea of a computation step. Unfortunately this definition produces unsatisfactory animations. However, it can be augmented to give one that better satisfies the needs of the user. Both of these definitions are given in the relational style of structured operational semantics. The first definition is based on an equivalence between the relational and transitional styles; I give a definition of this equivalence. I also discuss the relation between the definition of a step and the choice of semantic formalism. Views of a program in mid-evaluation can be defined by extending the specification of the programming language to include semantic display rules. Each semantic display rule specifies the display of one sub-phrase of the program in mid-evaluation. This approach is powerful enough to define a wide range of views. I also show how the definition of a step can be parameterised on a view.

[1]  J. C. Spohrer,et al.  Alternatives to construct-based programming misconceptions , 1986, CHI '86.

[2]  Luís Moniz Pereira Rational Debugging in Logic Programming , 1986, ICLP.

[3]  C Bron,et al.  COGNITIVE STRATEGIES AND LOOPING CONSTRUCTS - AN EMPIRICAL-STUDY , 1984 .

[4]  Laurette Bradley A Treatment of Languages with Stages of Evaluation , 1987, MFPS.

[5]  Donald A. Norman,et al.  Some observations on mental models , 1987 .

[6]  CARL MARTIN ALLWOOD,et al.  Novices on the Computer: A Review of the Literature , 1986, Int. J. Man Mach. Stud..

[7]  Marc Eisenstadt,et al.  Graphical Debugging with the Transparent PROLOG Machine (TPM) , 1987, IJCAI.

[8]  Brian W. Kernighan PIC—a language for typesetting graphics , 1981 .

[9]  Ruven E. Brooks,et al.  Studying programmer behavior experimentally: the problems of proper methodology , 1980, CACM.

[10]  James F. Gross Video augmented computer science (VACS) , 1975, SGCS.

[11]  Rich Seidner,et al.  Interactive debug requirements , 1983, ACM SIGPLAN Notices.

[12]  Christopher F. Herot,et al.  Program Visualization: Graphics Support for Software Development , 1983, 20th Design Automation Conference Proceedings.

[13]  Richard C. Atkinson,et al.  The Computer as a Tutorial Laboratory: The Stanford BIP Project. , 1976 .

[14]  Murray Hill,et al.  Yacc: Yet Another Compiler-Compiler , 1978 .

[15]  Robin Milner,et al.  Communication and concurrency , 1989, PHI Series in computer science.

[16]  R. Nigel Horspool,et al.  Mkscan—An interactive scanner generator , 1987, Softw. Pract. Exp..

[17]  Robin Milner Program Semantics and mechanized proof , 1976 .

[18]  Paul Klint,et al.  Towards monolingual programming environments , 1985, TOPL.

[19]  T. G. McDaneld,et al.  An interactive turning/post/mixed machine simulator , 1976, SGCS.

[20]  David E. Kieras,et al.  The Role of a Mental Model in Learning to Operate a Device , 1990, Cogn. Sci..

[21]  Robert Sedgewick,et al.  Progress report: Brown university instructional computing laboratory , 1984, SIGSCE '84.

[22]  Stephen R. Schach,et al.  A Very High-Level Interactive Graphical Trace for the Pascal Heap , 1983, IEEE Transactions on Software Engineering.

[23]  Robert Sedgewick,et al.  Techniques for Algorithm Animation , 1985, IEEE Software.

[24]  Bertrand Meyer Cépage: Toward computer-aided design of software , 1988, J. Syst. Softw..

[25]  Steven P. Reiss Visual language and the GARDEN system , 1986, Informatics and Psychology Workshop.

[26]  Kai Koskimies,et al.  The design of a language processor generator , 1988, Softw. Pract. Exp..

[27]  Mads Dam,et al.  Compiler Generation from Relational Semantics , 1986, ESOP.

[28]  Gregor Snelting,et al.  The PSG system: from formal language definitions to interactive programming environments , 1986, TOPL.

[29]  John G. Cleary,et al.  Graphical Display of Complex Information within a Prolog Debugger , 1986, Int. J. Man Mach. Stud..

[30]  Richard J. Lipton,et al.  Social processes and proofs of theorems and programs , 1979, CACM.

[31]  M. Kobayashi,et al.  Visual aid for FORTRAN program debugging , 1982, ICSE '82.

[32]  P. J. Landin The Mechanical Evaluation of Expressions , 1964, Comput. J..

[33]  Gregor Snelting,et al.  Context-sensitive Editing with PSG Environments , 1986, Advanced Programming Environments.

[34]  Donald MacKenzie,et al.  The social shaping of technology : how the refrigerator got its hum , 1985 .

[35]  Ron Tischler,et al.  Static analysis of programs as an aid to debugging , 1983, SIGSOFT '83.

[36]  Ehud Y. Shapiro,et al.  Algorithmic program diagnosis , 1982, POPL '82.

[37]  Paul Klint,et al.  A syntax definition formalism , 1986 .

[38]  Sarah A. Douglas,et al.  Learning text editor semantics by analogy , 1983, CHI '83.

[39]  D. Park A Predicate Transformer for Weak Fair Iteration , 1981 .

[40]  Vincent P. Heuring The Automatic Generation of Fast Lexical Analysers , 1986, Softw. Pract. Exp..

[41]  Stuart H. Hirshfield Program synthesis as a tool for teaching programming , 1984, SGCS.

[42]  Brad Allen Myers,et al.  Displaying data structures for interactive debugging , 1980 .

[43]  Richard E. Mayer,et al.  A diagnosis of beginning programmers' misconceptions of BASIC programming statements , 1983, Commun. ACM.

[44]  Thomas G. Moher,et al.  PROVIDE: A Process Visualization and Debugging Environment , 1988, IEEE Trans. Software Eng..

[45]  Susan Wiedenbeck,et al.  Beacons in Computer Program Comprehension , 1986, Int. J. Man Mach. Stud..

[46]  Gregor Snelting,et al.  A generator for language-specific debugging systems , 1987, SIGPLAN '87.

[47]  Alan Bundy,et al.  What stories should we tell novice PROLOG programmers , 1987 .

[48]  Thomas W. Reps,et al.  The synthesizer generator , 1984, SDE 1.

[49]  Jon Froehlich Background , 1997 .

[50]  Edsger W. Dijkstra,et al.  Guarded commands, nondeterminacy and formal derivation of programs , 1975, Commun. ACM.

[51]  Marvin V. Zelkowitz Reversible execution , 1973, CACM.

[52]  Lisa Rubin Neal Cognition-sensitive design and user modeling for syntax-directed editors , 1986, CHI '87.

[53]  T. Rajan A principled design for an animated view of program execution for novice programmers , 1986 .

[54]  Thomas R. Leap Animations of computers as teaching aids , 1984, SIGSCE '84.