Depending on the goals, we might need to solve the OCL constraints on the models for various purposes. For example, if the models are developed for automated model-based testing, solving the OCL constraints on the test models is essential for test data generation. Similarly, we need to solve the constraints on meta-models, if we intend to automatically create models based on these models. Another use can, for example, be to identify the inconsistencies between constraints.
For industrial systems, typically solving the constraints written in a language as expressive as OCL is a very complex task. Most of the tools available apply random strategy for this purpose, which do not scale to the requirements of solving complex constraints. Therefore, to achieve the goals mentioned above, it is a key requirement to have an automated, scalable, and robust constraint solver that is useful in various contexts.
As part of the work to be carried out under this research project, we have developed such an automated OCL constraint solver. This tool is developed in Java using Eclipse IDE. It uses an API named as Eclipse OCL which provides facility to parse and evaluate OCL expressions. It takes UML class diagram and constraints written in OCL (Object Constraint Language) as input. It loads UML model and parses OCL constraint to extract relevant information. After that it uses search techniques to solve those constraints. For this purpose various search algorithms such as AVM, SSGA, (1+1) EA and RS are available. Finally when search algorithms successfully find the solution that satisfies given OCL constraints, first this solution is evaluated using Eclipse OCL evaluator and then UML object diagram is generated that contains test data.
Moreover to perform thorough testing of critical systems, this tool also provides mechanism to generate multiple solutions according to various coverage criteria. Coverage criteria available for this purpose are: Clause Coverage, Partition Coverage, Branch Coverage and predicate (MC/DC) coverage.
Contact Person: Zohaib Iqbal