Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 462481

Summary: Leverage type information provided by IInterpreter instances
Product: [Modeling] Sirius Reporter: Cedric Brun <cedric.brun>
Component: CoreAssignee: Cedric Brun <cedric.brun>
Status: CLOSED FIXED QA Contact: Maxime Porhel <maxime.porhel>
Severity: enhancement    
Priority: P3 CC: maxime.porhel, pierre-charles.david
Version: unspecifiedKeywords: triaged
Target Milestone: 3.0.0M7   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/44114
https://git.eclipse.org/r/44268
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=42e2eeba1f01807245db88e33cab22eeb9f812e1
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=1e7e6a56854a7a5ffb813d83c945ca46a15254c5
Whiteboard:
Bug Depends on:    
Bug Blocks: 441767, 462490    

Description Cedric Brun CLA 2015-03-18 12:10:30 EDT
A Viewpoint Specification Model host queries in a collection of languages (ocl, aql, feature, service, ...) each delegating to a specific query evaluation engine (the IInterpreter API in Sirius)

When validating a VSM with Sirius 2.0 and older versions, each time a query is used the next query leveraging the result of the previous one has very litle type information to check for correctness. In essence we quickly fall back to "an EObject".
It lead to "false positives" errors in the Viewpoint Specification model, as by construction Sirius could *know* that the type of some variable is more specific than just EObject.

In the context of a VSM a given variable might have several type definition, $container in a node creation tool for instance, could either be an EPackage or an EClass if it is bound to the corresponding mappings. It is partially there in the current codebase with types being represented as Strings and sometimes collection of Strings.

This bugzilla is about re-ifing in the API the fact that Variable might have several types, and that an IInterpreter is expected to take these possibilities in account when validating a query and *giving back to Sirius the possible return types of the query.

AQL is a query evaluation engine able to analyse queries with several possible types for each variable, hence it makes a lot of sense to improve this situation with the introduction of AQL. 

VariableInterpreter (var:) will also be extended to transmit back the type information given to it at validation time. 

This bugzilla is slightly different from Bug 441767 as its not focused on Acceleo3  , I guess we can consider Bug 441767 is about leveraging the information in the case of Acceleo3.
Comment 1 Eclipse Genie CLA 2015-03-18 12:34:46 EDT
New Gerrit change created: https://git.eclipse.org/r/44114
Comment 2 Eclipse Genie CLA 2015-03-20 12:24:57 EDT
WARNING: this patchset contains 1003 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 3 Eclipse Genie CLA 2015-03-20 12:25:09 EDT
New Gerrit change created: https://git.eclipse.org/r/44268
Comment 4 Eclipse Genie CLA 2015-03-26 13:16:14 EDT
WARNING: this patchset contains 1003 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 5 Eclipse Genie CLA 2015-03-27 16:20:04 EDT
WARNING: this patchset contains 1003 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 6 Eclipse Genie CLA 2015-03-27 17:34:55 EDT
WARNING: this patchset contains 1012 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 7 Eclipse Genie CLA 2015-03-30 07:02:26 EDT
WARNING: this patchset contains 1235 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 8 Eclipse Genie CLA 2015-03-30 11:02:50 EDT
WARNING: this patchset contains 1235 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 9 Eclipse Genie CLA 2015-03-30 12:38:12 EDT
WARNING: this patchset contains 1235 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 10 Eclipse Genie CLA 2015-03-31 04:09:12 EDT
WARNING: this patchset contains 1238 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 11 Eclipse Genie CLA 2015-03-31 10:15:29 EDT
WARNING: this patchset contains 1238 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 12 Eclipse Genie CLA 2015-04-01 03:44:38 EDT
WARNING: this patchset contains 1238 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 15 Cedric Brun CLA 2015-04-20 04:42:55 EDT
We're done here, the type information is correctly passed from an IInterpreter instance to another (even though only var:, feature: and aql: are able to return it).
Comment 16 Maxime Porhel CLA 2015-05-26 08:50:08 EDT
Validated on Sirius 3.0.0 RC1
Comment 17 Pierre-Charles David CLA 2015-06-24 11:17:21 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.