Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

MoDisco/Components/Composition/Architecture

< MoDisco‎ | Components‎ | Composition
Revision as of 01:56, 15 February 2010 by Unnamed Poltroon (Talk) (fix "Unordered lists")

MoDisco
Website
Download
Community
Mailing ListForums
Bugzilla
Open
Help Wanted
Bug Day
Contribute
Browse SourceProject Set File

Requirements

In this document, we use this terms:

  • composing model: a group of models,
  • composed model: a member of the group of models.

Functional requirements

We need a mechanism to achieve these goals:

  • R1. a composing model groups several models together using model element level links
  • R2. a composing model establishes links between elements of these models
    • 1. links can have different arities
    • 2. links can be considered as elements.
    • 3. links can have sub links.
  • R3. a composing model remain the composed models unchanged
  • R4. a composing model remain the metamodels of the composed models unchanged
  • R5. a composing model is a model describing which models are in the group and which model elements are linked
    • 1. a composing model contains links between model elements
  • R6. a composing model conforms to a meta-model.
    • 1. the metamodel of the composing model defines the meta-links between the meta-classes.
    • 2. each link contained in the composing model conforms to a metalink defined by a metamodel
  • R7. a composed model can be a composing model

As we need to add links starting from elements of the composed metamodels without changing these metamodels, we need :

  • R8. virtual reference which can be added to composed models to be able to navigate links in the opposite way

Our approach is to create, in a new metamodel (the composing metamodel), elements which could be interpreted as additional links between metaclasses of other metamodels (the composed metamodels). Because in the majority of cases, the referred models are conforms to meta-models that have not been designed to be referred. We then need a mechanism to add “virtual” references to the referred meta-models. We need a "virtual add" because referred meta-model can’t be modified in most use cases. And the use of bidirectional references is not recommended to avoid cycle problems.

  • R9. The "virtual" references between model elements should conform to "virtual" links between metaclasses. These "virtual" references, contained in the composing model, should hold all the information required to find the source and the target elements in the composed models.

Non functional requirements

  • R10. To be usable by transformation and generation engine based on EMF.

Functional specification

Composing Model

MoDosco ComposingModel meta-model.png

Figure 1 - ComposingModel meta-model

If ComposingModel is kind of Model, this imply that MetaComposingModel is a kind of MetaModel.

Model element to model element links

In the meta-model presented on Figure 2, the class “Link” corresponds to the "link" concept (R2) and the LinkEnd is used to represent the "different arities" (R2.1). The LinkType class corresponds to the link typing (R6.2). The subLinks reference allows a link to have sub links (R2.3).

ComposingModel’s attribute named “referredModels” is a derived attribute (self.referredModels = self.links->collect(e|e.linksEnds->collect(f|f.referes.eContainer()))).

MoDosco Link meta-model.png

Figure 2 - Link meta-model

The Figure 3 presents the meta-model completed by the following items:

  • a link is a kind of ModelElement (R2.2)
  • a LinkType is a kind of MetaClass ;

MoDosco Main functional class diagram.png

Figure 3 – Main functional class diagram

Summary

Requirement Realization
R1 a composing model groups several models together using model element level links ComposingModel::/referredModels
R2 a composing model establishes links between elements of these models ComposingModel::/links
R2.1 links can have different arities Link::linkEnds [1..*]
R2.2 links can be considered as elements. Link extends ModelElement
R2.3 links can have sub links. Link::subLinks
R3 a composing model remain the composed models unchanged LinkEnd::refers has not any opposite. ComposingModel::/referredModels has not any opposite.
R4 a composing model remain the metamodels of the composed models unchanged LinkEndType::type has not any opposite. MetaComposingModel::/referredMetaModels has not any opposite.
R5 a composing model is a model describing which models are in the group and which model elements are linked ComposingModel extends Model, ComposingModel::/referredModels, ComposingModel::/links
R5.1 a composing model contains links between model elements ComposingModel::/links
R6 a composing model conforms to a meta-model. ComposingModel extends Model. MetaComposingModel extends MetaModel. Model::conforms_to : MetaModel
R6.1 the metamodel of the composing model defines the meta-links between the meta-classes. MetaComposingModel extends MetaModel. LinkType extends MetaClass. MetaModel::metaClasses : MetaClass
R7 a composed model can be a composing model ComposingModel extends Model
R8 virtual reference which can be added to composed models to be able to navigate links in the opposite way VirtualOppositeRef::getLinkedElements(ModelElement)
R9 The “virtual” references between model elements should conform to “virtual” links between metaclasses. These “virtual” references, contained in the composing model, should hold all the information required to find the source and the target elements in the composed models. VirtualOppositeRef, VirtualOppositeRef::opposite1, VirtualOppositeRef::opposite2, MetaComposingModel::virtualOppositeReference

Back to the top