This paper proposes a new approach to using concept analysis for module restructuring, based on the computation of extended concept subpartitions. Alternative modularizations, characterized by high cohesion around the internal structures that are being manipulated, can be determined by such a method. To assess the quality of the restructured modules, the trade off between encapsulation violations and decomposition is considered, and proper measures for both factors are defined. Furthermore the cost of restructuring is evaluated through a measure of distance between original and new modularizations.
Concept subpartitions were determined for a test suite of 20 programs of variable size, 10 public domain and 10 industrial applications. On the resulting module candidates the trade off between encapsulation and decomposition was measured, together with an estimate of the cost of restructuring. Moreover the ability of concept analysis to determine meaningful modularizations was assessed in two ways. First, programs without encapsulation violations were used as oracles, assuming the absence of violations as an indicator of careful decomposition. Second, the suggested restructuring interventions were actually implemented in some case studies, to evaluate the feasibility of restructuring and to deeply investigate the code organization before and after the intervention. Concept analysis was experienced to be a powerful tool supporting module restructuring.