On my way to San Francisco

As I am writing these lines, I am waiting for my flight to San Francisco, where I will be attending ICSE, and presenting two workshop papers: one at Models in Software Engineering (MiSE), and one at Developing Tools as Plug-Ins (TOPI). If you are in the San Francisco area in the next two weeks and want to catch up, drop me an email!

I should probably have written about the two accepted papers earlier, but as attentive readers will guess from the previous post, I have been busy with submitting my PhD dissertation, which left me with very little time (if at all) for anything else.

The MiSE paper is called “Issues in Representing Domain-Specific Concerns in
Model-Driven Engineering“, and I have written it together with my supervisors, Yijun Yu and Michel Wermelinger, and Zhenjiang Hu, from NII, Japan. It is a position paper in which we argue the need for several ways of representing a domain-specific concern on (possibly different) models, as well as bidirectional transformations between them to keep them in sync. Then we discuss more far-fetched plans, such as the interactions between several domain-specific concerns on the same model.

The TOPI paper, which I wrote with my supervisors, is called “Developing a Domain-Specific Plugin for a Modelling Platform: the Good, the Bad, and the Ugly“. We reflect on our experience of developing a plug-in for IBM Rational Software Architect, which itself can be seen as a (collection of) plug-in(s) for Eclipse. We report on what motivated our choices, as well as which problems we encountered, and which benefits we got from using Rational Software Architect instead of another platform, or instead of writing a tool from scratch. Even though I think I can blame Rational Software Architect for a few white hairs on my head, all in all it saved us massive amounts of time and effort. In addition to presenting my paper, I will also give a demo of the tool. If you miss the demo and would like to have a go with the tool, or if you want to discuss it further, please feel free to ask me, and I’ll gladly show you how it works.

You can get both papers from Open Research Online, the Open University’s online repository of publications. If I am not mistaken, the preprint PDFs should be available free of charge.

3 years, 7 months, 15 days, and half a rainforest later…

… I am finally submitting my PhD dissertation (so much paper!). The title is “Model-Based Analysis of Role-Based Access Control”, and it is about, well, analysis of RBAC on a model. I’ll be more specific, and possibly post a link to the PDF version, after my viva and the possible subsequent corrections. Now is the time to celebrate, take a short break, and resume a normal life.

I Still Love Free Software

… and so should you.

Last year already, I blogged about the Free Software Foundation Europe (FSFE)’s I Love Free Software campaign for Valentine’s day. It is a great occasion to remember that free software plays an essential part in our lives already, whether we are developers, contributors in any way, or even users. Yet the word still needs to be spread about the numerous advantages of free (and open source) software and why they are absolutely essential to a free and open society.

I love Free Software!

I love free software because I can look at the code, I can fix it when it doesn’t behave the way I want, I can share it with my friends and family, and I can adapt it to my customers’ needs. I love free software for its (potential) technical superiority, and for the fact that it give power back to users.

Today we can all thank all the contributors to the free software movement, and all its dedicated users. However small your contribution: thank you. And keep up the good work :)

If you use and like free software, why not spread the word? You could help a project, or support the FSFE or one of its sister organisations. You could tell a friend or a parent about free software. You could try a free (as free speech) operating system, and you could blog or tweet about free software. There are so many ways you can help, surely there must be one that suits you!

Rational Software Architect, UML profiles, and the closure() iterator in OCL

Rational Software Architect (RSA) is a well-known UML modelling environment, that I use extensively in my research. Indeed, I used it to create a UML profile for representing RBAC requirements, and created rbacUML, a plugin (it is open source software, under the EPL licence) that provides several RBAC-related features (there’s another very exciting one coming soon!). In rbacUML, I use OCL constraints and queries extensively, not only to verify the well-formedness of the domain-specific modelling language (DSML) I created, but also to perform various kinds of analysis on UML models annotated with RBAC concerns.

One of the advantages of RSA is that it is built on Eclipse, which makes it relatively easy to extend and interface with other products. In particular, RSA uses Eclipse’s modelling projects, including the EMF-based representation of UML or the OCL project. It also adds a lot of interesting features to the stock Eclipse package, such as the graphical representation of UML models, or various profile edition and tooling creation features. In this post I will focus on the UML profile feature.

UML profiles are the official way of extending the UML metamodel to express concepts that were not included in the official metamodel. To make things short, UML profiles consist of stereotypes that can be applied on any kind of UML element, associations and annotations, and OCL constraints to enforce specific properties. RSA provides an easy way of creating such profiles by defining stereotypes, specifying the elements on which they can be applied, associations, and other options. It also allows developers to attach OCL constraints to stereotypes. Models using the stereotype can then be checked against the set of OCL constraints defined on the profile, and warnings and failures will be displayed in the model explorer, on the diagrams and in the Problems view. This is very handy to ensure the well-formedness of a model, or to perform more advanced types of analysis. Even better, the constraints only have to be written once and they will be applied on all models that use the profile.

