适用于分布式静态检测的Java代码依赖性分析技术
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

国家电网公司科学技术项目(调度自动化软件安全漏洞与风险实验能力提升关键技术研究)


Java Code Dependency Analysis Technique for Distributed Static Detection System
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 增强出版
  • |
  • 文章评论
    摘要:

    为满足Java静态分布式检测系统对Java程序源代码解耦分包的需求,解决代码检测单节点单进程运行耗时过长问题,实现分布式检测系统单任务多节点并行运行的目的,本文提出了Java源代码文件间依赖性分析方法.该方法以生成源代码文件抽象语法树的方式抽取文件文本信息,遍历分析抽象语法树,获取文件与其他源代码文件类依赖关系,再通过定位类所在的文件方式得到文件与文件之间依赖关系.同时,以无入边顶点的带环有向图表示文件间依赖关系图,本文提出的方法基于该图进行了文件间解耦的分析.最后,通过对示例程序逐步剖析的实验以及对数个开源工具源代码解耦拆分的实验,验证了本文提出的文件间依赖性分析方法的可行性.

    Abstract:

    In order to meet the requirements of Java static distributed detection system for decoupling and subcontracting Java program source code package, Java source code file dependency analysis method was proposed. This method is part of single-task multi-node parallel-running distributed detection system which could solve the problem that it takes long time for single-task single-node single-process code detection. The method extracted the Java source code file text information by generating its abstract syntax tree. Then, the method traverses and parses the abstract syntax tree to obtain the file's dependent classes which were not declared in the file. Finally, the dependency relationship between two files was obtained by locating the files where the dependent classes were declared in. The directed cyclic graph with no incident edge vertices was proposed to represent the dependency graph among files. The Java program source code package was decoupled by analyzing the dependency graph. At last, the feasibility of the proposed Java source code file dependency analysis method is verified by two experiments. The first experiment is the step-by-step result analysis of a sample program package. The second experiment is verifying the correctness of decoupling result of several open source tools' source code packages.

    参考文献
    相似文献
    引证文献
引用本文

韩承锋,唐云善,杨维永.适用于分布式静态检测的Java代码依赖性分析技术.计算机系统应用,2019,28(3):133-139

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2018-08-31
  • 最后修改日期:2018-09-26
  • 录用日期:
  • 在线发布日期: 2019-02-22
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京海淀区中关村南四街4号 中科院软件园区 7号楼305房间,邮政编码:100190
电话:010-62661041 传真: Email:csa (a) iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号