Code Generation from Yakindu Solidity IDE

191 views
Skip to first unread message

Victor Cook

unread,
Feb 22, 2018, 12:42:16 PM2/22/18
to YAKINDU User
Hello Yakinduers!

I would like to generate output from the Yakindu Solidity IDE.  The output will not necessarily be code in a "target language", but will be more along the lines of static program analysis.  As such it will be a similar process to code generation, but will not be compiled and run.   

It would be ideal also to regenerate the output automatically when a change is made to the source file.   This is how Xtext works for Domain Specific Languages when generating code launched as an Eclipse Runtime Application.  

Here is my progress so far:  I have setup a small subset of the Solidity grammar in a separate Xtext project that has code generation already working.  However, when I include the full Solidity grammar, there are hundreds of linker and resolution errors.  I tried to install Yakindu Solidity IDE (which I have running on a different computer) to the same environment as the Xtext project, hoping to resolve the errors.  Sadly there are incompatibilities with the SCT tools and Xtext that I am using now and the full Yakindu Solidity IDE configuration.   See attached file that shows the conflicts.

The point of this post is not to solve all the issues between Xtext base installs and the custom Yakindu Solidity IDE.   I would rather work directly with the Yakindu Solidity IDE anyway.  
But I need it to generate output!  

Any advice on how to proceed would be appreciated.  

Note:  My overall project is research into smart contract program correctness and security.  I plan to contribute the resulting static program analysis tools to become part of the Yakindu IDE. 

Yours truly,

Victor Cook


conflict in Xtext.png

andreas

unread,
Feb 26, 2018, 5:20:29 AM2/26/18
to yakind...@googlegroups.com
Hi Victor,

great to hear that you are working with the YAKINDU Solidity IDE and that you want to contribute!

The YAKINDU Solidity IDE reuses the expressions DSL from YAKINDU Statechart Tools, I think this is why you get such a bunch of errors.
To put it together I recommend to check out the latest master of Yakindu SCT and the Solidity IDE.

1. Download latest Eclipse Oxygen and install Xtext 2.13.
2. Clone our Statechart Tools Git repository from here:
https://github.com/Yakindu/statecharts
3 Import the following 4 projects in your workspace:
 - org.yakindu.base.expressions
 - org.yakindu.base.expressions.ui
 - org.yakindu.base.types
 - org.yakindu.base.xtext.utils.jface
4. Generate Expressions.xtext language
5. Clone the YAKINDU Solidity Repository
6. Import all Projects
7. Generate Solidity.xtext language
8. Open com.yakindu.solidity.target / Oxygen.target / resolve it and set as target platform.

After those steps you should have a workspace without compile errors.

Sorry that this is a bit awkward to setup, an oomph setup for this would be nice....

Best,

Andreas





--
You received this message because you are subscribed to the Google Groups "YAKINDU User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yakindu-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Mit freundlichen Grüßen,

            Andreas Mülder

Victor Cook

unread,
Feb 27, 2018, 4:49:15 AM2/27/18
to YAKINDU User
Andreas,

I have bad news.  Not only does this fix not work, but the standard plugin install and the developer install are broken.  Something changed and the Yakindu plugin is no longer compatible with the base Eclipse install.  I have tried multiple times these instructions:

Download & Installation

In addition to the source code provided here on GitHub we also provide ready-to-use builds for Windows (Linux and OS X is under construction) along with an Eclipse update site. If you just want to use YAKINDU Solidity IDE we strongly recommend to go this way.

Download a package from our download page: https://info.itemis.com/yakindu/solidity/download/

Or install via update site into latest Eclipse: https://updates.yakindu.com/solidity/milestones


I, and better java developers than myself on my team have also tried multiple times these instructions.   They result in a broken install that does not work.   Over 1400 errors.


How to setup your developer workspace

  1. Download Eclipse Oxygen from https://www.eclipse.org/downloads/
  2. Install the current Xtext release: Help / Install new Software / select 'Oxygen - http://download.eclipse.org/releases/oxygen' / Select Modeling / Xtext Complete SDK
  3. Clone this Git Repo: Activate the Git perspective and clone the following Git Repository: https://github.com/Yakindu/solidity-ide.git / Select 'Import projects' on the 'working directory' subfolder
  4. Set target platform: Open the target file in project com.yakindu.solidity.target / click on the link to set the target platform (takes some minutes the first time)
  5. Build Xtext grammar: Right click on com.yakindu.solidity.GenerateSolidity.mwe2 => Run As.. => MWE2 Workflow
To unsubscribe from this group and stop receiving emails from it, send an email to yakindu-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Victor Cook

unread,
Feb 27, 2018, 5:21:40 AM2/27/18
to YAKINDU User
Correction:   Solidity IDE will run if the new projects are included, as per Andreas' instructions.   Be careful not to include any other projects, they will give errors that are unrelated.

The best news is that the code generation works right out of the box now.  Thank you Andreas!

However the installation instructions do not work as shown below and might frustrate a lot of users of this excellent (Beta) product.

----------------- Issue Closed, Thank you -------------

andreas

unread,
Feb 27, 2018, 6:53:25 AM2/27/18
to yakind...@googlegroups.com
Hi Victor,

great to hear that it is working now!
I will fix the installation instructions so that it will work to get SCT via the target platform definition file instead of cloning the SCT repository.
Feel free to raise an issue on github!

Best,

Andreas


To unsubscribe from this group and stop receiving emails from it, send an email to yakindu-user+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages