Join GitHub today
The Mappings Language
The mappings language is intended to be used for maintaining elements of models of two modelling language consistent by defining so called mappings. These mappings specify metaclasses and conditions in a mostly enforcement-agnostic and bidirectional way. It is, however, possible to specify explicitly how conditions should be enforced or what should be enforced in which direction.
The overall semantics of a mapping is that all instances of the mapped metaclasses are to be checked after every change in any model of one modelling language in order to enforce conditions in models of the other modelling language.
A research prototype for the mappings language compiler is currently developed in the mappingsLanguage branch of the Vitruv-Framework github repository.
Further explanations of the concepts and goals of the mappings language can be found in chapter 7 of a PhD thesis.
First, get a clean new Eclipse Oxygen DSL Edition and install the following features from the Vitruvius update site:
- Vitruv Consistency Specification DSLs
- Vitruv Core Framework
- Vitruv Extension DSLs Runtime
(Its recommended to always also install the "Developer Resources" features which give you the source code in addition to the byte code :-)
Next, install the two metamodels that are used for testing the mappings language from the SDQ DemoMetamodels update site.
Finally, clone the Vitruv-Framework repo and checkout the mappingsLanguage branch. Import the following projects into your workspace:
- All projects with a name that starts with "tools.vitruv.dsls.mappings" (take care of the last s, without it you get an old prototype of the language)
- All projects with a name that starts with "tools.vitruv.dsls.mirbase"
- The two demo domain projects "tools.vitruv.demo.domains.addresses" and "tools.vitruv.demo.domains.recipients"
- The project with the platform code that is used by code generated for mappings: "tools.vitruv.extensions.dslsruntime.mappings"
To test you changes to the mappings language, start a new Eclipse from your first Eclipse (Debug Configurations ...) and import the following projects into the workspace of this second Eclipse:
Run or debug the "AddressesXRecipientsTestSuite" as a JUnit Plug-In Test. All tests should always pass!
Reintegrating Previous Work
To reintegrate the bidirectionalization technique for the previous mapping language prototype, which was presented in a paper and a technical report, you have to reuse the code of a branch of the old svn repository.