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.
FNR Pearl Chair. Head of the Software Engineering RDI Unit at LIST. Affiliate Professor at University of Luxembourg. More about me.
Hi,
I admire your perseverance and enery pushing for “a better modeling world”.
I agree that constraints are an important part of MDE, but OCL is seldom used in the modeling community. I discussed this topic with people, who were involved in the standardization of OCL or are activly involved in the spec of UML, fUML and ALF.
Some results:
1. The knowledge about modeling is still in its infancy. A lot of software designers, who are using UML, are using models only to illustrate and document the architecture of a software solution. They are using dedicated modeling tools, Visio or even Powerpoint. The majority of the experienced software developers have written thousands LOC and have drawn a lot of class diagrams, state diagrams and process diagrams, but have never defined pre-, post- conditions or invariants as part of their development process. 99% is done in programming languages.
2. Tool support is poor. There are some good academic examples for compiling OCL to robust code libraries, which can be used in production environments on model and model instance data, but this is still not part of the toolbox of every software designer.
3. Only few software engineers agree to the importance of constraints. As long as there is no common agreement about a usable action language (that could be ALF in the future), they are not really interested in another language which is restricted to constraint expressions. The benefits are not seen in comparison to programming languages.
I think this can only be improved by better tool support for constraint oriented modeling. Analogously to programming languages: If you have no good compilers/debuggers/IDEs with a good minimum set of functionality, nobody beside academics will use a new programing language.
Regards,
Juergen
I disagree with (3). I think most people agree about the importance of constraints , though it´s true that because of (2) most of them may think that taking the time to define those constraints does not pay off. Eclipse has a great OCL plugin for defining (and debugging) OCL constraints but it´s true that what you can do with them (e.g. code-generation) is very limited.
Hello Juergen,
I agree with 2. poor tool support. It proves these are hard “modelling times”.
Actually, it was always this way since the very start. Academic world is fine but professional tool support is weak.
There are many good ideas out there but I expect these will materialise in the pretty soon i.e. next decade e.g. ModelBus enabling tool cooperation on plain xmi models, see http://www.modelbus.org/. That would be a real push forward.
Once we get good tools in our hands all formal languages will gain importance such as OCL taking care of many important details which are impossible to manage manually on large project.
Until then, we will stay a community of innovative individuals and the more so is this site, modeling-languages.com, important to all of us.
Regards
Milan