You can use static analysis tools to analyze UML models.
For example, you can review UML models to detect errors so that you
can correct them. You can collect information on UML models to determine
whether your model follows best practices. You can also define new
metrics and rules by using templates.
Reviewing UML models
You can run a UML Model Review analysis configuration on
a UML model to detect several different types of problems in the model.
For example, you can check your model for orphaned elements, interfaces
with private operations, or cross model dependencies. UML review rules
are grouped into six categories: completeness, correctness, coupling, Java naming, style, and traceability.
Collecting metrics on UML models
You can run a UML Metrics analysis configuration on a UML
model to collect several different types of numeric information about
the model. For example, you can discover the number of attributes
or operations in a classifier, the level of instability in a package,
or the depth of a classifier in its inheritance hierarchy. UML metrics
are grouped into four categories: coupling, diagrams, inheritance,
and size. Metrics that express the number of occurrences for each
namespace are summed and all other metrics are averaged. For each
metric, you can optionally configure the severity, lower bound, and
upper bound. Metrics that are out of the range of the lower and upper
bounds are reported as problems and are displayed in red. To inspect
metrics results, you expand the result tree starting at the root and
read the results from the bottom up.
Defining custom metrics and rules for UML models by using templates
You can create custom UML metrics to collect on a UML model
in addition to the metrics that are available by default. You can
also create custom UML review rules to supplement the rules that are
available by default. Two templates are available for creating custom
UML metrics. Four templates are available for creating custom UML
review rules. You can add custom rules and metrics to existing analysis
configurations or to new analysis configurations.