Mirror of https://github.com/leanprover/lean2 in case it ever disappears
Find a file
Leonardo de Moura 53e4100e1f Add example with nested quantifiers
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-19 20:05:56 -07:00
examples Add example with nested quantifiers 2013-08-19 20:05:56 -07:00
script Update .travis.osx.yml to use precompiled gcc/mpfr/gmp, and copy precompiled lean binaries to dropbox 2013-08-19 16:51:21 -07:00
src Fix interval::sin to suppress a warning 2013-08-19 16:46:36 -07:00
.gitignore Update .gitignore 2013-08-01 13:38:04 -07:00
.travis.osx.yml Update .travis.osx.yml to use precompiled gcc/mpfr/gmp, and copy precompiled lean binaries to dropbox 2013-08-19 16:51:21 -07:00
.travis.yml Remove "continue_on_violation(true);" from tests 2013-08-14 13:24:18 -07:00
LICENSE Add LICENSE file 2013-07-15 18:55:48 -07:00
README.md Update README.md to include instructions for tests, coverage, and doxygen 2013-08-17 21:46:35 -07:00

Build Status Ubuntu 12.04 LTS 64bit, g++-4.8 | clang++-3.3

Build Status Mac OS X 10.8.2, g++-4.8

Requirements

Install Packages on Ubuntu

Instructions for installing gperftools on Ubuntu

sudo add-apt-repository ppa:agent-8131/ppa
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install libgoogle-perftools-dev

Instructions for installing gcc-4.8 (C++11 compatible) on Ubuntu

sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo apt-get update
sudo apt-get install g++-4.8 -y
sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y

Instructions for installing clang-3.3 (C++11 compatible) on Ubuntu

sudo add-apt-repository ppa:h-rayflood/llvm
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install clang-3.3 clang-3.3-doc

Note that you still need to have g++-4.8's C++ runtime library to support some C++11 features that we are using.

You can specify the C++ compiler to use by using -DCMAKE_CXX_COMPILER option. For example

cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_CXX_COMPILER=clang++-3.3 ../../src

Install Packages on OS X

We assume that you are using homebrew, "The missing package manager for OS X".

Instructions for installing gperftools on OS X 10.8

$ brew install gperftools

Instructions for installing gcc-4.8 (C++11 compatible) on OS X 10.8

$ brew tap homebrew/versions
$ brew install gcc48

Instructions for installing clang-3.3 (C++11 compatible) on OS X 10.8

$ brew install llvm --with-clang --with-asan

Install Packages on Cygwin

Just run cygwin setup.exe (http://cygwin.com/install.html) and make sure that you have installed g++ 4.8.1 (or greater), cmake, gmp and libmpfr. We have tested Lean using Cygwin for 64-bit versions of Windows.

Build Instructions

Using CMake + Make

Instructions for DEBUG build

mkdir -p build/debug
cd build/debug
cmake -DCMAKE_BUILD_TYPE=DEBUG ../../src
make

Instructions for RELEASE build

mkdir -p build/release
cd build/release
cmake -DCMAKE_BUILD_TYPE=RELEASE ../../src
make

Using CMake + Ninja

CMake 2.8.11 supports Ninja build system using -G option. Some people report that using Ninja can reduce the build time, esp when a build is incremental.

Instructions for DEBUG build

mkdir -p build/debug
cd build/debug
cmake -DCMAKE_BUILD_TYPE=DEBUG -G Ninja ../../src
ninja

Instructions for RELEASE build

mkdir -p build/release
cd build/release
cmake -DCMAKE_BUILD_TYPE=RELEASE -G Ninja ../../src
ninja

Instructions for Testing and Measuring Code Coverage

To measure code coverage, compile TESTCOV build using g++:

mkdir -p build/testcov
cd build/testcov
cmake -DCMAKE_BUILD_TYPE=TESTCOV -DCMAKE_CXX_COMPILER=g++-4.8 -G Ninja ../../src
ninja

and run test cases:

ctest

and collect coverage data using lcov and gcov:

lcov -c -b ../../src -d . -o cov.info --no-external --gcov-tool gcov-4.8

and generate HTML output:

genhtml cov.info --output-directory lcov

Note: make sure that the version of gcov matches with the one of g++. Also try to use the latest lcov if you have a problem with the existing one.

Instructions for Building Doxygen Documentation

doxygen src/Doxyfile