Contents > 9 Extending the Metrics and Rule Engine

9 Extending the Metrics and Rule Engine

The previous section showed how to use the XML-based SDMetrics Markup Language (SDMetricsML) to calculate new metrics and rules of your own. The SDMetricsML is flexible enough to cover most measurement needs. Defining new metrics is quick and easy to do, and only requires a simple text editor.

The SDMetricsML definitions are read by the "metrics engine", a subsystem of SDMetrics that interprets the metric definitions and calculates the metrics for a UML model accordingly. Likewise, the "rule engine" checks the design rules defined through SDMetricsML for a UML model.

Occasionally, the capabilities of the SDMetricsML/metrics/rule engine may be insufficient or inefficient for your measurement needs. For these situations, the metrics engine and rule engine provide a plugin mechanism to extend their calculation capabilities and the SDMetricsML. The plugins add

Users can then write SDMetricsML definitions as usual, using the new procedures and functions.

This section describes how to develop such plugins for the metrics and rule engine. The plugins are implemented in the Java programming language. Writing a plugin thus requires Java skills and a Java compiler.

9.1 Metric Procedures
9.2 Set Procedures
9.3 Rule Procedures
9.4 Boolean Functions
9.5 Scalar Functions
9.6 Set Functions
9.7 Metrics Engine Extension Guidelines