Delving source code with formal concept analysis

  • Authors:
  • Kim Mens;Tom Tourwé

  • Affiliations:
  • Département d'Ingénierie Informatique (INGI), Université catholique de Louvain (UCL), Place Sainte Barbe 2, B-1348 Louvain-la-Neuve, Belgium;Centrum voor Wiskunde en Informatica (CWI), P.O. Box 94079, NL-1090 GB Amsterdam, The Netherlands

  • Venue:
  • Computer Languages, Systems and Structures
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

Getting an initial understanding of the structure of a software system, whether it is for software maintenance, evolution or reengineering purposes, is a nontrivial task. We propose a lightweight approach to delve a system's source code automatically and efficiently for relevant concepts of interest: what concerns are addressed in the code, what patterns, coding idioms and conventions have been adopted, and where and how are they implemented. We use formal concept analysis to do the actual source-code mining, and then filter, classify and combine the results to present them in a format that is more convenient to a software engineer. We applied a prototype tool that implements this approach to several small to medium-sized Smalltalk applications. For each of these, the tool uncovered several design pattern instances, coding and naming conventions, refactoring opportunities and important domain concepts. Although the tool and approach can still be improved in many ways, the tool does already provides useful results when trying to get an initial understanding of a system. The obtained results also illustrate the relevance and feasibility of using formal concept analysis as an efficient technique for source-code mining.