However, there is one problem: the closure() iterator. The closure() iterator provides the transitive closure of an association. It is very useful, for example, to deal with role hierarchies. Indeed, given self as a role, it is possible to form the set of all its ancestor roles using something like self->closure(parent), which would capture self->parent, self->parent.parent, self->parent.parent.parent, etc, until reaching the ancestors that have no parents.

Unfortunately, the closure() iterator was not part of the official OCL standard until version 2.3.
RSA (version 8.0, release before OCL 2.3) insists on developers creating only standard-compliant OCL constraints, and therefore will issue a warning to the developer during the profile development to remind him that he is using a non-standard iterator. It doesn’t stop there, unfortunately. Profile users trying to validate a model using an OCL constraint that contains a closure() iterator will always get… an error, no matter what the result of the OCL constraint evaluation is.

As far as I know, there is no obvious way to relax that strict standard requirement to turn the errors into at least warnings, or better, to silence them completely. The solution I found has been posted on the Eclipse forum and involves directly using the underlying Eclipse UML and Eclipse OCL implementations:


OCL ocl;
ocl = OCL.newInstance(resourceSet);
Helper helper = ocl.createOCLHelper();


BasicEnvironment benv = OCLUtil.getAdapter(ocl.getEnvironment(), BasicEnvironment.class);
benv.setOption(ProblemOption.CLOSURE_ITERATOR, ProblemHandler.Severity.OK);


Constraint constraint = element.getNearestPackage().getAppliedProfile("profile").getOwnedStereotype("stereotype").getOwnedRules().get(0);
Stereotype stereotype = ((Classifier)element).getAppliedStereotype("profile::stereotype");
helper.setContext(stereotype);
OCLExpression expression = helper.createQuery(constraint.getSpecification().stringValue());
Query query = ocl.createQuery(expression);
Object result = query.evaluate(element.getStereotypeApplication(stereotype));

Several things are worth nothing:

  • element is the UML element on which we want to evaluate the constraint (self)
  • the name of the stereotype we want to access is the fully qualified name, of the following form: <profile name>::<stereotype name>
  • the evaluate() method returns an Object, but in the case of a constraint it will of course be a boolean value
  • the code snippet assumes that an element, or a list of elements, has been selected, and that the correct resources set is passed to OCL.newinstance(). The resource set can be obtained from an element through element.eResource().getResourceSet()
  • helper.createQuery() will throw a ParserException

This solution will evaluate any constraint, even those containing the closure() iterator, without complaining. A similar code snippet can be used to evaluate other OCL constraints that are not embedded in the profile, and even to evaluate queries, that do not return a boolean value. That will be for another post.

EDIT: Fixed the code, there was a bug

Become a supporter of FSFE

It isn’t exactly a secret that I am a fellow of the FSFE, or Free Software Foundation Europe. If you’re reading this, you probably already know that FSFE is a non-profit whose goal is to promote and work for free software, which is software that guarantees you four essential freedoms:

  1. the freedom to use the software, in any way you want;
  2. the freedom to share the software with whoever you want;
  3. the freedom to study the software, through access to its source code;
  4. the freedom to improve the software, by fixing bugs or adding new features yourself.

The point of this post is not to give a course on free software, so if you have been living in a cave for the past 15 years or so and would like to know more about free software, then you can check the FSF (FSFE’s sister organisation in America) website, Wikipedia, or plenty of other online resources.

Last weekend, FSFE has started a new programme for individuals to show their support to the free software cause: supporters. Anyone can become a supporter of FSFE, at no cost. The FSFE will keep you updated about its activities by sending you an email a few times a year. Being a supporter is the easier and cheapest way of showing your support to free software, and helps FSFE to get a better idea of the number of people out there that care about the software they’re running and using. If you want to get involved a bit more, you can subscribe to the FSFE mailing list to be kept updated about events and discussions. You could of course also make a donation to help FSFE continue its mission.

If you want to become more involved in FSFE, you could consider becoming a FSFE fellow (like me). The fellowship scheme has been in place for a few years now, and allows individuals to become involved in FSFE operations, attend meetings, etc. If you become a FSFE fellow, you will get an @fsfe.org email address (it’s actually a redirection), a jabber/XMPP address, a GPG smartcard to sign and encrypt your emails or any other files, a blog, a page on the fellowship wiki, etc.

The free software movement needs you, and it only takes a few seconds to register as a supporter. Do it now!

Last day at EMFcamp

Sunday was the third and last day of EMFcamp. These camps are always too short :) .

Pacman tents

Next time, I should come dressed either as pacman or as a ghost, and run around the place like crazy.

