----------------------------------------------------------------------------------- Copyright (c) 2011, ALES S.r.l. - Via C. Bartolomeo Piazza 13, 00161 Roma Italy Developed with the sponsorship of the Defense Advanced Research Projects Agency (DARPA). Delivered to the Government with Unlimited Rights under Contract #FA8650-10-C-7074. THE DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, SPONSORS, DEVELOPERS, CONTRIBUTORS, OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DATA OR THE USE OR OTHER DEALINGS IN THE DATA. ----------------------------------------------------------------------------------- 0. NOTES 0.a Among the source code distribution, only the RpyParser and MetaIIValidator plugins can be run. The remaining plugins depend on software components pre-existing the META II project and require an appropriate license. The full demo will be released in a seperate distribution, together with appropriate license for usage. 0.b The files contained under MetaIIBaseWorkspace\Java\MetaII\Java\com.eu.ales.rpyplugins.lib are pre-existing the META II project and are property of IBM 0.c The files contained under MetaIIBaseWorkspace\Java\MetaII\Java\com.eu.ales.libs.apache and MetaIIBaseWorkspace\Java\MetaII\Java\com.eu.ales.libs.apache.collections are pre-existing the META II project and are distributed under the Apache License 2.0. 0.d The jar files contained under MetaIIBaseWorkspace\Java\MetaII\Java\eclipse are pre-existing the META II project and are distributed under the Eclipse Public License 1.0. 1. HOW TO INSTALL 1.a Install Java SE JDK 1.6 (32 bit version). Rhapsody might not be able to load the JVM in case you install Java SE JDK 1.7 1.b Install Rhapsody 7.5.3. You can also install Rhapsody 7.6, in which case be sure to always save the Rhapsody project as version 7.5.3 (from "Save as" you can choose how to save the project). An evaluation license can be obtained from http://www.ibm.com/developerworks/downloads/r/rhapsodydeveloper/ 1.c Unzip the file in a folder of your choice, whose path in the remaining of this document is called 1.d Set the environment variable DESYREII_WS to the path: \MetaIIBaseWorkspace\Results 1.e Double click on the file \MetaIIBaseWorkspace\genhepall.bat. This batch file only generates some textual files (extension .hep) locally within the distribution that are required by Rhapsody to run the plugins 2. HOW TO RUN 2.a Change directory in your file system explorer to \MetaIIBaseWorkspace\Rhapsody\simModel and double click on the file simModel.rpy 2.b Rhapsody will prompt you to load the profiles referenced by the model (only the first time). Such profiles are: SysML.sbs, MoCCProfile.sbs, RpyParserProfile.sbs, MetaIIValidatorProfile.sbs Browse the file system to find these files and load them into the Rhapsody projects. Following are the locations where you can find them: SysML.sbs: \IBM\Rational\Rhapsody\7.5.3\Share\Profiles\SysML\SysMLProfile_rpy MoCCProfile.sbs: \MetaIIBaseWorkspace\Rhapsody\Demo201109MoCC\Demo201109MoCC_rpy RpyParserProfile.sbs: \MetaIIBaseWorkspace\Java\MetaII\Profiles\RpyParser\RpyParser_rpy MetaIIValidator.sbs: \MetaIIBaseWorkspace\Java\MetaII\Profiles\MetaIIValidator\MetaIIValidator_rpy 2.c Save the model as version 7.5.3 so that next time you open the project Rhapsody will know where to find the referenced profiles 2.d In Rhapsody, select View->Output Window if not already selected, so that you can see the textual outputs of the plugins. You should see two initialization messages from the two loaded plugins (RpyParser and MetaIIValidator) 2.e On the left pane you can browse the model: By expanding simModel->Packages->Default->blocks you can see the blocks defined to create the model. Note that each block is associated with a stereotype that defines the model of computation it is associated with. By expanding simModel->Internal Block Diagrams you can see the different views of the system. By double clicking on them you can edit the corresponding diagrams. By expanding simModel->Packages->Default->blocks-><> SLD->Structure Diagramss you can see the electrical view of the system and by double clicking on it you can edit the corresponding diagram. By expanding simModel->Profiles->MoCCProfiles->Packages->General->Stereotypes you can see the basic models of computation and by double clicking on them you can edit their properties. In particular, the Tag pane shows the attributes associated with the model of computation (see ContinuousTime and DiscreteTime as examples). By expanding simModel->Profiles->MoCCProfiles->Packages->General->Clas Diagrams you can double click on the diagram showing the generalization relations between the models of computation. By expanding simModel->Profiles->MoCCProfiles->Packages->ElectricalNetwork->Stereotypes you can see the model of computation defined for specifying electrical networks. 2.f In the Rhapsody menu select Tools->MetaIIParser. This command launches the RpyParser plugin that creates an EMF representation of the MetaII model, on which subsequent plugins are based. This operation may a few minutes. When the termination message appears in the Log pane, you can see the xmi file associated with the MetaII model under the path \MetaIIBaseWorkspace\Results 2.g In the Rhapsody menu select Tools->MetaIIValidator. This command launches the MetaIIValidator plugin, that validates the consistency of the MetaII model. You should see some error messages produced by the MetaIIValidator in the Rhapsody Log pane. These error messages refer to connections that are associated with incompatible models of computation. Open the control view by double clicking on simModel->Internal Block Diagrams->ControlView, the connections to the MainControler are the ones indicated by the MetaIIValidator. By clicking on the ports associated to one such connection, you can see that one such port is associated with the DiscreteTime stereotype, while the other one is not associated with any stereotypes; this is because the latter inherits the model of computation by the component, the Controller in this case. Go to simModel->Packages->Default->blocks->Controller, where you can see that the Controller is associated with the DiscreteEvent stereotype, which is not compatible with the DiscreteTime model of computation, as you can see from the corresponding profile class diagram by double clicking on simModel->Profiles->MoCCProfiles->Packages->General->Clas Diagrams->StereotypeRelations. 2.h Change the stereotype associated with the Controller to DiscreteTime. You can do this by double clicking on simModel->Packages->Default->blocks->Controller and by editing the Stereotype field within the General tab of the popup window. 2.i Close the Rhapsody project by selecting File->Close from the Rhapsody menu 2.j Reopen the simModel project by selecting File->Open from the Rhapsody menu 2.k From the Rhapsody menu select Tools->MetaIIParser and wait for termination 2.l From the Rhapsody menu select Tools->MetaIIValidator. You should see that the model is valid now.