Method and device for detecting defects of program source file

A defect detection and source file technology, applied in software testing/debugging, platform integrity maintenance, etc., can solve the problems of high modification cost, heavy workload, inconsistency, etc., and achieve the effect of improving defect coverage and accuracy

Active Publication Date: 2019-06-07
BEIJING QIANXIN TECH +1
View PDF11 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

From another point of view, this leads to the inconsistency between the language of the detection program and the language of the source code to be detected. Since the characteristics of different languages ​​usually have large differences, the following problems usually exist in cross-language statement translation and simulation execution These problems lead to inaccurate cross-language conversion, resulting in inaccurate defect detection:
[0005] 1) When performing lexical, grammatical and semantic analysis, the work

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for detecting defects of program source file
  • Method and device for detecting defects of program source file
  • Method and device for detecting defects of program source file

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0025] figure 1 It shows that an embodiment of the present invention provides a method for defect detection of program source files, including:

[0026] S11. Perform front-end parsing and processing on the source file of the program to be tested to obtain an intermediate representation file;

[0027] S12. Perform defect analysis processing on the intermediate representation file to obtain a detection result.

[0028] Regarding steps S11 and S12, it should be noted that, in the embodiment of the present invention, the program source file is written by a programming language. A programming language is a formal language used to define computer programs. It is a standardiz...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention provides a method and a device for detecting defects of a program source file, and the method comprises the steps: analyzing a to-be-detected program source file, and obtaining a corresponding program language type; obtaining a corresponding front-end analysis program according to the program language type, wherein the front-end analysis program is a source code analysis program compiled by adopting the same language as the program language type; carrying out lexical, grammatical and semantic analysis on a to-be-tested program source file by adopting the front-end analysis program to obtain an intermediate representation file; obtaining a defect analysis program, performing source code simulation execution on the intermediate representation file by adoptingthe defect analysis program; control flow analysis and data flow analysis are completed in combination with a loading rule, defect points are determined, a source code analysis and defect detection separation technology is adopted, the defect coverage of source code detection is improved, and meanwhile the accuracy of source code defect detection is improved.

Description

technical field [0001] The invention relates to the technical field of file detection, in particular to a method and device for defect detection of program source files. Background technique [0002] Improper use of all programming languages ​​today presents some security risks and even vulnerabilities. Whether it is improper handling of polluted data due to program logic, or improper calls to APIs, it will bring risks to the entire system. [0003] The source code defect detection technology refers to analyzing and modeling the source code of the program, simulating the execution flow of the source code, checking the API calls in it, and finding out the problematic code. The usual practice is to use the source code to construct an abstract syntax tree, and simulate the association between the abstract syntax tree and its members. On this basis, the code is simulated and executed to find possible defects. [0004] For different languages, although their syntax varies grea...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/36G06F21/56
Inventor 徐亮
Owner BEIJING QIANXIN TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products