A compiler for BLOG probabilistic programming language (http://bayesianlogic.github.io/).
Proceeding of IJCAI 2016: http://www.ijcai.org/Proceedings/16/Papers/512.pdf
Arxiv: https://arxiv.org/abs/1606.09242
- double spaces for indentation
- use linux line terminator
- follow http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
- A C++ compiler (default GNU C++, VC++/Clang compatible)
- The armadillo package: http://arma.sourceforge.net/
- C++11 required
- Compile the Swift compiler:
make compile
(see compile.bat for windows) - Generate target C++ code:
./swift -i <Model File> -o <Target C++ File> -e <Algorithm>
(swift.exe in Windows). Run./swift
to see all the command line options - Compile your target code:
g++ -o -O3 <target> <your C++ file> random/* -larmadillo
(see swifty.sh) - Run your final binary!
- install armadillo library:
brew install armadillo
- link C++ libraries for OS X:
xcode-select --install
Download the VC++ solution config file from the armadillo webpage
Swift inherits all the syntax from BLOG with some extentions. Detailed documentations are under development. Please firstly check models under "example" directory to have a first impression. You can also check the documentations for BLOG for basic usage (http://bayesianlogic.github.io/pages/documentation.html).