首页 | 本学科首页   官方微博 | 高级检索  
     

基于用况图的程序理解方法研究
引用本文:司海平,乔红波,虎晓红,陈宝钢,曹永生.基于用况图的程序理解方法研究[J].计算机工程与应用,2013,49(14):51-55.
作者姓名:司海平  乔红波  虎晓红  陈宝钢  曹永生
作者单位:1.河南农业大学 信息与管理科学学院,郑州 450002 2.中国农业科学院 作物科学研究所,北京 100081
摘    要:用况图从用户的角度描述了系统需求,是表达系统功能的有效方式。如果能从系统源代码中直接抽象程序的用况图,对于程序理解工作将具有很大的帮助。基于此理念,提出了基于用况图的辅助用户程序理解方法。该方法通过静态分析把源代码抽象为树型图表达结构,通过度量计算树型图中各类结点值并生成带权的树型图,根据设定的阈值对该图进行剪裁来控制程序复杂度,通过对剪裁后的树型图进行遍历形成系统的执行路径集合,抽象为最终的候选用况。在图形化工具的辅助支持下从候选用况中抽象出系统的用况图,实验分析取得良好效果。

关 键 词:静态分析  软件工程  用况图  程序理解  

Study on program comprehension method based on use case diagram
SI Haiping,QIAO Hongbo,HU Xiaohong,CHEN Baogang,CAO Yongsheng.Study on program comprehension method based on use case diagram[J].Computer Engineering and Applications,2013,49(14):51-55.
Authors:SI Haiping  QIAO Hongbo  HU Xiaohong  CHEN Baogang  CAO Yongsheng
Affiliation:1.College of Information and Management Science, Henan Agricultural University, Zhengzhou 450002, China 2.Institute of Crop Science, Chinese Academy of Agricultural Sciences, Beijing 100081, China
Abstract:Use case diagram is an effective way to express system functions from the perspective of the user, which is often used to describe system demands. If use case diagram of program can be abstracted from the system source code directly, that will be of great help for user to understand program. Based on this idea, a reverse engineering method to enhance program comprehension for user is designed in this paper. A tree graph express structure of source codes is abstracted by using the static analysis method. By setting metric value of the nodes of the tree graph, the weighted tree diagram can be generated. According to the metric it sets, the nodes of the tree graph can be clipped, which controls program complexity. Execution paths of the software, which are the candidates of use cases, are obtained by traversing the clipped tree graph. With the help of graphic tool, use case diagrams can be abstracted from the candidates of use cases, and experimental analysis has gained good effects.
Keywords:static analysis  software engineering  use case diagram  program comprehension  
点击此处可从《计算机工程与应用》浏览原始摘要信息
点击此处可从《计算机工程与应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号