Makefile-based code static analysis method and device

A static analysis and code analysis technology, applied in the computer field, can solve problems such as multi-time and manpower

Active Publication Date: 2018-03-23
GUANGZHOU SHIYUAN ELECTRONICS CO LTD
View PDF9 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the prior art, it is necessary to manually determine the dependencies of the source code files during the static analysis of the program, and the

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
  • Makefile-based code static analysis method and device
  • Makefile-based code static analysis method and device
  • Makefile-based code static analysis method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] Developing a software system requires writing a lot of source codes, and it is inevitable that there will be some low-level but not easy-to-find errors in these source codes. In order to ensure the specification of the code in development, try to avoid low-level mistakes. We need to check the source code from time to time during the development process. Static analysis is a common inspection method: use static analysis tools such as cppcheck to scan the source code through lexical analysis, syntax analysis, control flow analysis and other technologies without executing the source code to verify whether the source code has Standardization, security, reliability, maintainability.

[0037] Static analysis mainly has the following characteristics: the program is not actually executed, the execution speed is fast, and the rate of false positives and false negatives is high.

[0038] Among them, one of the reasons for the high rate of false positives and false negatives is ...

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 invention provides a Makefile-based code static analysis method and device. According to the method, first, a to-be-analyzed source code file is determined; second, a Makefile system is called togenerate dependency information of the source code file; and last, the source code file and the dependency information thereof are input into a static analysis program to obtain a static analysis result of the source code file. Furthermore, automatic execution of compiling and static analysis can be realized by use of a script writing mode. Compared with the prior art, it is no longer needed to manually determine the dependency of the source code file, and therefore the accuracy of a static analysis tool report result is improved while much time and labor are saved.

Description

technical field [0001] The present application relates to the computer field, in particular to a Makefile-based code static analysis method and device. Background technique [0002] Program Static Analysis (Program Static Analysis) refers to a code that scans the program code through lexical analysis, syntax analysis, control flow, data flow analysis and other technologies to verify whether the code meets the standard without executing the source code file. analytical skills. [0003] File dependencies refer to the functions, data structures, variables, etc. in other files that a source code file needs to reference. When a program is statically analyzed, it is necessary to obtain the dependencies of the source code files in order to complete the analysis of the source code files more comprehensively. , otherwise there will be false positives and false negatives. [0004] In the prior art, the static analysis of the program needs to manually determine the dependencies of th...

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): G06F8/41
CPCG06F8/433
Inventor 徐长辉王凡陈铭郑侠松罗杰
Owner GUANGZHOU SHIYUAN ELECTRONICS CO LTD
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