This repository provides the prototypical implementation for the change extraction, change propagation, incremental model update, and adaptive instrumentation of the CIPM approach.
Note: a new setup method is currently in development. Therefore, some configurations are not supported yet or can cause issues.
This project requires Java 11 for all actions. In particular, if a script is executed in the following, it usually uses Maven to build projects. As a result, the JAVA_HOME
environment variable must be set pointing to a JDK 11 (also the top-level JDK directory, not the bin
folder so that Maven can find the Java executable in %JAVA_HOME%\bin\java.exe
). Additionally, a script must be executed from the top-level directory of the repository (and not within the scripts
directory).
When executing one the scripts, it is possible that the error Internal error: java.lang.IllegalArgumentException: bundleLocation not found: [home]/.m2/[...]
occurs. In such a case, it can help to delete the file [home]/.m2/repository/.meta/p2-artifacts.properties
and restart the script.
Currently, only Windows is supported.
To build the complete project for the first time, the script scripts/build.bat
needs to be executed. Subsequent builds can be executed with the script scripts/rebuild.bat
.
If a complete clean build is required, the script scripts/clean.bat
allows to clean the complete repository with all build artifacts and the submodules. Afterwards, the script scripts/build.bat
can be executed again.
The following steps are recommended to setup the project for development within Eclipse. As a reminder, this project requires Java 11. As Eclipse version, the project currently supports the Eclipse Modeling Tools 2022-09. It requires the installation of Xtext (from the Marketplace), Lombok (from its update site), and Checkstyle (optional, from update site).
-
Execute the
scripts/build.bat
script if it was not executed before. -
After executing the script, all bundles from
commit-based-cipm/bundles/fi
andcommit-based-cipm/releng-dev
can be imported into the Eclipse instance. Thereleng-dev
directory contains the bundlecipm.consistency.targetplatform
with thecipm.consistency.targetplatform.target
file. Within Eclipse, open this file and click onSet as active target platform
. Wait until the target platform is set, loaded, and the plugins are successfully compiled. It is possible that the target platform needs to be reloaded. -
The project requires a second running Eclipse instance. After all plugins in the first instance has been setup, start the provided
SecondInstance
run configuration. It should start the second instance. In the second instance, import all bundles fromcommit-based-cipm/bundles/si
andcommit-based-cipm/tests
. Incipm.consistency.vsum.test
, the test cases should be executable.
The current goal of the build process is to provide a reproducible build. Therefore, dependencies are provided via Eclipse P2 Update Sites with fixed versions or via Git submodules. In particular, the submodules include JaMoPP, SoMoX, and a specialized old Vitruv version. As the submodules only contain source code, they need to be compiled after cloning the repository or if they are cleaned. The build process contains necessary steps to build the submodules.
The artefacts from the submodules are also packaged into local Eclipse P2 Update Sites. Unfortunately, Maven Tycho which is internally used to build the artefacts does not support local Eclipse P2 Update Sites via file paths and require HTTP or HTTPS paths for local Eclipse P2 Update Sites. Thus, a simple update site server which serves the local Eclipse P2 Update Sites is started and stopped during the build process.
The Reactions language from Vitruv detects the meta-models from Vitruv domains. To find the Vitruv domains, the corresponding lookup mechanisms in Eclipse and in the build process require the domain and domain providers to be built and to be on the classpath. As a consequence, a separation between the bundles is performed. The first half of the bundles (located in commit-based-cipm/bundles/fi
, also imported into the first Eclipse instance) contain two domains (one for the instrumentation model and one adjusted domain for Java) so that they are built in a first build step and for the second Eclipse instance. In the second build step and in the second Eclipse instance, the built domains can be found by the Reactions language.
Notes on generating code for Reactions in the build process:
-
The plugin containing Reactions requires a
.maven_enable_dsls-generation
file in the plugin directory (the[plugin name]
directory, not[plugin name]/src
). -
Furthermore, all classes or methods imported within a Reactiosn file cannot be located in the same plugin as the Reactions. They need to be in separated plugins.
The manual to execute the pipeline with TeaStore or TEAMMATES can be found here. Reference PCM repository models for these executions can be found here.