modelsconf2018 / artifact-evaluation

2 stars 6 forks source link

[boronat] Internal DSL of Xtend #16

Open grammarware opened 6 years ago

grammarware commented 6 years ago

Submitted by @arturboronat to https://github.com/modelsconf2018/artifact-evaluation/tree/master/boronat

Paper: https://yamtl.github.io/pubs/models18.pdf

grammarware commented 6 years ago

(Sorry, misclick on the un/assignment — don't mind me)

grammarware commented 6 years ago

One of our reviewers is having trouble with the importing the Gradle Project properly. When following the instructions, all export-packages and the bundle org.eclipse.emf.ecore.xcore.lib cannot be resolved. The resulting errors look like this:

We’d be glad to have some feedback, such that we can give it another try. Thanks in advance @arturboronat!

arturboronat commented 6 years ago

There are residual dependencies to CPS domain models in the project yamtl.examples.mapping.batch.cd2db. These are not needed in this project.

I have committed and pushed the changes to the project on GitHub (in repository https://github.com/yamtl/examples). Please pull it or fix it as follows:

  1. Open yamtl.examples.mapping.batch.cd2db/META-INF/MANIFEST.MF
  2. Go to tab Dependencies
  3. Remove the following dependencies
    • org.eclipse.emf.ecore.xcore.lib
    • org.eclipse.viatra.examples.cps.deployment
    • org.eclipse.viatra.examples.cps.model
  4. Go to tab Runtime and remove the following Exported Packages
org.eclipse.viatra.examples.cps.cyberPhysicalSystem,
 org.eclipse.viatra.examples.cps.cyberPhysicalSystem.impl,
 org.eclipse.viatra.examples.cps.cyberPhysicalSystem.util,
 org.eclipse.viatra.examples.cps.deployment,
 org.eclipse.viatra.examples.cps.deployment.impl,
 org.eclipse.viatra.examples.cps.deployment.util,
 org.eclipse.viatra.examples.cps.traceability,
 org.eclipse.viatra.examples.cps.traceability.impl,
 org.eclipse.viatra.examples.cps.traceability.util
  1. Go to tab Extensions and remove the extensions corresponding to:

    • DeploymentPackage
    • CyberphysicalSystemPackage 
    • TraceabilityPackage 
  2. Go to tab MANIFEST.MF and remove from Export-Package (if not done automatically by the plugin editor):

org.eclipse.viatra.examples.cps.deployment,
org.eclipse.viatra.examples.cps.deployment.impl,
org.eclipse.viatra.examples.cps.deployment.util,
org.eclipse.viatra.examples.cps.cyberPhysicalSystem,
org.eclipse.viatra.examples.cps.cyberPhysicalSystem.impl,
org.eclipse.viatra.examples.cps.cyberPhysicalSystem.util,
org.eclipse.viatra.examples.cps.traceability,
org.eclipse.viatra.examples.cps.traceability.impl,
org.eclipse.viatra.examples.cps.traceability.util

Let me know if this fixes the problem. Best regards.

NilsWeidmann commented 6 years ago

Unfortunately, most of the errors remain:

grafik

I already tried out removing the other dependencies from the Manifest, but this (unsurprisingly) did not solve the problem.

arturboronat commented 6 years ago

The problem seems the configuration of the classpath, Eclipse JDT is not finding where those classes are declared.

I'm assuming that you have followed the installation instructions as explained in

https://github.com/yamtl/examples/tree/master/yamtl.examples.mapping.batch.cd2db

Note that it is important to use Gradle to import the project. Gradle Buildship can be used for this or it can be done from command line using ./gradlew clean cleanEclipse eclipse (then you need to refresh the project in Eclipse). Please do not use the basic Import project wizard in Eclipse as Gradle needs to do some work configuring the project.

If the above is done correctly, continue reading.

Although the code is already generated, and it should have worked, we can try to re-generate it.

Please do as follows:

  1. Pull from the repository: the model directory path has been updated in the files CD.genmodel and Relational.genmodel under src/main/resources.
    • If you have made changes, you will have to resolve conflicts or simply clone the repository from scratch.
  2. Open the files mentioned above, right click on the root element and Generate Model Code only.

Let me know if the any of the above solves the problem.

NilsWeidmann commented 6 years ago

That solved the problem, thank you!!

NilsWeidmann commented 6 years ago

Sorry for bothering you again, but the other example project doesn't work for me yet. Re-generation of the .genmodel files already solved most of the problems there as well, but some still remain:

grafik

Can you suggest a quick fix? Thank you!

arturboronat commented 6 years ago

The problem is with the Xtend annotation \@Accessors. This is an indication that the project is not configured properly.

This project is also configured using Gradle as explained in this page:

https://github.com/yamtl/examples/tree/master/yamtl.examples.mapping.batch.cps2dep

Please use either:

Note that this project requires the plugin CPS benchmark domain models (available from this update site: http://download.eclipse.org/viatra/examples/cps). This should avoid the need for re-generating code.

I'm going to prepare a fat jar with all that is required for running the example so that there is no need to rely on maven dependencies, but it should work.

NilsWeidmann commented 6 years ago

Well, I strictly followed the guidelines on https://github.com/yamtl/examples/tree/master/yamtl.examples.mapping.batch.cps2dep, so Gradle Buildship and CPS were already installed. Unfortunately, a Gradle refresh and opening/closing the project didn't have any effect.

arturboronat commented 6 years ago

The project is now configured with a fat jar and available on the repository:

https://github.com/yamtl/examples

Please pull from the repo and merge changes. Then import it into Eclipse using Gradle as explained above.

The other project cd2db can be configured similarly with the fat jar that has been made available in yamtl.examples.mapping.batch.cps2dep/lib/yamtl-all-0.0.1-SNAPSHOT.jar.

arturboronat commented 6 years ago

A follow-up:

Under Eclipse Oxygen (as in the instructions)

I'm afraid the CPS demonstrator depends on the VIATRA SDK. Apologies for this (I updated the readme.md file). Install Viatra Query and Transformation SDK 1.7.2 from the Oxygen update site

To enable the annotation @Accessors, add the following dependency in the build.gradle file:

compile "org.eclipse.xtend:org.eclipse.xtend.lib.macro:2.13.0" as shown here

Under Eclipse Photon

I downloaded a fresh Eclipse Photon (Eclipse IDE for Java and DSL Developers), latest version: R. This comes with Gradle Buildship and Xtext SDK 2.14.0.

Here I encountered the problems that you are reporting, both in code re-generation and with the annotation @Accessors:

compile "org.eclipse.xtend:org.eclipse.xtend.lib.macro:2.14.0" as above

Hope this helps.

NilsWeidmann commented 6 years ago

For me it works by now! Part of the solution for me was also to update Xtext and Xtend. I don't know which component was problematic, so I list everything which is installed in my Eclipse Oxygen:

Xtend IDE | 2.14.0.v20180523-0937 Xbase Library | 2.14.0.v20180522-1631 Xtext UI | 2.14.0.v20180523-0937 Xtext Runtime | 2.14.0.v20180523-0937 Xtend Library for GWT | 2.10.0.v201605250459 Xtext GWT Library | 2.10.0.v201605250459 Xtext Complete SDK | 2.14.0.v20180523-0937 MWE 2 language SDK | 2.9.1.201705291011 MWE 2 runtime SDK | 2.9.1.201705291011 MWE2 Launcher | 2.9.1.201705291011 MWE2 Launcher Developer Resources | 2.9.1.201705291011 Xbase | 2.14.0.v20180523-0937 Xtext Documentation | 2.14.0.v20180523-0937 Xtext Examples | 2.14.0.v20180523-0937 Xtext Redistributable | 2.14.0.v20180523-0937 Xtext Xtext UI | 2.14.0.v20180523-0937

arturboronat commented 6 years ago

Glad to hear that! Thanks!

stsauer commented 6 years ago

Acknowledgement: This assessment has been substantially supported by @NilsWeidmann

Summary The authors provide artefacts for the implementation of an approach in which a new DSL of Xtend is specified for declarative model transformation. The transformation engine is compared to others within the scenario oft he VIATRA CPS benchmark.

Is the artefact consistent with the paper? Yes, the artefact is consistent with the paper.

Is the artefact as complete as possible? Yes, the artefact is as complete as possible. The projects for the three examples and the benchmark tests are provided. However, the benchmark project couldn’t be reviewed due to time reasons.

Is the artefact well-documented? The artefact is in general well-documented. There are some small issues that I suggest the authors to fix:

Is the artefact easy to (re)use? At the point when the build succeeded, the execution of test examples was straight-forward. We used Eclipse Oxygen on Windows 10 only, so we cannot comment on the behavior on other platforms. All files were generated as described in the instructions when executing the respective Runners. However, an IndexOutOfBoundsException occurred when executing „Runner_incr_delta2“ which is probably caused by a wrong input model and does not question the general functionality of the application.

As mentioned in Question 2, due to unexpected installation effort, the time frame was not sufficient to test the benchmark project. At this point, Eclipse reports a few hundred errors, while the reasons for those errors are unclear to us. Furthermore, the benchmark is reported to last approximately 24 hours according to the instructions, such that the execution would go beyond the reviewing deadline anyway.

arturboronat commented 6 years ago

First of all, thank you for the time invested in the review and for the improvement suggestions. The latter have been implemented in the documentation already.

Just to comment on the issues encountered:

About Runner_incr_delta

Please note that the project yamtl.examples.mapping.incr.cd2db (with incr and not batch) is not related to this paper, which is about YAMTL batch m2m transformation. Hence, the project yamtl.examples.mapping.incr.cd2db, including Runner_incr_delta's, should be ignored. It is not referenced in the main page:

https://github.com/modelsconf2018/artifact-evaluation/tree/master/boronat

About compilation problems

The project m2m.batch.cps2dep.viatra.eiq needs to be on its own. Please close the other projects and let Eclipse build the workspace.

About timing constraints

One way to check if the benchmark works is by running the script ./runBatchBenchmarks.sh, cancelling the experiments for a given tool after the first iteration with CTRL+C. The execution will proceed with the next tool. This will produce a CSV file for each tool with the data gathered from the first iteration. This should provide some confidence on the executability of the benchmark and should be doable in under 20 minutes.

TheoLeCalvar commented 6 years ago

Summary

The author provided examples of transformations written in a new internal DSL of Xtend, YAMTL. Artifacts consist of implementation of the Viatra CPS benchmark in YAMLT and other transformation languages.

Is the artefact consistent with the paper?

Yes, artifact is consistent with paper.

Is the artefact as complete as possible?

Yes, it is as complete as possible. It contains all transformation benchmarks showcased in the paper. Results presented in the paper appear to be consistent with results I was able to get when running the benchmark on my computer (up to size 128 due to time reasons).

Is the artefact well-documented?

The artifact is globally well documented. The code of the transformation is easy to understand but could benefit from a more consistent style. Especially on the use of parentheses for functions without parameters. For instance in rule declaration, build and header always have parentheses whereas uniqueLazy, lazy, isTransient don’t. Nothing critical here, it is purely esthetical concerns.

However installation instructions could be improved. I share @stsauer position on this point, especially on the instructions (genmode regeneration, gradle setup, …)

Is the artefact easy to (re)use?

Installation proved to be more difficult than anticipated. I first tried to install it on my existing Eclipse Oxygen installation but I had several dependencies issues. Using previous messages in the thread I managed to install everything on a clean Eclipse Photon on Linux.

Once installed it was really easy to use each transformation.

grammarware commented 6 years ago

Dear @arturboronat,

Based on all the comments and the reviews provided by the members of the Artifact Evaluation Committee of MoDELS 2018, we have reached the conclusion that this artifact conforms to the expectations and is hereby approved. Please use the badge instructions page to add the badge of approval to your article, and add the link to the ReMoDD entry with URI http://remodd.org/node/585 to the camera ready version of the paper.

Thank you very much for putting extra effort into the preparation and finalising of the artifact. If any of the comments above are still not addressed, please try to accommodate them before the conference.