We propose a novel type inference technique for Python programs. Type inference is difficult for Python programs due to their heavy dependence on external APIs and the dynamic language features. We observe that Python source code often contains a lot of type hints such as attribute accesses and variable names. However, such type hints are not reliable. We hence propose to use probabilistic inference to allow the beliefs of individual type hints to be propagated, aggregated, and eventually converge on probabilities of variable types. Our results show that our technique substantially outperforms a state-of-the-art Python type inference engine based on abstract interpretation. CCS Concepts •Software and its engineering → Automated static analysis; •Mathematics of computing → Max marginal computation;
Many feature subset selection (FSS) algorithms have been proposed, but not
all of them are appropriate for a given feature selection problem. At the same
time, so far there is rarely a good way to choose appropriate FSS algorithms
for the problem at hand. Thus, FSS algorithm automatic recommendation is very
important and practically useful. In this paper, a meta learning based FSS
algorithm automatic recommendation method is presented. The proposed method
first identifies the data sets that are most similar to the one at hand by the
k-nearest neighbor classification algorithm, and the distances among these data
sets are calculated based on the commonly-used data set characteristics. Then,
it ranks all the candidate FSS algorithms according to their performance on
these similar data sets, and chooses the algorithms with best performance as
the appropriate ones. The performance of the candidate FSS algorithms is
evaluated by a multi-criteria metric that takes into account not only the
classification accuracy over the selected features, but also the runtime of
feature selection and the number of selected features. The proposed
recommendation method is extensively tested on 115 real world data sets with 22
well-known and frequently-used different FSS algorithms for five representative
classifiers. The results show the effectiveness of our proposed FSS algorithm
recommendation method
Abstract. Cohesion is an internal software attribute representing the degree to which the components are bound together within a software module. Cohesion is considered to be a desirable goal in software development, leading to better values for external attributes such as maintainability, reusability, and reliability. Aspect-oriented software development (AOSD) is a new technique to support separation of concerns in software development. AOSD introduces a new kind of component called aspect which is like a class, also consisting of attributes (aspect instance variables) and those modules such as advice, introduction, pointcuts, and methods. The cohesion for such an aspect is therefore mainly about how tightly the attributes and modules of aspects cohere. To test this hypothesis, cohesion measures for aspects are needed. In this paper, we propose an approach to assessing the aspect cohesion based on dependence analysis. To this end, we present various types of dependencies between attributes and/or modules in an aspect, and the aspect dependence graph (ADG) to explicitly represent these dependencies. Based on the ADG, we formally define some aspect cohesion measures. We also discuss the properties of these dependencies, and according to these properties, we prove that these measures satisfy the properties that a good measure should have.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.