Crosscutting concern recognizing method by combining execution model analysis and fan-in analysis

A technology of cross-cutting concerns and execution modes, applied in the field of computer software code analysis, it can solve the problems of noise in mining results, lack of consideration of changing information, low accuracy and execution efficiency, and achieve the effect of reducing the number of elements

Inactive Publication Date: 2013-09-25
海宁鼎丞智能设备有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The recognition method based on formal concept analysis relies on specific algorithms and tools when constructing concept lattices. When the number of concepts is large, the time-consuming will increase exponentially, and there is no good construction tool for concept lattices at present.
The identifier analysis method relies on good naming conventions, but different programmers will define variable names according to their own preferences during the software development process, resulting in a large amount of noise in the recognition results, which increases the workload of manual analysis
The hierarchical clustering method directly analyzes the program code without considering the change information during the dynamic operation of the system, and cannot avoid problems caused by polymorphism
The identification method based on repeated execution patterns requires the analysis of all executed methods, regardless of whether these methods may become cross-cutting concerns, so that the mining results contain some noise, and the accuracy and execution efficiency are low.
In addition, when refactoring based on the AOSD method, it is necessary to weave cross-cutting concerns and business components by specifying the injection location or timing, but the above methods do not consider the impact of the statement before and after the method on the method itself, resulting in the identified part Cross-cutting concerns cannot be weaved effectively because there is no suitable injection location or timing

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

Examples

Experimental program
Comparison scheme
Effect test

specific Embodiment approach

[0031] The specific implementation of the method for identifying cross-cutting concerns by combining execution mode analysis and fan-in analysis provided by the present invention is as follows:

[0032] (1) Read in the program code package to be identified.

[0033] (2) Obtain the execution mode set of the method in the program.

[0034] Select the use cases that cover the core business functions of the program, and collect the execution traces obtained when executing the use cases. While recording the execution track, filter out pre-defined methods with fixed structures that cannot become cross-cutting concerns (such as get*(), set*(), toString(), etc.), and remove all isolated method points Methods. other ways to keep Every time it is called, its fan-in value will be increased by 1 (consecutive calls of the same method in the loop will only be recorded once). like The fan-in degree is greater than the preset threshold , place it in the set of candidate crosscutting co...

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 crosscutting concern recognizing method by combining an execution model analysis and a fan-in analysis. The traditional method has lower precision and execution efficiency. The method provided by the invention comprises the following steps of: firstly, arranging an independent general-purpose computer and reading a program code package to be recognized through an external device; then selecting a use case which covers core business functions of the program and collecting a program actual execution track for executing the use case; meanwhile, obtaining a method set which exceeds a fan-in threshold value and expanding a method execution model set; then executing a repetitive restriction detection to filter different execution models; executing a crosscutting restriction detection to obtain a crosscutting method set which exceeds a crosscutting threshold value; finally, combining the obtained method sets to obtain a final crosscutting concern set and outputting the final crosscutting concern set. The method provided by the invention can effectively reduce the element number of the execution model set and improves the execution efficiency and precision of recognition on basis of guaranteeing a recall ratio.

Description

technical field [0001] The invention belongs to the field of computer software code analysis, and specifically relates to how to apply a fan-in analysis method to identify cross-cutting concerns existing in the code while analyzing the code execution mode. Background technique [0002] In the process of object-oriented software development, real entities in the actual application domain are mapped to classes with a hierarchical structure in the software system. However, due to the limitations of object-oriented programming technology itself, not every requirement can correspond to a complete module unit (class), so code tangling and scattering will inevitably occur. Code interleaving means that a single module implements multiple functions; code spreading means that the implementation code of the same function is distributed in different modules of the system. The concerns implemented by these interwoven or interspersed codes are called crosscutting concerns. If cross-cutt...

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 海宁鼎丞智能设备有限公司
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