期刊文献+

一种基于图数据库的代码结构解析与搜索方法 被引量:8

A Graph Database Based Method for Parsing and Searching Code Structure
下载PDF
导出
摘要 软件复用是在软件开发中避免重复劳动的解决方案.在复用一个已有的软件项目时,软件开发人员通常需要理解某些代码元素以及其间的关联关系,称之为代码结构.软件开发人员一般通过浏览软件源代码的方式理解代码结构.由于源代码往往规模较大且结构复杂,理解代码结构通常会耗费大量的时间与精力.因此,将软件开发人员想要理解的代码结构自动、清晰地展示出来是很有帮助的.提出一种基于图数据库的代码结构解析与搜索方法以实现这一目的.这一方法可对软件的代码结构进行解析,并在图数据库中对其进行有效的组织和管理.搜索时,软件开发人员输入自然语言查询语句,该方法中的搜索机制会分析查询语句,并从图数据库中截取出与其相对应的代码结构进行展示.该方法具有高度的可扩展性:不同粒度的结点与多样化的关联关系可以容易地存储进图数据库中,且面向不同搜索目的的代码结构搜索算法亦可以容易地集成进搜索机制中.这一方法已在相应的工具中得到了实现,其有效性在一个商业案例研究中得到了验证. Software reuse is a solution to reduce duplication of effort in software development.When reusing an existing software project,software developers usually need to understand how code elements in it are worked and their correlation,which is called code structure.Software developers usually navigate among source code files to understand code structure.This task could be timeconsuming and difficult,since source code of a software project is usually large and complex.Therefore,it is essential to demonstrate code structure in an automatic way that software developers can understand it clearly.For this purpose,this paper introduces a graph database based method for parsing and searching code structure.Code structure is extracted from source code files,and wellorganized as a labeled and directed graph in graph database.Software developers input natural language queries.A search mechanism analyzes each of these queries,searches the whole code structure and determines which part of the code structure should be demonstrated.This method is of high extensibility:code elements at different granularity and various relationship types among them can be easily stored into the graph database,and analyzing algorithms for different search purposes can be easily integrated into the search mechanism.A tool is implemented based on this method.Experiment shows that with the help of this tool,the time software developers spending on understanding code structure reduces by 17%,which validates that our method does help improving the efficiency of software reuse.An industrial case study has been showed on how software developers get help from this method.
出处 《计算机研究与发展》 EI CSCD 北大核心 2016年第3期531-540,共10页 Journal of Computer Research and Development
基金 国家"八六三"高技术研究发展计划基金项目(2013AA01A605) 国家自然科学基金项目(61472007)~~
关键词 代码结构 图数据库 自然语言查询 搜索机制 软件复用 code structure graph database natural language query search mechanism software reuse
  • 相关文献

参考文献3

二级参考文献68

  • 1杨芙清,邵维忠,梅宏.面向对象的CASE环境青岛Ⅱ型系统的设计与实现[J].中国科学(A辑),1995,25(5):533-542. 被引量:21
  • 2杨芙清,第六次全国软件工程学术会议论文集,1996年,5页
  • 3杨芙清,中国科学.A,1995年,5页
  • 4Microsoft Academic Search. Explore researchers' cooperating network.[2009-12-01 J.[2014-11-20]. http://academic. research. microsoft. com/VisualExplorer.
  • 5Brynielsson J, Hogberg J, Kaati L, et al. Detecting social positions using simulation[C]//Proc of 2010 Int Conf on Advances in Social Networks Analysis and Mining (ASONAM). Alamitos, CA: IEEE, 2010: 48-55.
  • 6Palantir. Products Built for A Purpose.[2004-01-01].[2014-11-20]. https://www.palantir.com/.
  • 7Malewicz G, Austern M H, Bik A J C, et al, Pregel , A system for large-scale graph processing[C]//Proc of the 2010 ACM SIGMOD Int Conf on Management of Data. New York: ACM, 2010: 135-146.
  • 8Sarwat M, Elnikety S, He Y, et al. Horton: Online query execution engine for large distributed graphs[C]//Proc of the 28th IEEE Int Conf on Data Engineering (ICDE J. Alamitos, CA: IEEE, 2012: 1289-1292.
  • 9Low y, Gonzalez J, Kyrola A, et al. Graphlab , A new framework for parallel machine learning[C]//Proc of the 26th Conf on Uncertainty in Artificial Intelligence (UA]). Oregon, USA: AUAI, 2010.
  • 10Michael R G, David S J. Computers and intractability: A guide to the theory of NP-completeness[R]. New York: W. H. Freeman Company, 1979.

共引文献551

同被引文献27

引证文献8

二级引证文献21

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部