PCM Model Migration

Aus SDQ-Wiki

Here we collect information about migrating PCM model instances from one meta model version to another

Manual Migration

3.1 intermediate version to 3.2

Partial update script to migrate pre PCM 3.2 models to PCM 3.2: Datei:PCM intermediate to 3.2 Windows Migration Scripts.zip. Requires sed

You need to manually create ids for some repository entities, and you need to manually update your resourceenvironment if you use linking resources (easiest to delete your old linking resources and create new ones with the EMF editor).

Call the batch scripts for the respective model, e.g.

repository_3.3_migration brs.repository

Save your files before migrating.

If you use this script to update your models, and you detect additional migration aspects, please update the scripts and upload them to the wiki, replacing the old file.

Not covered

Linking resource

You need to delete your old linking resource from the XML file and create it anew using the editors.

failure probability

The old failureProbability attribute of an InternalAction has been changed to become an attribute of a new subelement failureOccurrenceDescriptions. You can add the following to repository_3.3_migration.bat, however, it will not close the XML tag properly.

 sed -i "s/ failureProbability=/>\n<failureOccurrenceDescriptions failureProbability=/g" %1

You have to close the tags manually or edit the regular expression accordingly (I do not know by heart how to do that now). To find the erroneous tags, open your model both with the EMF editor and with a text editor, click create markers in the EMF editor, fix the error in the text editor, save, open the EMF editor again (it should have updated and show one error less), click create markers again etc.

3.2 to nightly build as of 16.04.2011

Datei:PCM 3.2 to nightly Windows Migration Scripts.zip.

  • See above for general explanation.
  • You do not have to specify the file name anymore, it will apply the update to all files with the proper file ending in the current directory
    • Example: Update all repositories in the current folder. Call:
myDir/repository_3.2_to_nightly_migration.bat
  • RequiredDelegationConnectors are not yet covered, please add them if needed and update the scripts here in the Wiki.
  • Maybe you also have to manually add the XML namespace definition xmlns:composition="http://sdq.ipd.uka.de/PalladioComponentModel/Core/Composition/4.0" in the second line of the file manually. If you know how to do this in the script, please update it here in the wiki and remove this note.

3.2 to 3.3

Datei:PCM 3.2 to 3.3 Windows Migration Script.zip

See above for general explanation.

This script handles all PCM model files in the current directory. Possibly not all metamodel changes have been accounted for yet, so some may have to be done manually. Diagrams are not supported yet.

Please make sure to backup your model files before executing the script. If everything has worked out, you can delete the files generated by sed.

To find out whether the models have been successfully migrated after executing the script, validate them by opening the model file (e.g. my.repository), selecting the root node, and choosing "Validate" in the context menu. If there are validation issues remaining, the model file can usually be manually adjusted (open it with a text editor). If there are problems, contact Anne.

If you update the scripts for cases not yet covered, please upload your updated file here and also commit it to Github at https://github.com/PalladioSimulator/Palladio-Example-Models/blob/master/pcm_3.2_to_3.3_migration.bat (or contact Anne if you do not have access).

3.3 to 3.4

No migration needed, just open your 3.3 models in PCM 3.4.

3.5 to 4.0

Detailed migration guide at PCM 4.0#Notes on migrating PCM Models (from PCM 3.5.0 or PCM Nightly)

Need to change URIs of StochasticExpression model to 2.2. Additionally, the PCM Namespace has changed: replace "http://sdq.ipd.uka.de/PalladioComponentModel" with "http://palladiosimulator.org/PalladioComponentModel" in your model files.

Script at https://github.com/PalladioSimulator/Palladio-Example-Models/ (pcm_3.5_to_4.0_migration) (not yet well tested, feel free to adapt it)

4.0 to 4.1

Detailed migration guide at PCM 4.1#Notes on migrating PCM Models (from PCM 4.0.0 or PCM Nightly)

Need to change URIs of PalladioComponentModel to 5.2.

Script at https://github.com/PalladioSimulator/Palladio-Example-Models/ (pcm_4.0_to_4.1_migration) (not yet well tested, feel free to adapt it)

See also

Edapt is a tool to support meta model changes and model migration and has been initially investigated.

A Migration Generator can be used to generate QVT transformations for model migration.