Using Design Patterns and Constraints to Automate the Detection and Correction of Inter-Class Design Defects

  • Authors:
  • Yann-Gaël Guéhéneuc;Hervé Albin-Amiot

  • Affiliations:
  • -;-

  • Venue:
  • TOOLS '01 Proceedings of the 39th International Conference and Exhibition on Technology of Object-Oriented Languages and Systems (TOOLS39)
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Abstract: Developing code free of defects is a major concern for the object-oriented software community. In this paper, we classify design defects as those within classes ( intra-class), those among classes ( inter-classes), and those of semantic nature ( behavioral). Then, we introduce guidelines to automate the detection and correction of inter-class design defects: We assume that design patterns embody good architectural solutions and that a group of entities with organization similar, but not equal, to a design pattern represents an inter-class design defect. Thus, the transformation of such a group of entities, such that its organization complies exactly with a design pattern, corresponds to the correction of an inter-class design defect. We use a meta-model to describe design patterns and we exploit the descriptions to infer sets of detection and transformation rules. A constraints solver with explanations uses the descriptions and rules to recognize groups of entities with organizations similar to the described design patterns. A transformation engine modifies the source code to comply with the recognized distorted design patterns. We apply these guidelines on the Composite pattern using Ptidej, our prototype tool that integrates the complete guidelines.