A new set of metrics for measuring the complexity of OCL expressions

Published in Software Technologies: Applications and Foundations (STAF)2025, 2025

The Object Constraint Language (OCL) is extensively used in model-driven engineering to specify constraints on UML class diagrams. Evaluating the complexity of OCL expressions remains a challenge, particularly in the context of verification. This paper introduces a complete new set of metrics for measuring OCL expressions. This gives us the advantage of measuring OCL in a customizable way. First, we enhance the Structural Complexity. Second, we propose two new types of metric: Computational and Dependency Complexity. Finally, we calculate the overall complexity using our Total Complexity metric. Our experimental results demonstrate how one can measure the complexity of an OCL benchmark in terms of its verification time which is used to define the weights for OCL constructs.

Recommended citation: A. Jha, R. Monahan, H. Wu (2025). "A new set of metrics for measuring the complexity of OCL expressions." ACM/IEEE STAF 2025.
Download Paper