###
计算机系统应用英文版:2019,28(3):133-139
本文二维码信息
码上扫一扫!
适用于分布式静态检测的Java代码依赖性分析技术
(南京南瑞信息通信科技有限公司, 南京 210003)
Java Code Dependency Analysis Technique for Distributed Static Detection System
(NARI Group Corporation Information & Communication Technology Company, Nanjing 210003, China)
摘要
图/表
参考文献
相似文献
本文已被:浏览 1625次   下载 1949
Received:August 31, 2018    Revised:September 26, 2018
中文摘要: 为满足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
HAN Cheng-Feng,TANG Yun-Shan,YANG Wei-Yong.Java Code Dependency Analysis Technique for Distributed Static Detection System.COMPUTER SYSTEMS APPLICATIONS,2019,28(3):133-139