Code Generation 2009 Tutorial

Stratego -- Strategies for Program Transformation
The software for the Code Generation 2009 Tutorial is available through a virtual machine. To run this virtual machine you need a recent version of VirtualBox (version 2.2 or higher).

The virtual machine contains an Ubuntu 9.04 install, including the necessary StrategoXT components:

If you have any questions, please feel free to send an email to

or go to the #stratego IRC channel on irc.freenode.net.

Installation

The virtual machine image can be downloaded:

The zip file is approximately 1.5GB compressed, and you need about 4GB of space for the uncompressed image.

After downloading

  • unzip the downloaded file
  • start Virtual Box
  • Press New button, which starts a wizard, press next
  • Enter a name for the virtual machine, and fill in:
    • Operating system: Linux
    • Version: Ubuntu
  • Press Next
  • Enter the amount of memory available in the virtual machine, we recommend at least 512MB
  • Press Next
  • Select use existing harddisk, and press on the button next to the dropdown box to go to the Virtual Media Manager
    • Press Add button
    • Choose the downloaded and extracted disk image (CodeGen.vdi) and select Open
    • Then press Select button, which closes the Virtual Media Manager
  • Press Next, which will show a summary of what you have just done
  • Press Finish to add the machine to your VirtualBox

Now, the virtual machine is available in Virtualbox, and it is possible to start the machine. Username and password for the default login is guest.

The sample application for the tutorial is available in /home/guest/src/tutorial.

Testing image

To check if the image is correctly installed,

  • open terminal (menu Applications/Accessoires/Terminal)
  • cd src
  • ./build-webdsl-svn
  • cd tutorial
  • webdsl build deploy, to deploy the sample application
  • start Tomcat using the desktop item
  • start firefox and point browser to http://localhost:8080/tasks/

Shared folders

To mount a shared folder (from VirtualBox)

  • In VirtualBox, go to menu Devices, then Shared Folders
  • Choose Add and fill in * Folder Path: / (to share the root filesystem of the host) * Folder Name: share
  • Press OK
  • open terminal (menu Applications/Accessoires/Terminal)
  • Execute: mount-shared share /home/guest/Desktop/share to mount the shared folder with name 'share' to a folder on your desktop.

Issues

  • in some cases networking does not work immediately. Open a terminal (e.g. alt-f2, then type gnome-terminal or menu Applications/Accessoires/Terminal) and execute: sudo /etc/init.d/networking restart. (Password guest.)