Skip to main content



      Home
Home » Modeling » Epsilon » Epsilon's automatic generation of code from UML diagrams
Epsilon's automatic generation of code from UML diagrams [message #1811063] Mon, 26 August 2019 05:13 Go to next message
Eclipse UserFriend
Hello!

I've heard Epsilon takes class, activity and sequence diagrams altogether into account when automatically generating code (Java or C#).

Could anybody elaborate a little bit on it?

Thank you for your attention.

Regards,

Clever.
Re: Epsilon's automatic generation of code from UML diagrams [message #1814086 is a reply to message #1811063] Tue, 03 September 2019 07:26 Go to previous messageGo to next message
Eclipse UserFriend
Hi Clever,

Epsilon does not have predefined code generators for UML, but it can load UML models and you can write generators from those models (e.g. in EGL/EGX). Does that answer your question?

Kind regards,
Antonio
Re: Epsilon's automatic generation of code from UML diagrams [message #1814111 is a reply to message #1814086] Wed, 04 September 2019 01:43 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your reply, Antonio!

Does this video https://www.youtube.com/watch?v=oZhPKER7Ufs illustrate "it can load UML models and you can write generators from those models (e.g. in EGL/EGX)"?

If so, it sounds more complicated than developing a plug-in on, say, Astah (http://astah.net/features/plugins#create-plugins), doesn't it?

I'd like to find a UML tool capable of generating code from class, sequence and activity diagrams altogether (UML tools, such as Astah, normally generate code from class diagrams only). Would you have any suggestion?

Thank you for your attention.

Regards,

Clever.
Re: Epsilon's automatic generation of code from UML diagrams [message #1814933 is a reply to message #1814111] Mon, 23 September 2019 03:21 Go to previous messageGo to next message
Eclipse UserFriend
Hi Clever,

Sorry for the delay - I was away on a conference last week. Epsilon is not a UML tool by itself, but rather the framework that would allow you to build one :-). Generally, code generation tends to be quite project-specific, so you'd typically develop the EGX/EGL templates for your project and wrap them around your UI/API of choice.

I'm not familiar with any UML tool that can generate code from all three things together, and especially not sequence diagrams. However, Papyrus-RT can generate C++ code from activity diagrams, for instance. GenMyModel is an online tool that can generate code from UML class diagrams (again, no state/activity diagrams). UmpleOnline has a few generators that you could try out as well. StarUML and Modelio have some code generation but they appear to only pull from class diagrams.

In my experience, sequence diagrams are a bit unwieldy to create in a fully specified form that is amenable for code generation. Class diagrams are very easy to use and to generate code from, but they only give you structure and not behaviour. Activity diagrams are amenable for code generation, but you need a runtime library which will implement the UML activity diagram execution semantics for you. Papyrus-RT does have that, but AFAIK only for C++, though I know they were looking into extending it into other languages: perhaps it'd be worth asking over at their forum?

Hope that helps!
Antonio

[Updated on: Tue, 24 September 2019 04:37] by Moderator

Re: Epsilon's automatic generation of code from UML diagrams [message #1815002 is a reply to message #1814933] Tue, 24 September 2019 00:28 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your reply, Antonio!

