Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emf-dev] UML2 Statechart model import and code generation facilities

Jake,

I'm not aware of this having been done.  It sounds like it would make another interesting GSoC proposal for the wiki!

With the work on declaratively specifying behavior of derived features we've also been looking at similar things for the behavior of EOperations.   It would be awfully cool in the long term if one could invoke operations even on dynamic models and that it would invoke whatever type of interpreter is associated with the operation's behavior description....

Cheers,
Ed


Jacob Beard wrote:
Hi all,

I am currently beginning to explore what is possible with Ecore and the UML2 project. I understand that it is possible to import a UML2 model to Ecore. In the UML2.0 OMG standard, it is also possible to associate a Classifier with a component that describes its Behaviour, so either an Action, Activity, Interaction, or State Machine diagram. State Machine diagrams are especially useful because you can easily generate code from them. This is the workflow that I imagine might be possibe:

1. Create your UML model using UML2 Tools. For each Class, you associate a State Machine which describes its behaviour.
2. Transform your UML model to Ecore using the mdl-to-ecore importer.
3. Generate Java code from your new Ecore model.
4. Use generated Java code to instantiate M0-level entities.
5. Send events into the objects' generic Behaviour API (for example, Statechart.event(Event evt) ). For each class, the associated statechart should have been compiled down to executable code, which then determines how the event is to be handled at the instance level.

Does a facility for this already exist? Specifically, is it possible to compile the state machines designed using UML2 Tools down into executable Java code?

If this facility does not already exist, is this something that EMF might also be interested in as another GSoC project idea? This is not for myself, but for a colleague of mine who has done similar work in this domain, although I could definitely see my proposed project leveraging this facility, for example, for creating a web-based Statechart editor and simulator.

I would greatly appreciate it if you would let me know what you think. Thanks,

Jake

_______________________________________________ emf-dev mailing list emf-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/emf-dev

Back to the top