Lab for Automated Reasoning and Analysis LARA

Labs Setup

This page contains instructions on how to set up your computer such that you can:

  • program your assignments,
  • share them with your teammate via a version control system,
  • submit your labs for grading, and
  • use our black-box testing system.

Step 1) Installing and Configuring Eclipse

You are by no means required to use an IDE. If you wish to do so, we recommend that you use Eclipse with the Scala plug-in. Skip this step if you are not going to use Eclipse.

Installing Eclipse:

  1. From the Eclipse Indigo downloads page, get Eclipse IDE for Java Developers for your system.
  2. To install it, simply uncompress the archive in a directory of your choosing. There is no installer, uncompressing is enough.
  3. Launch Eclipse (your version should be called Indigo).

Note that the Scala plugin does not support eclipse versions higher than Eclipse 3.7 Indigo.

Step 1.a) Scala Plugin

Installing support for Scala:

  1. Go to Help→Install New Software…
  2. Click Add… to add a software repository.
  3. Use http://download.scala-ide.org/releases-29/stable/site as the Location and, e.g., “Scala plug-in repository” as the Name.
  4. In the list of packages that appears, select all three. Click Next> twice, accept the license and click Finish. (Click Ok if during installation you get a warning about content not being signed.)

Step 1.b) Git Plugin

All labs will be done in pairs. We have set up a version control system around Git, which you will use to share your project code with your partner, but also to submit your labs. You need to install a plugin in order to have git support from within Eclipse.

Installing the EGit plugin for Eclipse:

  1. Go to Help→Install New Software…
  2. In the Work with menu, choose the Indigo repository.
  3. Use the filter box to find the Eclipse EGit package, select it and install it.

Step 2) Creating a Public/Private SSH Key Pair

Authentication to the git repository works by using a SSH key. If you do not already have a private/public key combination for your computer, follow these instructions. Note that you typically generate one key pair per computer that you use.

From Within Eclipse:

  1. Go to Window→Preferences→General→Network Connections→SSH2.
  2. In Key Management, click Generate RSA Key….
  3. The text blob that appears in the same window is your public key. You will need to copy-paste this blob when you register with our webservice, so save it somewhere.
  4. Click Save Private Key… (use a passphrase if you want to, but it is not required). The default location should be correct.
  5. You should now be all set to connect to our Git repository and to push your changes to the server.

From the Command Line

  1. Type ssh-keygen -t rsa -b 1024.
  2. Type enter to save it in the default location.
  3. Choose a passphrase, or type enter to ignore it.
  4. Your public key is now stored in a file (typically, in ~/.ssh/id_rsa.pub). You will need to copy-paste the content of this file into our webservice.

Step 3) Project Web Interface

The web interface for your project will be directly linked to your git repository. It will allow you to run tests, submit deliverables, receive feedback, etc..

The web interface is located at http://larasrv05.epfl.ch/cc12 (Tequila authentication required.)

As mentionned earlier, all labs will be done in pairs. Try to form groups of two as much as possible. You will have the choice of either creating a new group or joining an existing group.

  1. Go to http://larasrv05.epfl.ch/cc12 and authenticate yourself
  2. The first time you access this page, it will ask you to either 1) create a new group 2) join an existing group
  3. Once you are within a group, go to the Keys tab, and register the Public SSH key you just generated

Step 4) Setting up Your Project

From Within Eclipse:

  1. Start Eclipse
  2. File > Import…
  3. Select Git, then Projects from Git, click Next
  4. Select URI, then Next
  5. as URI: use the one provided in the web interface under Repository > URI (it should look like git@larasrv05.epfl.ch:cc2012-group??), select Protocol: ssh and User: git, then click Next
  6. Make sure master is selected and click Next
  7. Click Next again
  8. Select Import existing projects, Working Directory and click Next
  9. The two projects should be displayed ”toolc” and ”whilelang”, select both and click Finish

To run your project, you need to add a new Run Configuration based on Scala Application, use whilelang.Main as Main class, and pass e.g. progs/primes.while as argument.

From the Command Line

The first step is to clone the git repository:

$ git clone git@larasrv05.epfl.ch:cc2012-group?? 

(Exact URI is provided in the web interface under Repository > URI)

Then, use sbt (xsbt 0.11.2) to compile your project:

$ cd cc2012-group??/whilelang
$ sbt
> compile
> ...
> run progs/primes.while
 
cc12/labs_setup.txt · Last modified: 2012/09/18 17:47 by ekneuss