- English only
Lab for Automated Reasoning and Analysis LARA
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.
Programming in Scala using 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. (Another good IDE for Scala is Intellij IDEA, but we do not provide detailed instructions.)
Installing Eclipse and the Scala plug-in.
- From the Eclipse downloads page, get Eclipse Classic 3.7 for your system.
- To install it, simply uncompress the archive in a directory of your choosing. There is no installer, uncompressing is enough.
- Launch Eclipse (your version should be called Indigo).
- Go to Help→Install New Software…
- Click Add… to add a software repository.
- Use http://download.scala-ide.org/releases-29/2.0.0-beta as the Location and, e.g., “Scala plug-in repository” as the Name.
- 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.)
Creating a Public/Private Key Pair and Registering your Group
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. Authentication to this service 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.
Once all member of the group have created a key pair, go to http://larasrv05.epfl.ch/cc11 and follow the instructions there (Tequila authentication required.)
From within Eclipse
- Go to Window→Preferences→General→Network Connections→SSH2.
- In Key Management, click Generate RSA Key….
- 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.
- Click Save Private Key… (use a passphrase if you want to, but it is not required). The default location should be correct.
- You should now be all set to connect to our Git repository and to push your changes to the server.
From the Command Line
ssh-keygen -t rsa -b 1024.
- Type enter to save it in the default location.
- Choose a passphrase, or type enter to ignore it.
- 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.
Using Git as a Version Control System
Installing the EGit plugin for Eclipse:
- Go to Help→Install New Software…
- In the Work with menu, choose the Indigo repository.
- Use the filter box to find the Eclipse EGit package, select it and install it.
Once we have created a Git repository for you:
- Go to File→Import→Git→Projects from Git
- Click Clone…. In the window, enter the URI you have received from us. The fields “Host” and “Repository path” should then be automatically completed. Don't select anything for the other fields. User should be “git” and password should be empty.
- The following steps depend on whether you are the first of your group to check out the project or not.
- If you are the first: a “Branch Selection” window should open with a warning message saying “Source Git Repository is empty”. Click Next>.
- If you are not the first: a “Branch Selection” window should open. Choose master.
- The next window asks you where to save the local copy of the repository. The default option should be good (probably ”~/git/reposname”), but feel free to change it.
- You have now cloned the repository. Select it from the list and click Next>.
If you are the first to commit to the server
- Choose Use the New Projects wizard.
- From the wizard, choose Scala Wizards→Scala Project. Choose a meaningful name (e.g. “whilelang” for the first lab, or “toolc” for the semester-long project). All other options should be OK by default. Click Finish.
- You can now add source files. For instance, create the
srcand add the stub files from the first lab.
Somehow counter-intuitively, the project is not yet ready for pushing changes to the server:
- Right-click on the project, then select Team→Share Project.
- Choose Git, then in the Repository menu, choose the one you created a few steps ago, and click Finish.
- Go now to Window→Show View→Navigator. You should see little question marks on the
- This is an important step: for each of
.scala_dependencies), right-click the file and select Team→Add.
- Right-click the project name again and select Team→Commit. Enter some message, such as “first commit.” and click Commit.
- If you are used to using SVN, you may think this just pushed the changes to the server. It did not. To push the changes, right-click on the project and select Team→Push to Upstream.
- You should see ”[new branch]” in the status column. Click OK.
- That's it.
If you are not the first to commit to the server
- Choose Import Existing Projects, click Next>.
- Make sure that the right project is checked and click Finish.
- You have now imported the project. You may want to switch to the Scala perspective by selecting Window→Open Perspective→Other…→Scala.