Metrics for OCL expressions
Martin Gogolla, Timo Stüber · 2020
UML and OCL descriptions may be regarded as one fundamental way of formulating models in software engineering. Here, an approach for determining the complexity of OCL expressions based on metrics is studied. Well-chosen metrics, in general, offer support for a developer in ordering, classifying and focusing model elements in terms of importance during the development process for taking decisions. For OCL, fine-grained metrics are known. We develop and validate a new metric for OCL expressions and show how to realize the new and the known metrics. The development was accompanied by a comparative study with modeling experts that gave crucial feedback and influenced overall decisions. We also show how through considering OCL constraints with high metric complexity values, the model validation and verification process can be enhanced.