Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » newbie: seeking advice in toolchain selection
newbie: seeking advice in toolchain selection [message #1766757] Mon, 26 June 2017 22:23 Go to next message
David BlackFriend
Messages: 33
Registered: June 2017
Member
Hi everyone,

this is my first time here, so greetings to every forum member.

I am looking for advice in selectin the right toolchain for the job. I must confess that, after 2 days browsing throughout papers and documentation on several Eclipse Modelling tools and frameworks, I am afraid I've come across more dilemmas than conclusions. That's why I seek your guidance.

My basic bussiness case is this:

r1) Get (or write) a context-free grammar for my general purpose language, say "L"
r2) Generate a parser for L, together with some basic tooling around him (editor with syntax highlight, static checking, etc)
r3) Generate a bytecode compiler for it, with the JVM as debugger;

Now, the constraints:

c1)In the future, I want to apply some formal verification.
c2)At the moment, I strongly need a framework for rapid prototyping. My demonstration stage will be soon and I need an iterative approach that will show working (somehow) results as soon as possible, not needing to be state-of-the-art stuff.

Here is my brainstorming results so far:

-As for c1, I imagine the following scenario: I will have something like a meta-model language, say "MM". I will use that meta-model to describe both the language L and the JVM bytecode in it. Then I will implement the following transformation:

L ---[parsing, semantics]---> MM ---[semantics,code generation] ---> JVM bytecode

And I could apply formal verification methods to both the [parsing, semantics] and the [semantics,code gen] steps.

-As for c2), I have been examining several toolchains and frameworks (XText, Melange, Kermeta, etc) but most of them seem to be only a partial solution and I don't know what will be the best selection of tools so that they will integrate with minimum effort.

So far, I have chosen XText to write my context-free grammar and generate the parsing tools. But still i don't know how to implement the rest of the transformation chain.

Any advice about toolchain options and strategies will be much appreciated!

Regards,

David
Re: newbie: seeking advice in toolchain selection [message #1766906 is a reply to message #1766757] Wed, 28 June 2017 16:43 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6111
Registered: July 2009
Senior Member
Hi

Xtext is a good choice although there are now plausible competitors. However IMHO opinion Xtext lacks formality, so for OCL I use a preliminary Xtext2LPG conversion to check the grammar with an LALR tool.

Xtext will maintain the grammar and generate the parser. Depending on the complexity of your language you may be able to use its generator capabilities too. Follow the tutorials. For more complex generation you may want custom Java or an M2M.

Again depending on complexity, Xtext may also be used to autogenerate your metamodel from the grammar. I prefer to define my metamodels manually.

Regards

Ed Willink
Re: newbie: seeking advice in toolchain selection [message #1767045 is a reply to message #1766906] Fri, 30 June 2017 00:05 Go to previous messageGo to next message
David BlackFriend
Messages: 33
Registered: June 2017
Member
Hi Ed,

thanks for the reply.

It's my mistake that the question is on two forums. A couple of days passed since I submitted my first post without it being published, so I assumed it had been discarded by a moderator. I thought the reason might have been me posting on the wrong forum, so I decided to go try again on a different forum. Today I've just realized both my two posts got published. My mistake.

As for the subject: I still do not grasp the whole transformation chain provided by XText. Anyway, I decided to go with it and try make a prototype. Then I will (hopefully) gain some insight into XText's model-2-code process. At the moment I am struggling with writing a grammar. It's turning to be less straightforward than I expected.

About meta-models and the m2m step, the meta-model I need is a semantic one, something like the K2 framework. Then I need to express the L model and the JVM model within it. Am I wrong, or Xtext-generated models are not at all generic enough for such goal?

But I digress. Thanks for the comment. I will post my final solution once I got it.

Cheers
Re: newbie: seeking advice in toolchain selection [message #1767054 is a reply to message #1767045] Fri, 30 June 2017 05:51 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6111
Registered: July 2009
Senior Member
Hi

[The forums are very unsatisfactory. Now that the newsgroup has been discontinued we look forward to something better than FUDforum. Most committers use the newsgroups so that messages appeared in a mail client such as Thunderbird. I now use the RSS feed. However that too is unsatisfactory. Sometimes notifications are delayed for days, as appears to have happened to your first message which appeared at almost the same time as your second.]

'Semantics' is a huge area and I am not aware of any tool that really supports what I call semantic modeling so I cannot understand your comments. Not sure what you mean by K2 and I'm really dubious about a JVM model; it seems that you want to bypass rather than exploit Java tooling. I suggest that you follow an Xtext tutorial and use it for a few simple purposes so that you can rethink your ideas in a more conventional and compatible fashion.

Regards

Ed Willink
Previous Topic:news.eclipse.org is shutting down.
Next Topic:XText alternatives for DSL-2-JVM chain
Goto Forum:
  


Current Time: Sun Nov 18 15:04:59 GMT 2018

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

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

Back to the top