EsOCL

WHAT IS EsOCL?

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.

WHAT IS EsOCL USED FOR?

  • Model-based Testing
    1. Data Generation for Functional Testing
    2. Data Generation for Robustness Testing
    3. State-based Product Line Configuration for Testing
  • Product Line Configuration

WANT TO TRY EsOCL OUT?

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.

INSTALLATION INSTRUCTION

EsOCL is an maven project. If you have downloaded the zip file, you can install following steps:
  1. Unzip Project directory.
  2. Run Eclipse and select "File->Import" from the main menu.
  3. On the dialog that appears, select "Existing Project into Workspace" or "Existing Maven Project".
  4. In a next dialog select unzipped project directory.
  5. Set UML Model path and OCL Constraint In no.simula.esocl.test.ESOCL.java in the test directory and run the project.

LOOKING FOR MORE INFORMATION?

Related Publications
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.