共查询到4条相似文献,搜索用时 0 毫秒
1.
Sebastian Danicic Richard W. BarracloughMark Harman John D. HowroydÁkos Kiss Michael R. Laurence 《Theoretical computer science》2011,412(49):6809-6842
There are several similar, but not identical, definitions of control dependence in the literature. These definitions are given in terms of control flow graphs which have had extra restrictions imposed (for example, end-reachability).We define two new generalisations of non-termination insensitive and non-termination sensitive control dependence called weak and strong control-closure. These are defined for all finite directed graphs, not just control flow graphs and are hence allow control dependence to be applied to a wider class of program structures than before.We investigate all previous forms of control dependence in the literature and prove that, for the restricted graphs for which each is defined, vertex sets are closed under each if and only if they are either weakly or strongly control-closed. Low polynomial-time algorithms for producing minimal weakly and strongly control-closed sets over generalised control flow graphs are given.This paper is the first to define an underlying semantics for control dependence: we define two relations between graphs called weak and strong projections, and prove that the graph induced by a set of vertices is a weak/strong projection of the original if and only if the set is weakly/strongly control-closed. Thus, all previous forms of control dependence also satisfy our semantics. Weak and strong projections, therefore, precisely capture the essence of control dependence in our generalisations and all the previous, more restricted forms. More fundamentally, these semantics can be thought of as correctness criteria for future definitions of control dependence. 相似文献
2.
Otávio Augusto Lazzarini Lemos Sushil Bajracharya Cristina Lopes 《Information and Software Technology》2011,53(4):294-306
Context
Software developers spend considerable effort implementing auxiliary functionality used by the main features of a system (e.g., compressing/decompressing files, encryption/decription of data, scaling/rotating images). With the increasing amount of open source code available on the Internet, time and effort can be saved by reusing these utilities through informal practices of code search and reuse. However, when this type of reuse is performed in an ad hoc manner, it can be tedious and error-prone: code results have to be manually inspected and integrated into the workspace.Objective
In this paper we introduce and evaluate the use of test cases as an interface for automating code search and reuse. We call our approach Test-Driven Code Search (TDCS). Test cases serve two purposes: (1) they define the behavior of the desired functionality to be searched; and (2) they test the matching results for suitability in the local context. We also describe CodeGenie, an Eclipse plugin we have developed that performs TDCS using a code search engine called Sourcerer.Method
Our evaluation consists of two studies: an applicability study with 34 different features that were searched using CodeGenie; and a performance study comparing CodeGenie, Google Code Search, and a manual approach.Results
Both studies present evidence of the applicability and good performance of TDCS in the reuse of auxiliary functionality.Conclusion
This paper presents an approach to source code search and its application to the reuse of auxiliary functionality. Our exploratory evaluation shows promising results, which motivates the use and further investigation of TDCS. 相似文献3.
An approach to code motion and hoisting, a program optimization technique, is discussed. The safety and profitability of optimization in general and hoisting in particular are analyzed. By restricting the analysis to a spanning tree imposed on the program graph, a linear algorithm is developed that provides sufficient but not necessary conditions for hoisting. 相似文献
4.
This paper presents an improved method to compute the degree of similarity between generalized trapezoidal fuzzy numbers. The proposed similarity measure contains many features of fuzzy numbers such as geometric distance, center of gravity (COG), area, perimeter, and height. The previous methods are criticized via presenting some examples. In addition, the performance of the proposed methods is compared by the existing similarity measures using twenty different sets of generalized trapezoidal fuzzy numbers. Furthermore, the proposed method is used for fuzzy risk analysis based on similarity measures. Finally, an example is introduced to illustrate the fuzzy risk analysis. 相似文献