You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Formulog-to-Souffle transpiler generates invalid query plans in the presence of the CODEGEN_PROJECT relation, which it seems to treat as being in the same stratum as the predicate being defined.
$ cat foo.flgrel a(i32)rel b(i32, i32)b(3, 42).a(0).a(1).a(X + 2) :- a(X), a(X + 1), !b(X + 2, _).
$ java -Doptimize=5 -jar target/formulog-0.7.0-SNAPSHOT-jar-with-dependencies.jar foo.flg -c
$ cd codegen
$ cmake -B build -S ....
$ cmake --build build-- Configuring done-- Generating done-- Build files have been written to: /root/codegen/build[ 6%] Generating formulog.cppError: Invalid execution order in plan (expected 2 atoms, not 3) in file formulog.dl at line 30.plan 0: (1,2,3), 1: (2,1,3)---------^-------------------Error: Invalid execution order in plan (expected 2 atoms, not 3) in file formulog.dl at line 30.plan 0: (1,2,3), 1: (2,1,3)---------------------^-------2 errors generated, evaluation abortedgmake[2]: *** [CMakeFiles/flg.dir/build.make:74: formulog.cpp] Error 1gmake[1]: *** [CMakeFiles/Makefile2:82: CMakeFiles/flg.dir/all] Error 2gmake: *** [Makefile:91: all] Error 2
I'm not sure why Souffle accepts one rule but not the other. The surface difference is that there's a functor call in the head of the rule. Moreover, it seems like it's necessary for the functor call to use a variable to trigger the issue.
Query plans are applied after optimizations (souffle-lang/souffle#2370), and so it risky for us to generate query plans since we do not know what optimizations Souffle will do. A safer alternative is that users specify a SIPS when they compile the Souffle program we generate.
The Formulog-to-Souffle transpiler generates invalid query plans in the presence of the
CODEGEN_PROJECT
relation, which it seems to treat as being in the same stratum as the predicate being defined.The offending rule in the generated Souffle is
The text was updated successfully, but these errors were encountered: