Context Sensitive Detection Method at Source Code Level

A detection method and context technology, applied in the field of context sensitivity detection at the source code level, can solve the problems of inability to obtain calculation accuracy, without considering the degree of context sensitivity of the software, redundant calculation overhead, etc.

Active Publication Date: 2018-02-02
THE PLA INFORMATION ENG UNIV
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, before an automaton model is given for behavior modeling, the degree of context sensitivity of the software is not considered. Can not obtain the improvement of calculation accuracy, but will bring redundant calculation overhead
If there are multiple called contexts in the program, if the context-insensitive program analysis method is used, there will be an impossible path problem, which will cause the software to be attacked by malicious programs at runtime

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
  • Context Sensitive Detection Method at Source Code Level
  • Context Sensitive Detection Method at Source Code Level
  • Context Sensitive Detection Method at Source Code Level

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The context sensitivity detection method at the source code level is: make statistics on the context sensitivity of function calls in the source program, sort out the calling and called relationship of each function node by traversing the function call graph, and calculate the depth of the call graph, Information such as the number of call points, the number of context-insensitive call points, and the insensitivity rate are used to judge the function being called for accurate software behavior modeling;

[0026] A function is context-insensitive if it is called multiple times at different locations;

[0027] The function call graph is obtained between procedures.

[0028] The following is the source code of a program with insensitive function call sites:

[0029] show_char(char ch[], int num)

[0030] {

[0031] int count;

[0032] for(count=1; count<=num, count++)

[0033] putchar(ch);

[0034]}

[0035] show_insert(char ch[])

[0036] {

[0037] char cat[]="ins...

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 relates to a source code-level context sensitivity detection method. The context sensitivity detection method specifically includes: making statistics on the context sensitivity of function calls in a source program, and calling each function node by traversing the function call graph Sort out the relationship with the called, and count information such as the depth of the call graph, the number of call points, the number of context-insensitive call points, and the insensitivity rate, to judge the situation where the function is called, so as to perform accurate software behavior modeling; If a function is called multiple times at different locations, then this function is context-insensitive; the function call graph is obtained between processes; the context sensitivity detected by the detection method of the present invention is an important attribute of program analysis, It can be used to improve the analysis precision of function call context, and it is beneficial to compiler optimization and program verification.

Description

(1) Technical field [0001] The invention relates to a context sensitivity detection method, in particular to a source code level context sensitivity detection method. (2) Background technology [0002] The main purpose of software behavior modeling is to obtain the state information of the software, so as to analyze and predict the behavior of the software. In order to obtain the state information of the software efficiently, it is necessary to design a reasonable modeling method. According to different requirements and application backgrounds, researchers have proposed a variety of software behavior modeling methods: short sequence model based on system calls, automaton model considering function calls, data flow model considering function call parameters, etc. Among them, the automaton model considering the function call models the call relationship of the function within the scope of the whole function. Typical models include: non-deterministic finite state automata (NFA...

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 Patents(China)
IPC IPC(8): G06F11/36
Inventor 单征赵荣彩庞建明范超蔡洪波赵炳麟王银浩龚雪容蔡国明薛飞闫丽景贾珣徐晓燕王洋陈鹏
Owner THE PLA INFORMATION ENG UNIV
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