A metric model based on llvm intermediate representation program slicing

A technology of program slicing and intermediate representation, which is applied in the field of computer programs, can solve problems such as poor versatility, and achieve the effects of improving versatility, accurate measurement results, and fine-grained analysis

Active Publication Date: 2020-05-19
NANJING UNIV OF POSTS & TELECOMM
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The object of the slice is generally a program written in a specific language such as C, C++, Python, etc., and the versatility is not strong.

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
  • A metric model based on llvm intermediate representation program slicing
  • A metric model based on llvm intermediate representation program slicing

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0051] The present invention will be described in further detail below in conjunction with the accompanying drawings.

[0052] figure 1 It is a flowchart of a construction method of an embodiment of a metric model based on LLVM intermediate representation program slices in the present invention. Such as figure 1 Shown, this embodiment method comprises the following steps:

[0053] Step (1) convert the source program into the corresponding LLVM IR language through the command line of LLVM;

[0054] Step (2) constructing a system dependency graph with LLVM IR to obtain corresponding program slices;

[0055] Step (3) Obtain the instruction corresponding to the output variable of the source program and the information of the instruction set, program operator and operand, that is: obtain the module of each module in the program according to the result of program slicing and the LLVM IR statement obtained from the conversion of the source program Size, the number of output varia...

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 measurement model based on LLVM intermediate representation program slices. According to the measurement model, a source program is converted into a corresponding LLVM IR language through an LLVM command line; a program system dependence graph is constructed, and an LLVM IR statement of the program is sliced; the size of each module and the number of output variables in the program are obtained according to the program slicing result and the LLVM IR statement obtained through source program conversion, and a public slice set of all the variables is obtained according to the size of a maximum slice set and the size of a minimum slice set among slice sets of all the output variables of all the measurement modules; the value obtained in the last step is substituted into a measurement function, LLVM IR measurement of the function is completed, and then Halstead measurement of the program is calculated; and measurement values with the same effect of all measurement results of the program are removed first, a complexity measurement function is constructed, the complexity of all the modules of the program is calculated, ordering is performed according to the complexity of all the modules, development resources can be reasonably distributed for software development or testing according to the complexity of all the modules, and error detection is performed. Through the measurement model, the universality and measurement precision of the program slices are effectively improved.

Description

technical field [0001] The invention relates to a method related to program slicing and software measurement, provides a method for constructing a metric model based on LLVM intermediate representation program slicing, and belongs to the technical field of computer programs. Background technique [0002] With the rapid development of the computer industry, a large number of software products have been applied to social life. While the number and scale of software systems continue to grow, the costs of software development, problems in testing, and software maintenance also continue to increase. Many traditional software analysis methods can no longer meet the needs of existing software analysis, and new technologies and methods need to be found to help solve this problem. As a result, program analysis has become a very important part of the software field. [0003] Since M.weiser proposed program slicing in his doctoral dissertation in 1979, the theory and application deve...

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): G06F8/35G06F8/40
CPCG06F8/35G06F8/40
Inventor 张迎周闫丽徐晨晨吴寄语
Owner NANJING UNIV OF POSTS & TELECOMM
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