M.A. Jeusfeld and Ó. Pastor (Eds.): ER 2003 Workshops, LNCS 2814, pp. 118–128, 2003. © Springer-Verlag Berlin Heidelberg 2003 Defining Metrics for UML Statechart Diagrams in a Methodological Way Marcela Genero, David Miranda, and Mario Piattini ALARCOS Research Group Department of Computer Science, University of Castilla – La Mancha, Paseo de la Universidad, 4, 13071 - Ciudad Real, Spain {Marcela.Genero,Mario.Piattini}@uclm.es dmiranda@proyectos.infcr.uclm.es Abstract. The fact that the usage of metrics at early phases of OO development can help designers make better decisions is gaining relevance. Moreover, the necessity of having early indicators of external quality attributes, such as understandability, based on early metrics is growing. There exists several works related to metrics for UML structural diagrams such as class diagrams. However, UML behavioral diagrams metrics have been disregarded in the software measurement arena. This fact leaded us to define a set of metrics for the size and structural complexity of UML statechart diagrams. Apart from the definition of the metrics, a contribution of this study is the methodological approach that was followed to theoretically validate them and to empirically validate them as understandability indicators. Keywords: OO Software, UML statechart diagrams, understandability, maintainability, structural complexity, size, metrics, theoretical validation, empirical validation, experiment replication 1 Introduction It is widely recognised that structural properties of OO software artefacts obtained at early phases of the development has a great influence on the quality of the product that is finally implemented. For this reason several proposals of metrics exists that can be applied to measure the size, structural complexity, coupling, etc. of UML class diagrams [11, 15, 20, 27, 28] and use case diagrams [23, 28]. However, there is little reference to metrics for behavioural diagrams such as UML statechart diagrams in the existing literature. One of the first approaches towards the definition of metrics for behavioural diagrams can be found in [17], where metrics were applied to statechart diagrams developed with OMT [34]. Yacoub et al. [40] proposed structural complexity and coupling metrics for measuring the quality of dynamic executions. These metrics were defined basing in concepts as Petri Net and McCabe’s cyclomatic structural complexity and were applied to simulated scenarios in Real-Time Object Modelling (ROOM) [35]. Poels and Dedene [33] defined structural complexity metrics for event -driven OO conceptual models using MERODE [37]. These proposals of metrics have not gone beyond the definition step. As far as we know, there is no published works related to their theoretical an