Getting Osate 2 sources

From AadlWiki

Jump to: navigation, search

Contents

Introduction

This page presents a step-by-step procedure to get the sources of Osate 2 from the Git repository into an Eclipse workspace. This tutorial supposes that you have access to Internet to download the tools and data.

Getting the Eclipse and Xtext environment

  • Prerequisite: Java 8 (jre or jdk) installed
  • Install the Eclipse bundle named Eclipse Modeling Tools from the Mars.2 (4.5.2) download site.
  • When starting for the first time, Eclipse asks for the location of the workspace to be used. Provide the location you want (this will contain all osate sources)

Install required additional Eclipse features

  • Clone the following git repository: https://github.com/osate/development.git, e.g., using the eclipse git client
  • In eclipse: File -> Import -> Install -> Install Software Items from File -> Next -> Browse -> select file "installed-features.p2f" from the just checked out git repo -> Open -> uncheck "Install latest version of selected software" -> Next -> Next -> Accept license -> Finish

(optional) Sirius Graphical User Interface Builder

Note: This section is outdated.

Eclipse Sirius is a graphical user interface builder that takes advantage of EMF based model representations. See [1] for details. Sirius synchronizes with Xtext based model representations.

If you want to use it to build nicer frontends to AADL models, Annex models, or other DSL representations, Here is how to install it. Sirius 1.0 comes with the Eclipse Modeling build.

If you want to use the new Sirius 2.0 release you have to do a couple of steps.

  • Update EcoreTools by going to the update site [2] to get some bugfixes that make your installation work with Sirius 2.0.
  • Get Sirius 2.0 from the update site [3]

Have fun.

SVN Support

You may maintain some models or sources on SVN. we found Subversive a reasonable Eclipse plugin to interface with an SVN server. You can get Subversive by installing it from the Eclipse baseline installation, e.g., by opening Eclipse Luna and then searching for Subversive. Install it and after restart Eclipse will prompt you to install some connector components. You may need to switch to the SVN Perspective to get Eclipse to prompt. Select the SVN kit according to the SVN server version (1.8 works for us). We use the Native Java implementation.

Subversive behaves a little better than Subclipse. Subclipse is not well synchronized with the Navigator and you keep seeing temporary files and have to do a manual refresh.

Getting the sources of Osate 2

This assumes that you have cloned the repository [4] to your machine.

  • Import all osate sources: File -> Import -> Team -> Team Project Set -> select file "osate2.psf" from the cloned development git repository -> Open -> Finish -> (wait)
  • This retrieves all sources that are used to build osate, including sources of features not created by the SEI, e.g., the ocarina plugin, error model and behavior annex plugins, analysis plugins, resolute, and agree
  • The sources are grouped in eclipse working sets
  • To contribute to osate you need to create an account on github

Running Osate 2

Running Osate from the sources require the definition of a new run configuration.

  • In the Eclipse tool, open menu Run > Run Configurations.... A dialog window appears;
  • In the left hand side list, right-click on Eclipse Application and select New;
  • In the Main tab, set the following option values:
    • Name: Osate 2 product
    • Workspace Data Location: ${workspace_loc}/../runtime-osate2
    • Run a product: org.osate.branding.osate2
  • In the Arguments tab, set the following option values:
    • VM Arguments: -XX:MaxPermSize=256m -Xmx1200m
  • Click Run. Osate 2 starts.

See Editing a first AADL model for more information on how to use Osate 2.

Regenerating From the Grammar

You can invoke the XText generation process to regenerate the sources from the grammars. We have a separate grammar for property associations, so it can be used as basis for the aadl2 core language as well as annexes that make use of properties.

  • We have a separate grammar for property associations in the project org.osate.xtext.aadl2.properties. You find it in the org.osate.xtext.aadl2.properties package together with the generation script with the extension mwe2. You regenerate by selecting the file and then invoking Run as.
    • If it gives you an error message about running out of perm space or heap space, select Run configuration.. and then set VM Arguments to -XX:MaxPermSize=256m -Xmx768m in the mwe2 configuration for the grammar before running it.
  • The aadl2 grammar is in the project org.osate.xtext.aadl2. It builds on the properties grammar. To regenerate invoke the script with Run as.
    • If it gives you an error message about running out of perm space or heap space, select Run configuration.. and then set VM Arguments to -XX:MaxPermSize=256m -Xmx768m in the mwe2 configuration for the grammar before running it.

Known issues & see also

  • If you are using a proxy, you might need to configure the network preferences of Eclipse and specify your proxy setup/configuration before trying to connect to the git repository.
  • Check the Help section available within OSATE. Part of it is also available online at this address: http://www.aadl.info/aadl/osate/osate-doc/
  • Editing a first AADL model: Tutorial to create a new AADL model with Osate 2;
  • Update the local sources: Update the sources you got with the last changes in the repository;
  • Reporting a bug: Explanation on how to submit bugs.
Personal tools