| The dependence cluster is the largest set of interdependent program components,where any change in one point within the cluster can trigger a chain reaction in other components.In practical production environments,dependence cluster detection is of great significance for software understanding,testing,and maintenance.However,traditional dependence cluster detection is based on the system dependency graph(SDG),which has a complex construction process and occupies a large amount of time and space.Furthermore,current dependence cluster detection is based on static analysis and does not consider the actual paths and conditions of program execution,nor does it utilize dynamic analysis for dependence cluster detection.To address the issue of the large time and space consumption associated with constructing SDG,this paper proposes a static dependence cluster detection method based on high-order functions.This method constructs a function summary in the form of a high-order function for each process,where the data dependencies of formal parameters and global variables within the process are used as summary parameters to initialize the dependence information of corresponding variables.By instantiating the summary of the high-order function at the call site,the dependence of the called process can be transmitted through the summary parameters,thereby avoiding the construction of a complex SDG.In addition,this paper also applies an optimization strategy based on adaptive computing,which can effectively reduce redundant calculations caused by recursive structures and improve detection efficiency.Meanwhile,to address the issue of not considering the actual paths and conditions of program execution,this paper proposes a dynamic dependence cluster detection method based on high-order functions.This method uses the high-order function summary to calculate dynamic dependence relationships and obtain the dynamic dependence information among processes.Furthermore,this paper applies adaptive computing to the situation where different inputs of the same program are analyzed,which can effectively reduce the amount of calculation required for analyzing different inputs and further improve detection efficiency.To verify the effectiveness of the dependence cluster detection method based on high-order functions and adaptive computing,this paper selects engineering projects and benchmark of different scales and domains for static and dynamic dependence cluster detection,respectively.The relevant experiments demonstrate that the proposed method based on high-order functions can effectively improve detection efficiency and reduce space consumption compared to traditional detection methods based on dependence graphs.The optimization strategy of adaptive computing for dependence cluster detection can further reduce redundant calculations in the high-order function detection method and improve detection efficiency. |