Thanks to the Miso group, we have now a static analyzer for ATL. The analyzer works as follows:
- Firstly, it infers typing information from the transformation and detects potential errors statically.
- Then, it generates OCL path conditions for the candidate errors, stating the requirements for a model
to hit the problematic statements in the transformation.
- Last, it relies on constraint solving to generate a test model fragment or witness that exercises the transformation, making it execute the problematic statement.
This is also explained in this graphical representation of the process
And their plans for further work on this topic sound very exciting as well:
We are extending the approach with quick fixes to solve the errors. We also plan to derive transformation pre-conditions, which might be implicit and undocumented, to make explicit the models the transformation is applicable to. Finally, we are performing a wider analysis of existing transformations to classify the most common errors made by developers.
The method is also supported by a prototype tool, anATLyzer, that integrates a static analyzer, a testing tool and a constraint solver as an extension of the standard ATL IDE. They have used the tool to analyse medium and large-size third-party ATL transformations, discovering a wide number of errors.
See the tool in action:
Full details of this approach are available on the paper: Jesús Sánchez Cuadrado, Esther Guerra and Juan De Lara. Uncovering errors in ATL model transformations using static analysis and constraint solving to be presented at ISSRE’14. Direct link to the paper pdf in the Miso website.