Soufflé is an efficient translator from Datalog to C++. We ran our tests with only a single job enabled to have a better comparison to the other systems that do not parallelize the query evaluation. We used the version that compiles via C++ to native code. The interpreted version is much slower.
For compiled Soufflé programs we can measure the resource usage using /usr/bin/time
.
We compile the filename into the program like this: souffle -o/tmp/souffle_qry <(sed \'s!INSTANCE!{instance}!g\' {problem[0]})
. The possibility to supply the datalog program as a named pipe has only been recently implemented by us and will be available from version 1.6.0. We ran our tests with version 1.5.1 with our patch applied.
Launch: /tmp/souffle_qry -j1
. The number of processes can be set via the -j[amount] command line switch.
// tcff.dl
.decl par (n:number, m:number)
.input par
.decl tc (n:number, m:number)
.printsize tc
tc(X, Y) :- par(X, Y).
tc(X, Y) :- par(X, Z), tc(Z, Y).
Compiling: souffle -o/tmp/souffle_qry tcff.dl
// sgff.dl
.decl par (n:number, m:number)
.input par(IO=file, filename="INSTANCE")
.decl sg (n:number, m:number)
.printsize sg
sg(Y, Y) :- par(_, Y).
sg(X, Y) :- par(X, A), sg(A, B), par(Y, B).
Compiling: souffle -o/tmp/souffle_qry sgff.dl