Bug 490668 - Add support for multiple domain classes
Summary: Add support for multiple domain classes
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-03-30 05:19 EDT by Pierre-Charles David CLA
Modified: 2016-04-01 10:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2016-03-30 05:19:46 EDT
In the VSM specification language, mappings and representation description have a "Domain Class" attribute which indicates the type of semantic elements they represent.

In practice the Sirius language is flexible enough to often allow a single representation and/or mapping to work for different concrete types, as long as they share the same structural features that are actually used by the representation (in the sense of "duck typing", not necessarily subtyping). In such a case, e.g. a node mapping that would work fine for either type A or B, if types A and B are not related, one has to either create two separate mappings or declare a more general common supertype (in the worst case, ecore.EObject), losing the benefits of static validation of expressions.

Maybe the "Domain Class" attribute could be extended to allow multiple values, resulting in a "union type" (something already handled by AQL for example).