Evolutionary Solver for OCL (EsOCL) is a practical and scalable search-based constraint
solver for the Object Constraint Language (OCL) that provides a solution for various model-driven
engineering problems such as test data generation for Model-based Testing (MBT), configuration for
product lines, and model-transformation testing.
EsOCL is developed in Java that interacts with an existing library, an OCL evaluator, called the Dresden OCL Software (DOS), which provides APIs to parse an d evaluate an OCL expression based on an object model. Our tool only requires interacting with DOS for the evaluation of constraints.
EsOCL implements the calculation of branch distance for various expressions in OCL (see the related publication for details), which aims at calculating how far are the test data values from satisfying constraints. For a constraint, the search space is defined by those attributes that are used in the constraint. This is determined by statically parsing a constraint before solving it and improves the search efficiency in a similar fashion to the concept of input size reduction.
The search algorithms employed are implemented in Java as well and include Genetic Algorithm, (1+1) Evolutionary Algorithm, and Alternating Variable Method (AVM). Our implementation of branch distance calculation corresponds to OCL semantics.
A prototype implementation of EsOCL as a Java Web Application can be found here: http://dnat.simula.no:50753/EsOCL.
Web Application is Unstable, so we recommend using eclipse project which can be download from here: https://github.com/Simula-TaoGroup/EsOCL
S. Ali, M. Z. Iqbal, A. Arcuri, and L. Briand. Generating Test Data from OCL Constraints with Search Techniques, Accepted for publication in IEEE Transactions on Software Engineering (TSE), 2013.