Wei Zhao, Lu Zhang, Dan Hao, Hong Mei and Jiasu Sun. Institute of Software, School of Electronics Engineering and Computer Science, Peking University,.
Alternative Scalable Algorithms for Lattice-Based Feature Location Wei Zhao, Lu Zhang, Dan Hao, Hong Mei and Jiasu Sun Institute of Software, School of Electronics Engineering and Computer Science, Peking University, Beijing, 100871, P. R. China {zhaow,zhanglu,haod,meih,sjs}@sei.pku.edu.cn Abstract Considering the scalability of using formal concept analysis to locate features in source code, we present a set of alternative straightforward algorithms to achieve the same objectives. A preliminary experiment indicates that the alternative algorithms are more scalable to deal with the large numbers of data to some extent.
1. Motivation In [2], an approach to feature location using formal concept analysis is proposed. The approach employs formal concept analysis [3] to analyze the binary relations between test scenarios (which invoke features) and computational units to construct a concept lattice visually. Through interpreting the concept lattice manually and mentally, the implementation relationships between features and computational units are acquired. A main contribution of this approach is that the concept lattice constructed through concept analysis visualizes the implementation relationships as a whole. However, when formal concept analysis is applied to exploration of a large number of data, the issues of complexity and scalability become crucial, especially for visualization rather internal computation [1]. Actually, all implementation relationship implicitly held in the concept lattice can be acquired directly from the binary relations automatically without the latticebased visualization and consecutive manual efforts. Due to eliminating the computation and construction of the concept lattice, the direct computation can improve the scalability to some extent in the case of large numbers of data.
relation between S and U is defined in like manner. Fig. 1 shows the example of these two relations, where “×” denotes the invoking relationship. s1 s2 s3
f1 × ×
f2
f3 ×
u1 ×
u2
u3
u4 × ×
u5
u6 ×
× × × × × × × × Fig.1 Example invocation relations
u7 × × ×
From these two relations, we can automatically acquire either implementation relationships between scenarios and computational units or features and computational units through the direct computation. Two representative implementation relationships are used to illustrate the alternative algorithms as follows. Given a scenario si, all its specific computational units can be acquired as: {u | R su ( s i , u ) (s S {s i })(Rsu ( s, u ))} . Given a feature fi, all the specific computational units for it can be acquired as: U- {u | R sf ( s, f i ) R su ( s, u )} .
The corresponding alternative algorithms are quite simple and straightforward according the above expression. All the other implementation relationships acquired in [2] from the concept lattice can be acquired by the similar straightforward way illustrated above.
3. Conclusion We performed an experiment to investigate the scalability of the lattice-based approach and the alternative straightforward way. The preliminary experimental data indicates that the alternative algorithms are more scalable to deal with the large numbers of data to locate features.
2. Alternative Scalable Algorithms The alternative scalable algorithms are based on two invocation relations, Rsf S×F and Rsu S×U (where S denotes a set of scenarios; F denotes a set of features; U denotes a set of computational units.), and the direct relation calculation on them. If the execution of a test scenario invokes a feature, there is an invocation relationship between this scenario and this feature. The
References [1] R. Cole and P. W. Eklund, “Scalability in Formal Concept [2] [3]
Analysis,” Computational Intelligence, pp.11-27, Volume 15, Number 1, 1999 T. Eisenbarth, R. Koschke, and D. Simon, “Locating Features in Source Code,” IEEE Transactions on Software Engineering, 29(3), pp 210-224, March, 2003. B. Ganter and R. Wille, Formal Concept AnalysisMathematical Foundations. Springer, 1999.
Proceedings of the 20th IEEE International Conference on Software Maintenance (ICSM’04) 1063-6773/04 $20.00 © 2004 IEEE