Computer Science and Information Systems
The international journal published by ComSIS Consortium 

Constructing program animations using a pattern-based approach

 

UDC 004.4'426



Daniela da Cruz 1, Pedro Rangel Henriques 1, and Maria Joao Varanda Pereira 2

1 University of Minho - Department of Computer Science,
Campus de Gualtar, 4715-057, Braga, Portugal
{danieladacruz,prh}@di.uminho.pt

2 Polytechnic Institute of Braganca
Campus de Sta. Apolonia, Apartado 134 - 5301-857, Braganca, Portugal
mjoao@ipb.pt
 

 

 

Abstract. The aim of this paper is to discuss how our pattern-based strategy for the visualization of data and control flow can effectively be used to animate the program and exhibit its behavior. That result allows us to propose its use for Program Comprehension. The animator uses well known compiler techniques to inspect the source code in order to extract the necessary information to visualize it and understand program execution. We convert the source program into an internal decorated (or attributed) abstract syntax tree and then we visualize the structure by traversing it, and applying visualization rules at each node according to a pre-defined rule-base. In order to calculate the next step in the program execution, a set of rewriting rules are applied to the tree. The visualization of this new tree is shown and the program animation is constructed using an iterative process. No changes are made in the source code, and the execution is simulated step by step.

Several examples of visualization are shown to illustrate the approach and support our idea of applying it in the context of a Program Comprehension environment.
 


Volume 04 , Issue 02 (December 2007)
Year of Publication: 2007
ISSN: 1820-0214
Publisher ComSIS Consortium
Full text available: Pdf
 
 
Home 
ComSIS Consortium
Aims and Scope 
Editorial Board
Editorial Council
Managing Board
Information for Contributors
Copyright Transfer Form
Current Issue
Archive
Forthcoming Articles
Subscription
Contact Info