Lab for Automated Reasoning and Analysis LARA

Compiling Leon using Eclipse

If you wish to use eclipse (against all our recommendations), we provide you with a project configuration that should help you get started.

Downloading Eclipse

Installing the Scala IDE

You should install the 2.9.* version of the Scala plugin.

Go to Help > Install new software and use this URL:

Select Scala IDE for Eclipse and install.

Importing the predefined Eclipse project configuration

The eclipse project files are located inside the sav2013-main repository to which you should have access. This configuration is contained in two files: .project and .classpath

Option 1)

To merge the files automatically, you can use it as an additional remote to your sav2013-groupXX repository:

cd path/to/sav2013-groupXX
git remote add upstream
git pull upstream master

Note: if you already have .project and .classpath files in your repository, this will most likely conflict.

Option 2)

Clone the main repository on the side and copy the files manually:

git clone
cp sav2013-main/.project ...
cp sav2013-main/.classpath ...

Option 3)

Copy the files manually:


<?xml version="1.0" encoding="UTF-8"?>


<?xml version="1.0" encoding="UTF-8"?>
      <classpathentry kind="src" output="library/target/scala-2.9.2/classes" path="library/src/main/scala/leon"/>
      <classpathentry kind="src" path="src/main/java"/>
      <classpathentry kind="src" path="src/main/scala/leon"/>
      <classpathentry kind="lib" path="unmanaged/64/cafebabe_2.9.2-1.2.jar"/>
      <classpathentry kind="lib" path="unmanaged/64/scalaz3.jar"/>
      <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
      <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
      <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_COMPILER_CONTAINER"/>
      <classpathentry kind="output" path="target/scala-2.9.2/classes"/>

This project was configured for 64b, for Mac OSX users, you need to replace those 64 by 64-osx.

Importing this project

In Eclipse, go to: File > Import…

Select General > Existing Projects into Workspace, click continue.

Select the path to your sav2013-groupXX directory as “Root directory”, and then select the Leon project. click Finish.

Your newly created Eclipse project should compile.

Running Leon

In order to run Leon within Eclipse, you will need to create a run configuration. Go to Run > Run configurations…

Right-click on Scala Application and select new. Name it “Leon”.

On the Main tab, select leon.Main as main class.

On the Arguments tab, use one example as ”“Program Arguments”, e.g. examples/01_Introduction.scala

On the Environment tab, you will need to create a few environment variables. First, go with a terminal to your project root, and do

$ sbt script
$ cat setupenv

You will see a list of 4 environment variables, looking like:

export LD_LIBRARY_PATH="/home/ekneuss/git/sav2/./lib-bin/64"
export DYLD_LIBRARY_PATH="/home/ekneuss/git/sav2/./lib-bin/64"
export LEON_LIBRARY_PATH="/home/ekneuss/git/sav2/library/target/scala-2.9.2/classes"
export SCALA_HOME="/home/ekneuss/.sbt/0.12.1/boot/scala-2.9.2/"

You need to replicate those 4 environment variables in Eclipse with YOUR values. i.e.

  1. LD_LIBRARY_PATHlib-bin/64
  2. DYLD_LIBRARY_PATHlib-bin/64
  3. LEON_LIBRARY_PATHlibrary/target/scala-2.9.2/classes
sav13/labs_eclipse.txt · Last modified: 2013/02/27 16:59 by ekneuss
© EPFL 2018 - Legal notice