-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation plug-in for the Ale meta-programming approach in GEMOC Studio #34
Conversation
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
CI job for verification: https://ci.eclipse.org/gemoc/job/gemoc-studio-integration/job/Kairides-metaprog/ |
Apparently there is something wrong in the pom.xml declarations
|
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
Changed the artifactId, hope that will be enough. |
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
I realized I made a mistake when I changed the artifactId, it is now fixed so it should point to the correct parent: org.eclipse.gemoc.ale.interpreted.engine.plugins |
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
Apparently there is still something wrong in the build/deployment of your plugin (https://ci.eclipse.org/gemoc/job/gemoc-studio-integration/job/Kairides-metaprog/8/console):
To help you fix it, you can try to compile the studio locally following the instructions here : https://github.com/eclipse/gemoc-studio/tree/master/dev_support/full_compilation (which launch this script: https://github.com/eclipse/gemoc-studio/blob/master/dev_support/full_compilation/docker/scripts/build_gemoc.sh ) I recommend ignoring system tests since they are quite long. And focus on making sure that the studio builds correctly. (in the following command, it builds only the linux package using the
Additionally, once you have completed one full build, the |
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
I have corrected the plugin's ID but I have a hard time running builds. |
Signed-off-by: Ronan Guéguen <gueguen.ronan1@gmail.com>
We got a successful build in the CI. |
} | ||
|
||
if(!tagNames.contains("init")) { | ||
return (new Message("The Ale file does not contain an \"@init\" operation", Severity.ERROR)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think @init is mandatory
it is just "convenient"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You think a warning or an information would be more appropriate ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A warning should be OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the same goes for the K3 engine ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes ;-)
Signed-off by Ronan Guéguen <gueguen.ronan1@gmail.com>
I changed the severity for the check on the @init tag but sadly I messed up the commit's signature. |
To perform validation on a DSL written in Ale during its creation, we have created an extension point allowing other plug-ins, such as this validation plug-in, to add validation rules to the DslValidator.
The validation plug-in for the Ale meta-programming approach contributes to the extension point from the validation plug-in in the GEMOC Studio. To contribute to the extension point, the Ale validation plug-in has to implement the IRuleProvider from the GEMOC validation plug-in and get a name to be easily distinguishable from another validation plug-in and used as the value of the "metaprog" entry.
The plug-in implements the interface IRuleProvider through the class AleRuleProvider, a class AleRule implementing the interface IRule is used for validation in the dsl as well as the EcoreRule, provided by the GEMOC plug-in, are used in this RuleProvider since the meta-programming approach uses an Ecore model.
The validation plug-in performs various validations , such as checking for the presence of an "ale" entry in the dsl file
checking for the presence of an "ecore" entry since the RuleProvider uses the EcoreRule
and checking for the presence of methods tagged "@main" and "@init" in the ale file.
Signed-off by Ronan Guéguen gueguen.ronan1@gmail.com