Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid redefinition of function 'eclair_btree_insert_range_delta_*' #164

Open
Price1999a opened this issue Mar 7, 2024 · 3 comments
Open

Comments

@Price1999a
Copy link

@def p(X: u32, Z: u32) input output.
@def q(X: u32, Y: u32, Z: u32) input output.
@def r(R: u32, P: u32, E: u32) input.
@def c(Y: u32, Z: u32, W: u32) input.
@def u(R: u32, Z: u32, W: u32) input.
@def s(R: u32, P: u32) input.

p(arg_x,arg_z) :- p(arg_x,arg_y), p(arg_y,arg_z).
q(arg_x,arg_r,arg_z) :- p(arg_x,arg_y), q(arg_y,arg_r,arg_z).
p(arg_x,arg_z) :- p(arg_y,arg_w), u(arg_w,arg_r,arg_z), q(arg_x,arg_r,arg_y).
p(arg_x,arg_z) :- c(arg_y,arg_w,arg_z),p(arg_x,arg_w), p(arg_x,arg_y).
q(arg_x,arg_q,arg_z) :- q(arg_x,arg_r,arg_z),s(arg_r,arg_q).
q(arg_x,arg_e,arg_o) :- q(arg_x,arg_y,arg_z),r(arg_y,arg_u,arg_e),q(arg_z,arg_u,arg_o).

Hello, this is an Eclair rewrite of the Soufflé rules in galen. However, after compiling it to an LLVM IR file using the current version of Eclair, I found that there are errors in the generated code. The compiler seems to generate a series of duplicate functions.
For example, L5016 and L5032.

I used the following compilation command (shentianqi/eclair comes from mygithub action ):

docker run -v $(pwd):/code --rm -it shentianqi/eclair:main eclair compile /code/query-eclair.dl >$(pwd)/query-eclair.ll
FROM teeks99/clang-ubuntu:17

WORKDIR /app
VOLUME /app/data

COPY main.c .
COPY query-eclair.ll .


RUN clang -o program main.c query-eclair.ll

CMD ["./program"]
@luc-tielen
Copy link
Owner

Hey, thanks for reporting this bug! I'm curious what you want to use Eclair for, or is this just a simple benchmark for now?

This has to do with parts of the codegen not properly being cached.

Unfortunately lately I have been extremely busy irl and I haven't had the chance to pick back up the work on Eclair. It's also going to stay this way for the foreseeable future so idk when I can get back to it at this time.

@Price1999a
Copy link
Author

Thanks for the swift response! I'm just running some simple performance benchmarks on Eclair at the moment. No rush on the updates—I understand how busy life can get.

@luc-tielen
Copy link
Owner

Ok, interesting. Curious to hear the results! Keep in mind I've mainly been focusing on getting it working / correctness, there's only a small basic set of optimizations so far..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants