Skip to content
/ swift Public
forked from lileicc/swift

A compiler for BLOG probabilistic programming language

License

Notifications You must be signed in to change notification settings

zth667/swift

 
 

Repository files navigation

swift

A compiler for BLOG probabilistic programming language (http://bayesianlogic.github.io/).

Check the paper:

Proceeding of IJCAI 2016: http://www.ijcai.org/Proceedings/16/Papers/512.pdf

Arxiv: https://arxiv.org/abs/1606.09242

Code style:

  1. double spaces for indentation
  2. use linux line terminator
  3. follow http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

Dependencies:

  1. A C++ compiler (default GNU C++, VC++/Clang compatible)
  2. The armadillo package: http://arma.sourceforge.net/
  3. C++11 required

How to Use:

  1. Compile the Swift compiler: make compile (see compile.bat for windows)
  2. 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
  3. Compile your target code: g++ -o -O3 <target> <your C++ file> random/* -larmadillo (see swifty.sh)
  4. Run your final binary!

Armadillo Setup for OS X:

  1. install armadillo library: brew install armadillo
  2. link C++ libraries for OS X: xcode-select --install

Armadillo Setup for Windows:

Download the VC++ solution config file from the armadillo webpage

Documentation

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).

About

A compiler for BLOG probabilistic programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 34.6%
  • C++ 27.2%
  • Makefile 19.1%
  • TeX 7.2%
  • Lex 3.8%
  • Yacc 3.3%
  • Other 4.8%