期刊文献+

开源代码仓库增量分析方法 被引量:1

Incremental analysis of open source repositories
原文传递
导出
摘要 代码溯源是开源软件复用中的常见实践,溯源过程依赖于高效的程序分析方法支撑。现有的程序分析方法主要识别完整的语法结构,分析时间依赖于整体代码规模,缺乏增量分析能力,难以满足大规模开源代码仓库的高效分析需求。针对开源代码仓库中相邻快照间高度相似的特点,该文提出了一种有效的增量分析方法,仅对快照中变更的代码进行分析,从而有效减少分析规模。首先解析文件快照获得历次代码的修改内容,其次设计映射算法将上述修改内容映射成完整的、可分析的函数,最后将上述函数转化为指纹进行函数比对。与传统分析方法相比,该文方法有效减少了开源代码仓库的分析规模,加快了函数比对速度,能更好地支撑代码溯源等开源软件复用需求。 Code traceability is a common practice for reusing open source software which relies heavily on efficient code analysis methods.Existing methods mainly identify complete grammatical structures with the analysis time depending on the total code size,so they lack the ability to do incremental analyses and cannot be used to analyze large open source code repositories.An incremental analysis method was developed here to analyze only the changed parts in code repositories based on the similarity between adjacent snapshots to effectively reduce the analysis scale. The method first parses snapshots to retrieve the modified content between snapshots and then maps these modifications into complete,analyzable functions.These functions are then converted to fingerprints for comparisons.This method significantly reduces the scale of the open source code repositories compared with traditional analysis methods to speed up function comparisons for better traces of the origin of open source codes.
作者 许福 杨湛宇 陈志泊 孙钰 张海燕 XU Fu;YANG Zhanyu;CHEN Zhibo;SUN Yu;ZHANG Haiyan(School of Information Science and Technology,Beijing Forestry University,Beijing 100083,China)
出处 《清华大学学报(自然科学版)》 EI CAS CSCD 北大核心 2018年第7期630-638,共9页 Journal of Tsinghua University(Science and Technology)
基金 国家自然科学基金资助项目(61772078) 北京市科委重大科技专项(D171100001817003)
关键词 开源代码 程序分析 增量分析 代码仓库 open source program analysis incremental parsing code repository
  • 相关文献

参考文献1

二级参考文献1

共引文献25

同被引文献4

引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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