计算机科学 ›› 2021, Vol. 48 ›› Issue (5): 68-74.doi: 10.11896/jsjkx.200100133

• 计算机软件* 上一篇    下一篇

程序调试中的树形结构演变可视化模型

苏庆, 黎智洲, 刘添添, 吴伟民, 黄剑锋, 李小妹   

  1. 广东工业大学计算机学院 广州510006
  • 收稿日期:2020-01-21 修回日期:2020-07-29 出版日期:2021-05-15 发布日期:2021-05-09
  • 通讯作者: 刘添添(ttliu@gdut.edu.cn)
  • 基金资助:
    国家自然科学基金(618002072);广东省自然科学基金(2018A030313389);广东省高等教育教学改革项目(SJJG20191216)

Tree Structure Evaluation Visualization Model for Program Debugging

SU Qing, LI Zhi-zhou, LIU Tian-tian, WU Wei-min, HUANG Jian-feng, LI Xiao-mei   

  1. School of Computers,Guangdong University of Technology,Guangzhou 510006,China
  • Received:2020-01-21 Revised:2020-07-29 Online:2021-05-15 Published:2021-05-09
  • About author:SU Qing,born in 1979,Ph.D,associate professor,is a member of China Computer Federation.His main research interests include visual computing and so on.(suqing@gdut.edu.cn)
    LIU Tian-tian,born in 1979,M.S,lecturer.Her main research interests include visual computing and so on.
  • Supported by:
    National Natural Science Foundation of China(618002072),Natural Science Foundation of Guangdong Province,China(2018A030313389) and Higher Education Teaching Reform Project Foundation of Guangdong Province,China(SJJG20191216).

摘要: 树形结构作为一种非线性数据结构,在程序执行过程中的演变过程较为抽象,尤其是在对其进行加工型操作时,容易发生内存泄漏。针对编程初学者难以掌握树形结构的逻辑演变过程,以及在程序中发生内存泄漏错误时调试较为困难的问题,文中提出了一种对程序调试过程中树形结构的演变过程进行可视化呈现的处理模型TEVM(Tree Evaluation Visualization Model)。针对单个可视化程序在调试步骤前和调试步骤后的两个树形结构,设计了一种将树形结构转换为线性表示的结构对比算法,得出了它们的包括泄漏树在内的结构差异;同时设计了一种树形结构布局方法,并计算它们的布局差异。根据结构差异和布局差异生成可视化演变序列,调用绘图引擎对该序列进行解析和执行,从而完成对树形结构及其演变过程的动态、平滑和直观的可视化呈现,帮助编程初学者快速理解树形结构相关程序的执行过程,提升调试效率。将TEVM模型集成于一个面向编程实训教学的集成开发环境原型 Web AnyviewC中,取得了较好的应用效果。

关键词: 程序调试过程, 树形结构, 树形结构演变可视化模型, 数据结构可视化, 泄漏树

Abstract: Tree structure is a nonlinear data structure,whose evolution process is abstract in the program execution.Memory leak happens while applying modification-like operation on it.It is an open challenge for programming beginner to control the evolution of tree structure in the program debugging procedure,especially to debug the error when memory leakage happens.To address this issue,this paper proposes a tree evaluation visualization model(TEVM) to visualize the evolution procedure of tree structure.Two tree structures are obtained after executing a visual debugging step.This paper designs a structure comparison algorithm to obtain their structural difference including leaked tree by transforming tree structure into linear representation.It also designs a tree layout method and computes their positional difference.A visual evaluation sequence is generated with thesestructural diffe-rence and positional difference.At last,it applys the drawing engine to interpret and execute actions of this sequence to visualize the tree structure evaluation dynamically,smoothly and intuitively.The visualization of tree structure helps programming beginner to understand the execution of program relating to tree structure and improves the efficiency of program debugging.TEVM model is applied in the Web AnyviewC,which is a prototype of the integrated development environment for programming trai-ning,and gains an excellent application effect.

