A stochastic approach to automated design improvement

  • Authors:
  • Mark O'Keeffe;Mel Ó Cinnéide

  • Affiliations:
  • University College Dublin, Belfield, Dublin, Ireland;University College Dublin, Belfield, Dublin, Ireland

  • Venue:
  • PPPJ '03 Proceedings of the 2nd international conference on Principles and practice of programming in Java
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

The object-oriented approach to software development facilitates and encourages programming practices that increase reusability, correctness and maintainability in code. This is achieved in Java by providing mechanisms for inheritance, abstraction and encapsulation. By measuring properties that indicate to what extent these mechanisms are utilised we can determine to a large extent how good a design is. However, because these properties often conflict with other goals such as high cohesion and low coupling it can be difficult for a programmer to recognise the best compromise.We propose the novel approach of treating object-oriented design as a combinatorial optimisation problem, where the goal is maximisation of a set of design metrics. With a view to developing a fully automated design improvement tool we have developed a prototype that uses a small metrics suite combined with automated refactorings to move methods to their optimum positions in the class hierarchy. The action of this simulated annealing system produces a new design that is superior in terms of the metrics used and when judged on object-oriented principles.