A goal-oriented approach for representing and using design patterns