A source code animation tool for C programs under Unix.
(GIF animation is available)
Downloading source files (in .tgz format; 73kb):
In some Linux distributions, standard library files (e.g. libc) are
compiled with -g option. GDB traces functions in such libraries,
resulting lengthy animation of "source file not found" slides.
Now functions without source files are skipped (actually they are
finish'ed at the entry).
The values of local variables and function arguments are
displayed automatically in the value window.
Downloading source files (in .tgz format; 72kb):
The `paper-slide-show' is a traditional form of Japanese children's
entertainment in which the narrator tells a story and illustrates it
by showing a sequence of painted pictures.
We designed and implemented a source code animation system based on
the metaphor of paper-slide-show.
The target of our system is:
Students learning programming
For these students it is often hard to visualize the
behavior of their programs.
Our system offers an entry-level code animation
suitable for such students.
Walk-through tool for programmers
It is common to trace (walk-through) a portion of the code
which has just been created or modified
in order to prevent bugs.
Our system supports such walk-through.
Support tool for understanding unknown software
As the first step towards understanding some legacy software,
the code animation helps a user to grasp its behavior.
Features of our system are:
No modification of the source code is necessary.
Merely by compiling with debugging option ('-g' for most compilers),
our system can animate the code.
(Novice students have enough troubles with their own code.)
The user needs little knowledge to start and control the system.
Once he has started the animation from the command line,
all he has to do is to watch his code be animated automatically.
(Most visualization tools require complex interactions, which is
inappropriate for novice users.)
Procedure/Function calls are represented by a slide showing the
callee's source, slid in from the right of the window onto the previous slide.
The code of the caller is left partially visible at
the left of the callee slide, thus the user is able to see the nesting
The motion of the slide vertically (in loops etc.) or
horizontally (during calls and returns) is designed so as to the user
can easily follow the transition.
(The screen never `leaps' to the next situation)
Our system consists of two parts. The data acquisition part
uses the Perl language and the Gdb debugger, which are almost universal.
The visualization part is a C program using the Xlib window libraries,
which is also common for Unix platforms.
Our system is capable to animate significant programs, such as
GNU sed, which includes about 8000 lines of C code.