On Sunday I didn’t take my laptop with me, but instead I did bring my camera. After having to cycle through a charity running event going the other direction around Willen Lake, I arrived on the camp side to meet my friend Adrien who was there for the day. We listened to the end of a talk on Hypermedia RPC by Tef (the same one that talked about how programming is terrible the day before – and a very good public speaker). As I arrived late into the talk I’m not completely sure what exactly it was about. Something to do with using http properly, caching, and scaling. I should probably look into it and find out exactly what it’s all about. We then proceeded to have a beer and eat lunch, until it was time for Adrien’s talk on Datamining a cloud that wasn’t meant to be public. Interesting as always, Adrien found an, err, “undocumented feature” in a cloud storage service that allows anyone to look at the files shared by users, and that many of them probably think are kept more or less private. The trick is that the tiny URLs that the service provides are not generated randomly as one may think, but are actually a counter. It then becomes trivial to watch for new files being uploaded. By simply looking at the files’ metadata, Adrien was able to compute statistics about file sizes, types, and other similar things. Ooops.

Beer

A hacker camp wouldn’t really be a hacker camp without beer. And Club Mate.

We then desperately looked for the workshop on Fundamentals of web application security & security testing by Tom Doran, but there didn’t seem to be anything happening in the workshop tent, so I think we went for a beer instead (what else?). After hanging around the camp for a while it was already time for the camp’s feedback session, where the organisers discussed what went ok and what went wrong, and how they plan on making the next edition better. They also gave the audience the opportunity to provide feedback, which is great to find out what needs to be improved and what was good and interesting. Apparently there will be a one-day event next year, and the following camp will take place in 2014, but not in Milton Keynes. It turns out that there were quite a few problems with the camp site, for example the fact that it is often flooded by the nearby river (we were lucky it didn’t happen), or the fire hazards that were left on camp when they arrived even though it was supposed to have been cleaned by the parks trust beforehand.

Dino

Meet the bouncer at the bar, who was making sure that everyone was safe and had a great time.

The closing talk was then the occasion to thank everyone that came and everyone that got involved in the organisation. The organisation team has made a fantastic job, and so have the volunteers. Thanks a lot to all of them.

Many people have been taking pictures throughout the camp, and some of them are already available. My pictures are already online, and a dedicated page has been added to the EMFcamp wiki for people to post a link to their pictures galleries. If you were there and took pictures, don’t forget to edit the page.

I had a great time at EMFcamp, and I’m sure everyone else did, too. I hope we will all see each other again at EMF2014, and before that, at OHM2013.

Empty tent

Goodbye EMFcamp, see you next time!

Second day at EMFcamp

And that’s another day over at EMFcamp. A full day this time, with talks starting as early as 11 am. I arrived a bit later, just in time for the talk on TiLDA, the camp badge that happens to be an Arduino board. Unfortunately, the boards were not ready yet and hence the talk had to be rescheduled later (or was is eventually canceled? I’m not sure). I wondered around the camp until the talk on high altitude ballooning, which was followed by the launch of a balloon outside the tent. If you didn’t make it to EMFcamp, I bet you now wish you had booked a ticket.

Balloon launch

A balloon is launched shortly after the talk on high altitude ballooning

I then spent part of the afternoon in the workshop tent, helping out with the badges. I first had to flash the bootloader with an ISP programmer, then helped sticking the batteries to the boards and getting them ready for distribution. Eventually the badges were distributed in the afternoon, and I think everyone was happy with their new toy. The boards feature 2 LEDs, an IR received and a transmitter, as well as a wireless card for boards to communicate with each other.

TiLDA

Meet TiLDA, the EMFcamp badge

I then went to see Ben Goldacre‘s talk on Big Pharma. He is a great public speaker and did an amazing as well as horrifying talk on how some pharmaceutical companies conveniently forget to publish results of drug trials that do not look too good for the drugs they’re selling, which is the subject of his new book, The Drug Pushers.

Ben Goldacre

Ben Glodacre

I then got some food and a beer, before attending the lightning talks session, followed by Tef’s Programming is terrible. Lessons learned from a life wasted. It was a funny (and true) account of the horrors he has seen in his life and how programmers (mis)behave, to finish with a rant on how poorly programming is taught in schools and universities.

DIY synthetisers

Playing music with synthesisers and a radio theremin between two talks

After that was a talk on safe cracking, Safe cracking from back in the day to the present day by Warren Rockley. Not only did Warren avoid inflicting death by PowerPoint upon us (by not having any slides at all), he proceeded to walk us through the history of safe making and safe cracking, from the early days of heavy wooden boxes to present day safes and vaults. His talk was interesting and full of funny anecdotes. The tent was full, people were grouped outside to watch, and the questions session went on for over an hour, with contributions and live lock picking demos from other locksmiths as well. After that, it was time to call it a day and go home for the night.

The bar

No post would be complete without a picture of the bar, under the M1.