Re: [atl_discussion] How to target a UML profile in ATL? (bis)

From: Frédéric Jouault <f.jouault_at_example.com>
Date: Mon Sep 05 2005 - 13:52:17 CEST

Hello Pieter and all,

Do you remember this quite old conversation on atl_discussion?

> Pieter Van Gorp wrote:
>
> On a related subject, note that conformance checking of the UML
> profile conformance is done by executing some OCL constraints at the
> M1 level. An example OCL well-formedness rule of the UML profile for
> SDM is: ``Only states on which the <<loop>> stereotype is applied are
> allowed to have an outgoing transition on which the <<each time>>
> stereotype is applied''. These are not checked by your MOF
> transformation engine. Instead, an external engine capable of
> validating UML models against M1 OCL can check the result of the
> transformation for validity.

I am now able to state that this *can* actually be done by a generic
model transformation engine like ATL.
As a matter of fact, we worked on this subject and wrote a paper,
which has been accepted for the GraMoT'05 workshop.
You can find a version of this paper here:
http://www.sciences.univ-nantes.fr/lina/atl/www/papers/GraMoT05.pdf

If I applied what we described in this paper to your UML profile
constraint example, we would obtain something like:

rule EachTimeOnlyForLoops {
    from
        s : UML!State (
            (not s.hasStereotype('loop')) and
            s.outgoingTransitions->exists(e | e.hasStereotype('each time'))
        )
    to
        p : Problem!Problem (
            severity <- #error,
            description <- 'The State ' + s.name + ', which does not have
the stereotype <<loop>>, is not allowed to have an outgoing transition
with stereotype <<each time>>'
        )
}

As described in our paper, the resulting Problem model can be further
processed (i.e. transformed) to fit any kind of required
representation format (e.g. text, IDE embedded, etc.).

Regards,

Frédéric Jouault

           
Received on Mon Sep 05 04:52:21 2005

This archive was generated by hypermail 2.1.8 : Thu Jan 18 2007 - 15:04:54 CET