|
WinSANAL
the Tool for
ALGORITHM VISUALIZATION
AND DEBUGGING
Programmers, as well as programming teachers,
often draw pictures. It helps them to understand algorithms.

| Purpose: |
Showing the way programs written in high-level languages (C, C++)
work
|
| Main features: |
-
displaying selected data groups of a program in an adequate
graphical form,
-
graphically controlled debugging,
-
data driven visualization at a high level of abstraction,
-
deeply parametrerized internal data processing,
-
diversity of indispensable system calls significantly reduced.
|
| Application area:
|
-
software engineering
-
computer science didactics (programming, algorithm analysis)
|
| Our current goal:
|
-
more automation
-
less effort necessary to prepare a projection
|
Algorithm Animation
main page
Download
the WinSANAL system demo!
Samples...

Introduction
WinSANAL is a system for algorithm visualization. Its destination is
to present the operation of algorithms related to creating and modifying
organized data sets or structures such as numerical sequences, arrays, lists
and graphs. What is in fact subject to visualization it is data in chosen
graphical representation. The system is endowed with a mechanism for smooth
data projecting that makes easier observing changes that occur in the
visualized program. It has also facilities for modifying data values
interactively while the program is run. It is possible to interact with
graphical elements as well as to use a symbolic form of data.
WinSANAL has been created in the Software Group of the Institute of
Computer Science of the Silesian Technical University since 1996. By the
construction advantage has been taken of the experiences gained in 1989-1996
while the previous system called SANAL was developped.
WinSANAL has the form of a specialized procedure library. It is going
to have facilities thanks to that it will be easier to animate user's programs
(i.e. to prepare them for display - what we call a projection). The user can
also get advantage of readytorun library presentations.

How the visualization of a program is performed
Our algorithm animation system cooperates with the program that
implements the algorithm put to visualization. The system watches the values of
variables chosen by the user. When during the execution of the program some of
them changes, the system reads out the value and puts it to necessary
transformations. Subsequently, it generates the final image which corresponds
to the value.
See the picture
showing the architecture of an algorithm animation system.

Preparing a program for a projection
The algorithm to be presented should be supplied in the form of a
program written in C or C++. Preparing an algorithm animation is a
twostage process. In the first dtage, after having decided what and how
should be depicted during projection, one inserts WinSANAL service function
calls to the program source code. In the second stage so called configuration
script is prepared. It informs the system what transformations are to be
applied to the values of individual variables. For a modified and compiled
algorithm various visualization schemes can be applied simply by providing a
proper configuration script.
In the present WinSANAL version all the process of preparing programs
for projection is to be done by hand. However, a great deal of operations can
be performed mechanically by using existing standard configuration files.

Means of graphical presentation
The system is equipped with an extensive set of means of graphical
presentation as well as of translation of data.
For presenting individual elements we use so called grels -
standardized graphical elements. Among others, grels in the form of simple
geometrical figures (such as rectangles or ellipses) are available, as well as
bitmap grels (i.e. ones displayed in the form of a bitmap). Objects destined to
represent character or text variables, as well as vertices and edges of graph
structures, can be used, too.
Images of complex data structures can be constructed by using linked
sets of basic grels. The repertoire of grels is open - the user can create new
kinds of them by himself.
Translation of data values to grel aspects corresponding to them is
done by internal translators. Translator categories that are available now are
able to do simple (for example linear, sinusoidal) functional transformations,
thresholding, value comparisons and so on. Translators may be also used to form
trajectories which should be followed by moving elements (default trajectories
are rectilinear).

Interaction with the user
During a presentation the user may actively interfere with the
execution of the program under observation. He or she may modify the values of
variables presented on the screen, either by influencing with images that
represent the values, or by writing new data in a traditional symbolic form.
This purpose serve adequate dialog boxes. It is also possible to interactively
adjust the content, rate, graphical windows layout and other parameters of the
show to the user's needs.

Library of programs ready for projection
Together with the WinSANAL system a library of ready for presentation
programs is delivered. The programs implement classical algorithms of the area
of sorting, finding, numeric calculations, developmental systems, automated
translation and others.
Selected samples may be seen here.

Development directions
At present we intensively work upon a next version of the system. Our
aim is to reduce the effort necessary to prepare programs for projection.
Several modules are under construction. One of them provides facilities for
choosing graphical representation for watched variables as well as for defining
desired way of transforming values of variables into adequate aspects of
graphical elements. Another module ensures that calls to functions that inform
the system on the changes of watched variables values are automatically
inserted to the program. We hope that dataflow analysis - a technique used
among others in compiler construction - will be useful in performing such a
task.

Algorithm Animation & Visualization Pages
have been created by Jaroslaw Francik.
Revised: March 12, 1997
Copyright © 1996, 1997 by Jaroslaw Francik

|