I am trying to create a project to provide decision making support for class responsibility assignment problem using particle swarm optimization. A fitness function is derived considering various parameters like coupling and cohesion and particle swarm optimization is to be carried out. The input to the program will be an UML class diagram in XML format. How do i calculate the following parameters from the UML class diagram in XML format :
MAC(c) - method-attribute coupling between class c and other classes – Total number of interactions between methods of one class (c) and the attributes of other classes in the same class diagram MMC(c) - method-method coupling between class c and other classes– Total number of interactions between methods of a class (c) and methods of other classes in the same class diagram MGC(c) method-generalization coupling – This is applicable only in those class diagrams where generalization is applied.
RCI(c) ratio of cohesive interactions of class c : RCI(c) = |CI(c)| / |CImax(c)|.
CImax(c) is the maximum possible cohesive interactions in a class c. CI(c) is the number of existing cohesive interactions in a class c.
TCC(c) tight class cohesion - is the pairs of methods, m1 and m2, of a class c∈C with common usage.
DMA (m,a) direct method–attribute dependency between method m and attribute a.
DMM (m1,m) direct method–method dependency between m1 and m2 .
How do i calculate these parameters from the UML class diagram in XML format?