Chinstrap
No description available
Install / Use
/learn @HazyResearch/ChinstrapREADME
Dependencies
- C++11
- Clang 3.6 or GCC 4.9.2
- Scala 2.11.2 (Java 1.8)
- SBT 0.13.8
- Intel TBB
It may work with different versions of these but this is what the system is currently tested on.
Need GCC?
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9
Need Scala?
http://www.scala-lang.org/download/install.html
Need SBT?
http://www.scala-sbt.org/download.html
Need TBB?
sudo apt-get install libtbb-dev
For more information....
https://www.threadingbuildingblocks.org/
Compile a query
Now that you have all the dependencies installed you can compile a query. See our webpage for examples on query sytax to figure out what we currently support.
Commands
At the root of the project run:
./compile.sh < path to query file >/<query>.datalog
- The query file must end in ".datalog"
This will generate a file in emptyheaded/generated/<query>.cpp and an executable in emptyheaded/bin/<query>
Run a query
./emptyheaded/bin/<query>
Example
Create a sample input file, triangle.tsv, with the following data:
0 1
1 0
1 2
2 1
0 2
2 0
Now create a datalog file, triangle.datalog, with the following contents:
R(uint64_t,uint64_t) <- load("<complete path to>/triangle.tsv", tsv)
U(a,b,c) <- R(a,b),R(b,c),R(a,c)
print(a,b,c)
You should see an output with the 6 permutations of the triangles from the input! Congrats you just ran your first EmptyHeaded query.
