AERN | Installing from source code


The specific parts of these instructions are applicable only to a Debian/Ubuntu Linux.

Nevertheless, these instructions should be adaptable to any modern desktop operating system.


  1. Ensure you have a Haskell Platform installation or similar (tested with GHC 7.6.3)
> sudo apt-get install haskell-platform
> sudo cabal update
> cabal update

  1. (Optional) Install MPFR if you require support for arbitrary precision arithmetic.

Note: If you require arbitrary-precision arithmetic using MPFR, you need a modified GHC as described on this page.

> sudo apt-get install libmpfr-dev

  1. (Optional) Install Haskell support for GTK+, Cairo and Glade if you require support for plotting.
> sudo apt-get install libghc-cairo-dev libghc-glade-dev  

  1. Clone the GitHub master branch where you want to build AERN
> git clone https://github.com/michalkonecny/aern.git

  1. Run an installation script
> cd aern
> . install-all.sh 

If you do not want support for MPFR and/or GTK, use the appropriately named install-*.sh script instead.

This script invokes cabal-install for each of the AERN packages. See the script code to see in what order the packages are installed.

The first time the script is executed, it is likely to install a large number of dependencies, which can take a long time.

On subsequent executions, the script is likely to give a warning about dangerous reinstalls. This warning can be safely ignored in this case.


  1. You can now execute a demo or a test suite to check the installation has been successful, eg:

Test arithmetic of intervals with Double endpoints:

> ~/.cabal/bin/testAERN-Real-Double

Before running examples that produce plots, make sure your current folder contains the file FnView.glade. The base folder of the aern repository contains this file already.

Plot some function enclosures:

> ~/.cabal/bin/plot minmax 10

Compute and plot an enclosure of an ODE IVP with uncertain initial value:

> ~/.cabal/bin/simple-ode ivpSpringMass-uv 10 "PlotGraph[True,False](0,10,-1.5,1.5)" GUI ShrinkWrap 30 200 -10 -10

Compute and plot an enclosure of a hybrid system with Zeno behaviour:

> ~/.cabal/bin/simple-events bouncingBallFloorDropEnergy 4.4 "PlotGraph[True,False,True,False,False](0,5,-0.2,5)" GUI locate evtree 10 10 3 50 0 0 

You can also execute various demos using ghci.