电子学报 ›› 2017, Vol. 45 ›› Issue (5): 1052-1056.DOI: 10.3969/j.issn.0372-2112.2017.05.004

• 学术论文 • 上一篇    下一篇

基于相关主题模型的程序网络自动构建与分析

孙小兵1,2, 刘湘月1, 李斌1,2, 张伟佳1   

  1. 1. 扬州大学信息工程学院, 江苏扬州 225127;
    2. 南京大学计算机软件新技术国家重点实验室, 江苏南京 210023
  • 收稿日期:2015-12-25 修回日期:2016-05-25 出版日期:2017-05-25 发布日期:2017-05-25
  • 通讯作者: 孙小兵
  • 作者简介:刘湘月 女,1990年出生,江苏盐城人,硕士研究生,研究方向为程序理解.E-mail:495296335@qq.com
  • 基金资助:

    国家自然科学基金(No.61402396,No.61472344);江苏省教育厅自然科学基金(No.13KJB520027);南京大学计算机软件新技术国家重点实验室开放基金(No.KFKT2016B21);江苏青蓝工程

On Automatic Construction and Analysis of Program Network via Relational Topic Model

SUN Xiao-bing1,2, LIU Xiang-yue1, LI Bin1,2, ZHANG Wei-jia1   

  1. 1. School of Information Engineering, Yangzhou University, Yangzhou, Jiangsu 225127, China;
    2. State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing, Jiangsu 210023, China
  • Received:2015-12-25 Revised:2016-05-25 Online:2017-05-25 Published:2017-05-25

摘要:

程序理解的目的在于获得足够的软件系统信息,以适用于人理解的形式展现出来,辅助开发人员对软件的理解.本文通过使用相关主题模型,为软件系统类层次的代码文件建立程序网络,并可视化展示整个软件系统的相关结构和功能,辅助开发者理解整个程序代码.该技术综合考虑了软件代码中的结构性信息和内容性信息,所建立的程序网络可帮助开发者更好的理解程序的语法依赖关系和语义功能相关关系.实验验证了建立的程序网络具有较好的准确性以及可以为指定的类推荐相关类.

关键词: 程序理解, 相关主题模型, 程序网络

Abstract:

Program comprehension aims to obtain enough information in the software system to promote the comprehension of the target software.This paper proposes a novel technique,which uses relational topic model (RTM) to model code (class-level) documents in the software system into a program network.Then,the program network is visualized to help developers understand the whole software.The advantage of RTM is that it takes into account both the structural and textual information in the software system,which enables developers to fully understand the syntax dependence and semantic functional relationship in the program.The empirical results show that the program network is more accurate to model the relation among different classes,moreover,it is able to recommend relevant classes for a given class to understand a local part in the program.

Key words: program comprehension, relational topic model, program network

中图分类号: