This OCL repository is my solution to a problem we (by “we” I mean the modeling community at large) have been facing for a long time.
We have tried several times to build useful model repositories (including both academic and industrial examples) for all of us to learn and analyze. Some of the initiatives include the well-known ATL metamodel zoo, ReMoDD , OpenModels and MDEForge (among others, like OOModels that do not exist anymore) together with a few personal initiatives (like this) and some companies that offer more limited (and sometimes proprietary) access as well.
Being honest, all these initiatives should be considered mostly as failures (so far) since the number of models they host is really limited (I think they would be better of trying to (virtually) combine their model bases to get a big single repository) and the analysis of those models is complicated due to a mix of technical (storage formats, missing metamodels or other related artefacts, partial models …) and intellectual property (anonymity of the models, reluctance to share the knowledge that may well be the competitive advantage of a company, not clear benefits for the contributing companies …) issues.
At this point, you may think that I’m going to propose yet another models repository. Well, I´m not. I´m proposing the creation of an OCL repository. Being OCL such an important part of the MDE paradigm (used not only to constraint UML models but also to define operation contracts, guards in state machines and activity diagrams and key element of many other transformation and query languages, to mention a few applications), I do believe having an OCL repository would be really useful not only as a learning aid but also as a kind of benchmark that OCL processing tools can use to validate themselves (and compare with the others).
Sure, we’re going to face some of the problems that have caused model repositories to fail before but we’ll try to avoid some of them. To begin with, OCL can be used in many places but it’s still a single language (compared with model repositories, especially when following the philosophy that Everything is a model) and a textual one (well, to be more precise, OCL is a modeling language with only a popular concrete syntax which happens to be a textual one). Moreover, I´m using GitHub to host the OCL repository.
I’m hoping the use of such a well-known platform will make it easier for people to contribute (e.g. no need to learn a new tool and a more transparent process). So please, fork and contribute as much as you can!. The contribution process is as simple as it gets (just take a look at the readme file, feel free to also suggest changes on the process or repository structure but let’s not overcomplicate things at least not until the size of the repository requires it).
To complement this repository, a few colleagues have recently automatically generated another OCL repository containing a Data Set of OCL Expressions on GitHub. The OCL expressions in this repository are not manually contributed (as in our case) but automatically mined from other repos in GitHub. In total, this alternative OCL repository includes 9188 OCL expressions originating from 504 EMF meta-models. I think by combining both approaches (and growing the samples in each) we have a solid basis for the empirical evaluation of OCL.