I am doing my engineering thesis on code generation for C language and I'm evaluating acceleo.
I have the next problem:
We are in uml using multiple inheritance. Let's say we have the following class diagram:

A
/ | \
B C D
| | \ |
| | E
\ | /
F

And we want to get all possible paths from A to F
((A, B, F), (A, C, F), (A, C, E, F), (A, D, E, F))
How can I write an OCL query that throws that result for that diagram? is there a way to solve something like this with JAVA instead of OCL?

(Apologies for not responding to your revised message on the OCL newsgroup. Your initial message came in at the same time as many SPAM philosophical queries which you inappropriate reference to diamond reinforced.)

The problem involves a nested iteration of indeterminate depth. This can sometimes be solved by a closure() iteration, but more usually by a recursion.

Given a helper function superPaths() : Set(Sequence(Class)) the problem degenerates to prepending each of the local superClasses on to the superPaths of each superClass.

PD: I said it was close because if you notice even where Class1 appears in the middle is that there are many paths one after another, the fact that Class5 does not appear three times tells me that part of the collection was flattened before the "prepend" and after that it seems that all the collection was flattened...

I think that the JAVA way is very necessary since it allows debugging.
If I had known before that it served to solve this type of queries I would have fought much less with them and do it the JAVA form. Any way, the queries in OCL enrich the thesis very much.