首页|程序调试中的数据结构演变可视化方法

程序调试中的数据结构演变可视化方法

扫码查看
数据结构是程序执行时的重要信息载体,其演变过程往往较为复杂和抽象。针对程序设计初学者较难理解数据结构演变过程的问题,提出一种面向程序调试中的数据结构演变可视化方法。在调试开始时,首先使用组件表达式表示数据结构,然后通过配置表以及布局函数将组件表达式生成可视化视图。在进行单步调试后,通过对比单步调试前后的可视化数据方式生成组件演变行为,运用有限状态机理论构建数据结构演变模型,该模型的执行使得组件发生演变,同时生成可视化动作。使用动画单元执行可视化动作,实现数据结构演变的可视化呈现,帮助初学者理解数据结构相关程序的执行过程。实验结果表明,将该方法应用于1个数据结构演变可视化框架StructV,并应用于1个在线可视化编程实训云平台的研发,可有效降低初学者理解数据结构演变过程的难度,并提升编程实训时的程序调试效率。
Visualization Method for Data Structure Evolution in Program Debugging
Data structure carries important information regarding program execution in complicated and abstract evolution processes.To address the difficulty encountered by beginners in understanding the evolution process of data structures,this study proposes a method for visualizing the data structure evolution in program debugging.Initially,during debugging,the data structures are represented using component expressions.Subsequently,visual views are generated using configuration tables and layout functions based on component expressions.After single-step debugging,the evolution behavior of the components is determined by comparing the visual data before and after single-step debugging.A data structure evolution model is constructed using the finite state machine theory.The execution of this model causes the components to evolve while generating visual actions.This model uses animation units to perform visual actions and visualize the evolution of data structures,helping beginners understand the execution process of data structure-related programs.The experimental results of applying this method to a data structure evolution visualization framework,StructV,and to the development of an online visualization programming training cloud platform show that this process can effectively reduce the difficulty encountered by beginners in understanding data structure evolution and improve the efficiency of program debugging during programming training.

program debuggingdata structure visualizationcomponent evolution behaviorfinite state machinedata structure evolution model

苏庆、陈建成、顾国生、刘冬宁、黄剑锋

展开 >

广东工业大学计算机学院,广东广州 510006

程序调试 数据结构可视化 组件演变行为 有限状态机 数据结构演变模型

国家自然科学基金广东工业大学教育教学改革项目广东工业大学"本科教学工程"项目

62072120广工大教字[2023]51号广工大教字[2024]75号

2024

计算机工程
华东计算技术研究所 上海市计算机学会

计算机工程

CSTPCD北大核心
影响因子:0.581
ISSN:1000-3428
年,卷(期):2024.50(9)