首页    期刊浏览 2024年11月07日 星期四
登录注册

文章基本信息

  • 标题:Constructing program animations using a pattern based approach
  • 本地全文:下载
  • 作者:Cruz da Daniela ; Henriques Rangel Pedro ; Varanda João Maria
  • 期刊名称:Computer Science and Information Systems
  • 印刷版ISSN:1820-0214
  • 电子版ISSN:2406-1018
  • 出版年度:2007
  • 卷号:4
  • 期号:2
  • 页码:97-114
  • DOI:10.2298/CSIS0702097C
  • 出版社:ComSIS Consortium
  • 摘要:

    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.

国家哲学社会科学文献中心版权所有