Contents > 8 Defining Custom Design Metrics and Rules > 8.7 Defining Metrics for Profiles > 8.7.2 Profiles in SDMetrics

8.7.2 Profiles in SDMetrics

SDMetrics uses a simplified version of the UML metamodel, and is not a full-fledged MOF implementation. SDMetrics therefore cannot simply import any existing profiles and apply them to the models. Unlike the UML's lightweight approach to metamodel extensions, SDMetrics takes a heavyweight approach of creating new meta-classes in the metamodel. To account for a profile extension requires Creating these definitions is a manual process, but it only has to be done once for each profile. After that, you can analyze models using the profile just like regular models. In the remainder of this section we'll see how profile extensions are serialized to XMI, and discuss the options for developing profile extensions for SDMetrics. Using the example of SysML requirements, we show how to add a "requirement" class to SDMetrics' metamodel, define an XMI transformation for it, and create metrics for requirements.