Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » C code generation in Papyrus(Is there a C code generator for state machine, activity etc.?)
C code generation in Papyrus [message #1644620] Mon, 02 March 2015 05:07 Go to next message
Abhijit Deshpande is currently offline Abhijit DeshpandeFriend
Messages: 11
Registered: December 2014
Junior Member
Hi,

Is there any code generator, which can generate C code from state machine, activity, BDD and IBD?

I tried "Block -> right click -> Code generation -> Generate C++ code" (I think this is Acceleo code generator) as well as Qompass code generator. But, in both cases only C++ class declarations (empty => i.e. without any behavior) are getting generated.

So, the question is whether there is any C/C++ code generator, which can generate code for model behavior described using state machine, activity diagram etc.?

BTW, for code generation exercise, I used counter example which is available at https://wiki.eclipse.org/Papyrus/UserGuide/ModelExecution. and, even though I could execute this model using "Moka", I could not generate C code for the same.

Thanks,
Abhijit
Re: C code generation in Papyrus [message #1645458 is a reply to message #1644620] Mon, 02 March 2015 14:21 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

Hi Abhijit,

Although not yet released, the code generator for the Papyrus for Real Time proposed project under Papyrus will (actually can right now with the development version...) generate C++ code from state machine. We do not, however, generate C code, although I suspect the content of the generated C++ classes could be extracted and run as part of a C program.

/Charles


/Charles Rivet
Re: C code generation in Papyrus [message #1645601 is a reply to message #1645458] Mon, 02 March 2015 15:47 Go to previous messageGo to next message
Stephen Blackwell is currently offline Stephen BlackwellFriend
Messages: 138
Registered: March 2014
Senior Member
My understanding is that code generation for state machines will be released for the next major Eclipse release (Mars?) scheduled for June.
I have also heard that some alpha code might be released before that but I haven't heard of or seen any.

Note that this code will not support the full state machine functionality. In particular, parallel states will not be supported.

I have no inside knowledge, this information is my just my understanding from messages I have seen on this forum and could easily be outdated or just plain wrong.
Steve
Re: C code generation in Papyrus [message #1648909 is a reply to message #1645601] Wed, 04 March 2015 04:34 Go to previous messageGo to next message
Charles Rivet is currently offline Charles RivetFriend
Messages: 219
Registered: May 2014
Location: Canada
Senior Member

Hi Steve,

I actually demoed the Papyrus for Real Time state-machine code generation at EclipseCon Europe 2014 and will be doing so again at EclipseCon NA 2015.

Hopefully, the project will get approved and we will be able to have something as part of Mars.

And indeed, the pattern we have currently implemented does not support parallel states (it is restricted to one region per state). There are others working on other patterns, although I do not know if parallel states is one of them, but it is doubtful that they would be ready in time for Mars.


/Charles Rivet
Re: C code generation in Papyrus [message #1767180 is a reply to message #1648909] Mon, 03 July 2017 09:09 Go to previous messageGo to next message
Eric Mouchel La Fosse is currently offline Eric Mouchel La FosseFriend
Messages: 2
Registered: June 2017
Junior Member
Hi Charles,

Is papyrus for RT now mature enough to generate C code for industrial application ? I see it is still in incubation, do you know the timeline for productization quality ?


Best Regards,
Eric
Re: C code generation in Papyrus [message #1767205 is a reply to message #1767180] Mon, 03 July 2017 14:32 Go to previous message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 461
Registered: March 2011
Location: Paris Saclay, France
Senior Member
Hi Eric,

yes, the Papyrus-RT code generation is mature enough, but it will generate C++ rather than C code.

A potential alternative for C++ code generation is the Papyrus SW designer. SW designer has a C code generator as well, but the latter is not well tested and therefore not part of the build yet.
Previous Topic:How to make an instance specification of a structured datatype in an UML profile
Next Topic:edit text box doesn't work
Goto Forum:
  


Current Time: Sat Apr 20 02:50:28 GMT 2024

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

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

Back to the top