Key words: Data structure visualization, Leaked tree, Program debugging process, Tree struct evaluation visualization model, Tree structure

中图分类号: 

  • TP311
[1]SU Q,TANG Y H,ZENG Y A,et al.Research on Real-TimeIdentification and Visualization Layout Algorithm for Single Linklist Structure [J].Computer Engineering and Applications,2019,55(16):240-245.
[2]WU W M,LI X M,LIU T T,et al.Data Structure [M].Beijing:Higher Education Press,2017:126-130.
[3]WANG G,NAKANISHI T,FUKUDA A.2-D Layout for Tree Visualization:a survey[C]//MATEC Web of Conferences.EDP Sciences,2016,56:1-12.
[4]BACHER I,MAC N B,KELLEHER J D.On using Tree Visualisation Techniques to support Source Code comprehension[C]//2016 IEEE Working Conference on Software Visualization (VISSOFT).IEEE,2016:91-95.
[5]YUAN T.System design tree compiler [J].Information Technology and Network Security,2014,33(20):10-11,19.
[6]HEER J,ROBERTSON G.Animated transitions in statisticaldata graphics[J].IEEE Transactions on Visualization and Computer Graphics,2007,13(6):1240-1247.
[7]PLAISANT C,GROSJEAN J,BEDERSON B B.Spacetree:Supporting exploration in large node link tree,design evolution and empirical evaluation[C]//IEEE Symposium on Information Visualization,2002.IEEE,2002:57-64.
[8]SHANMUGASUNDARAM M,IRANI P,GUTWIN C.Cansmooth view transitions facilitate perceptual constancy in node-link diagrams?[C]//Proceedings of Graphics Interface 2007.2007:71-78.
[9]GUILMAINE D,VIAU C,MCGUFFIN M J.Hierarchically animated transitions in visualizations of tree structures[C]//Proceedings of the International Working Conference on Advanced Visual Interfaces.2012:514-521.
[10]SU Q,ZHANG S Y,HUANG J F,et al.Design and application of online visual programming cloud platform[J].Experimental Technology and Management,2020(7):191-194,203.
[11]CARD S K,MACKINLAY J D,SHNEIDERMAN B.Readings in Information Visualization:Using Vision to Think[M].San Francisco,California:Morgan Kaufmann,1999:233-267.
[12]BOSTOCK M,OGIEVETSKY V,HEER J.D'data-driven documents[J].IEEE Transactions on Visualization and Computer Graphics,2011,17(12):2301-2309.
[13]BILLE P.A survey on tree edit distance and related problems[J].Theoretical Computer Science,2005,337(1/2/3):217-239.
[14]DE LUCA F,HOSSAIN I,KOBOUROV S,et al.Multi-leveltree based approach for interactive graph visualization with semantic zoom[J].arXiv:1906.05996,2019.
[15]WARD M O,GRINSTEIN G,KEIM D.Interactive data visualization:foundations,techniques,and applications[M].Natick,Massachusetts:AK Peters/CRC Press,2015:120-132.
[1] 徐涌鑫, 赵俊峰, 王亚沙, 谢冰, 杨恺.
时序知识图谱表示学习
Temporal Knowledge Graph Representation Learning
计算机科学, 2022, 49(9): 162-171. https://doi.org/10.11896/jsjkx.220500204
[2] 王子凯, 朱健, 张伯钧, 胡凯.
区块链与智能合约并行方法研究与实现
Research and Implementation of Parallel Method in Blockchain and Smart Contract
计算机科学, 2022, 49(9): 312-317. https://doi.org/10.11896/jsjkx.210800102
[3] 曾志贤, 曹建军, 翁年凤, 蒋国权, 徐滨.
基于注意力机制的细粒度语义关联视频-文本跨模态实体分辨
Fine-grained Semantic Association Video-Text Cross-modal Entity Resolution Based on Attention Mechanism
计算机科学, 2022, 49(7): 106-112. https://doi.org/10.11896/jsjkx.210500224
[4] 熊罗庚, 郑尚, 邹海涛, 于化龙, 高尚.
融合双向门控循环单元和注意力机制的软件自承认技术债识别方法
Software Self-admitted Technical Debt Identification with Bidirectional Gate Recurrent Unit and Attention Mechanism
计算机科学, 2022, 49(7): 212-219. https://doi.org/10.11896/jsjkx.210500075
[5] 潘志勇, 程宝雷, 樊建席, 卞庆荣.
数据中心网络BCDC上的顶点独立生成树构造算法
Algorithm to Construct Node-independent Spanning Trees in Data Center Network BCDC
计算机科学, 2022, 49(7): 287-296. https://doi.org/10.11896/jsjkx.210500170
[6] 李瑭, 秦小麟, 迟贺宇, 费珂.
面向多无人系统的安全协同模型
Secure Coordination Model for Multiple Unmanned Systems
计算机科学, 2022, 49(7): 332-339. https://doi.org/10.11896/jsjkx.210600107
[7] 黄觉, 周春来.
基于本地化差分隐私的频率特征提取
Frequency Feature Extraction Based on Localized Differential Privacy
计算机科学, 2022, 49(7): 350-356. https://doi.org/10.11896/jsjkx.210900229
[8] 叶跃进, 李芳, 陈德训, 郭恒, 陈鑫.
基于国产众核架构的非结构网格分区块重构预处理算法研究
Study on Preprocessing Algorithm for Partition Reconnection of Unstructured-grid Based on Domestic Many-core Architecture
计算机科学, 2022, 49(6): 73-80. https://doi.org/10.11896/jsjkx.210900045
[9] 赵静文, 付岩, 吴艳霞, 陈俊文, 冯云, 董继斌, 刘嘉琪.
多线程数据竞争检测技术研究综述
Survey on Multithreaded Data Race Detection Techniques
计算机科学, 2022, 49(6): 89-98. https://doi.org/10.11896/jsjkx.210700187
[10] 陈鑫, 李芳, 丁海昕, 孙唯哲, 刘鑫, 陈德训, 叶跃进, 何香.
面向国产异构众核架构的CFD非结构网格计算并行优化方法
Parallel Optimization Method of Unstructured-grid Computing in CFD for DomesticHeterogeneous Many-core Architecture
计算机科学, 2022, 49(6): 99-107. https://doi.org/10.11896/jsjkx.210400157
[11] 王毅, 李政浩, 陈星.
基于用户场景的Android 应用服务推荐方法
Recommendation of Android Application Services via User Scenarios
计算机科学, 2022, 49(6A): 267-271. https://doi.org/10.11896/jsjkx.210700123
[12] 傅丽玉, 陆歌皓, 吴义明, 罗娅玲.
区块链技术的研究及其发展综述
Overview of Research and Development of Blockchain Technology
计算机科学, 2022, 49(6A): 447-461. https://doi.org/10.11896/jsjkx.210600214
[13] 蒋成满, 华保健, 樊淇梁, 朱洪军, 徐波, 潘志中.
Python虚拟机本地代码的安全性实证研究
Empirical Security Study of Native Code in Python Virtual Machines
计算机科学, 2022, 49(6A): 474-479. https://doi.org/10.11896/jsjkx.210600200
[14] 袁昊男, 王瑞锦, 郑博文, 吴邦彦.
基于Fabric的电子病历跨链可信共享系统设计与实现
Design and Implementation of Cross-chain Trusted EMR Sharing System Based on Fabric
计算机科学, 2022, 49(6A): 490-495. https://doi.org/10.11896/jsjkx.210500063
[15] 陈钧吾, 余华山.
面向无尺度图的Δ-stepping算法改进策略
Strategies for Improving Δ-stepping Algorithm on Scale-free Graphs
计算机科学, 2022, 49(6A): 594-600. https://doi.org/10.11896/jsjkx.210400062
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!