Unlock instant, AI-driven research and patent intelligence for your innovation.

Data flow analysis method for conditional expressions in C program

A conditional expression and data flow analysis technology, applied in the direction of electrical digital data processing, software testing/debugging, instruments, etc., can solve problems such as difficult analysis

Inactive Publication Date: 2017-06-30
CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, when using flow-sensitive data flow analysis based on the control flow graph, the conditional expression corresponds to a node of the control flow graph, making it difficult to analyze it

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
  • Data flow analysis method for conditional expressions in C program
  • Data flow analysis method for conditional expressions in C program
  • Data flow analysis method for conditional expressions in C program

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040] When the method of this patent analyzes the data flow of the conditional expression, the C program under test with the conditional expression is firstly preprocessed to obtain the intermediate representation of the program such as the abstract syntax tree, the symbol table, the definition usage chain, and the control flow graph; and then Flow-sensitive data flow analysis is carried out based on control flow graph using interval operation technology. When the node of the control flow graph corresponding to the statement where the conditional expression is located is analyzed, the number of children of the root node of the abstract syntax subtree corresponding to the conditional expression is first identified, and the type of the conditional expression is judged according to the number of children; and then According to the type of the conditional expression, the interval operation technique is used to analyze the data flow of the conditional expression to obtain the value...

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 discloses a data flow analysis method for conditional expressions in a C program. According to the preprocessed to-be-tested C program, the interval arithmetic method is adopted to analyze a value taking interval of the conditional expressions in the to-be-tested program. The method includes the steps that 1, by recognizing characteristics of three expressions in the conditional expressions, conditional expressions in the C program under various conditions are summarized; 2, the interval operational method is adopted to achieve the flow sensitive data flow analysis on the conditional expressions. The data flow analysis method for the conditional expressions in the C program can achieve accurate analysis of various conditional expressions in the C program, and the value taking interval of the conditional expressions is obtained.

Description

technical field [0001] The invention relates to software static analysis technology, in particular to data flow analysis based on static analysis. Background technique [0002] Static analysis is a type of program analysis method whose purpose is to statically analyze the characteristics and attributes of software. Static analysis is to analyze the characteristics of data flow and control flow in the program, as well as abnormalities, program structure characteristics and abnormalities by scanning the source program without actually running the analyzed software. [0003] Data flow analysis is a kind of static analysis, which obtains the value status of each variable at the program point by simulating the execution of the program. In order to accurately implement data flow analysis, it is necessary to analyze various data structures, control flows, expressions, and statements in the analyzed program. The conditional expression is the only expression formed by the ternary o...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3604
Inventor 董玉坤
Owner CHINA UNIV OF PETROLEUM (EAST CHINA)