Perhaps, an easier path would be to build my UML diagrams on UML Designer (http://www.umldesigner.org/) and import the UML models into UMLGen (https://projects.eclipse.org/projects/modeling.umlgen) thereafter.

Would you know these tools? If so, please, comment on them.

Thank you for your attention.

Regards,

Clever.
Re: Epsilon's automatic generation of code from UML diagrams [message #1815014 is a reply to message #1815002] Tue, 24 September 2019 04:44 Go to previous messageGo to next message
Eclipse UserFriend
UML Designer seems to consider component diagrams in addition to class diagrams, but no activity/sequence diagrams:

http://www.umldesigner.org/ref-doc/umlgen.html

It does seem to be actively developed, unlike modeling.umlgen. The last proper release of modeling.umlgen is from 2015.
Re: Epsilon's automatic generation of code from UML diagrams [message #1815015 is a reply to message #1815014] Tue, 24 September 2019 04:46 Go to previous messageGo to next message
Eclipse UserFriend
I'm thinking you may want something like Alf or fUML, which are based on UML and are made specifically to be executable. A quick Google showed this paper, which talks about an initial integration of these languages with Papyrus:

http://ceur-ws.org/Vol-1560/paper1.pdf

More info in Jordi Cabot's blog post:

https://modeling-languages.com/new-executable-uml-standards-fuml-and-alf/

[Updated on: Tue, 24 September 2019 04:48] by Moderator

Re: Epsilon's automatic generation of code from UML diagrams [message #1815081 is a reply to message #1815015] Wed, 25 September 2019 06:11 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your help, Antonio!

"no activity/sequence diagrams" => It does. I started playing with this tool a couple of days ago.

"you may want something like Alf or fUML" => Yep! The URLs' contents are great! I'll research on them further, the sources sound a bit outdated.

"Epsilon is not a UML tool by itself, but rather the framework that would allow you to build one" => Would it be possible to use Epsilon to build a tool capable of guiding nontechnical users (i.e. UML illiterates) through a modelling framework by prompting them, say, tables and questions in the order they need to be filled in and automatically generating class and sequence and activity diagrams? Would you be aware of any pre-existing tool like this?

Regards,

Clever.
Re: Epsilon's automatic generation of code from UML diagrams [message #1815234 is a reply to message #1815081] Fri, 27 September 2019 12:39 Go to previous messageGo to next message
Eclipse UserFriend
I was referring to the code generators for UML Designer, not the UI itself. Does it generate code from activity diagrams, then? Just wondering.

I'm not aware of any sort of dialog-based UML design tool, to be honest :-).
Re: Epsilon's automatic generation of code from UML diagrams [message #1815294 is a reply to message #1815234] Sun, 29 September 2019 22:57 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your reply, Antonio!

"Does it generate code from activity diagrams, then?" => In principle, we can generate code on UMLGen from diagrams (class and activity and sequence) built on UML Designer, I haven't tried it yet though...

"I'm not aware of any sort of dialog-based UML design tool" => Do you think Epsilon could be used to built such a tool?

Regards,

Clever.


Re: Epsilon's automatic generation of code from UML diagrams [message #1815350 is a reply to message #1815294] Tue, 01 October 2019 05:23 Go to previous messageGo to next message
Eclipse UserFriend
Let me know how it works out with UML Designer - always happy to see better tools being brought to the MDE space :-).

Epsilon has a language (the Epsilon Wizard Language) which allows users to create "wizards" that can be invoked on a model. The wizards are essentially EOL code that manipulates the currently open model, and EOL has operations for user input (confirm, choice, text/integer input). You could create a set of EWL scripts that ask some questions that fill in the current model, perhaps?
Re: Epsilon's automatic generation of code from UML diagrams [message #1815384 is a reply to message #1815350] Wed, 02 October 2019 00:35 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your reply, Antonio!

"Let me know how it works out with UML Designer" => Sure! It'll take some time though...

""wizards" that can be invoked on a model" => Actually, there wouldn't be any model to invoke such "wizards"...These "wizards" would create a model, is it okay? By the way, when you say model, can I understand model=diagram (class or activity or sequence UML diagrams)?

Would you have any illustrative document/video I could have a look at as an example?

Regards,

Clever.
Re: Epsilon's automatic generation of code from UML diagrams [message #1815400 is a reply to message #1815384] Wed, 02 October 2019 06:01 Go to previous message
Eclipse UserFriend
Hi Clever,

You could have a regular Eclipse wizard (File > New...) that creates an empty model, and then have EWL wizards that help populate details.

We have a screencast on EWL here:

https://www.youtube.com/watch?v=BmwYhgrZAJ0

A UML model can cover one or more diagrams. For instance, you may reuse the same UML classes in multiple UML class diagrams.

Kind regards,
Antonio
Previous Topic:Having problems with a Hello World for InMemoryEmfModel
Next Topic:Creating EmfModel instance from Java objects instead of loading from file
Goto Forum:
  


Current Time: Sun Nov 09 17:47:56 EST 2025

Powered by FUDForum. Page generated in 0.06692 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top