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

[CN] ptr_eq typing (confusingly) not strict enough #380

Open
dc-mak opened this issue Jul 11, 2024 · 1 comment · May be fixed by #522
Open

[CN] ptr_eq typing (confusingly) not strict enough #380

dc-mak opened this issue Jul 11, 2024 · 1 comment · May be fixed by #522
Labels

Comments

@dc-mak
Copy link
Contributor

dc-mak commented Jul 11, 2024

Specifically, x and y should have type u64 not pointer

12:56 ➜  2024-cn-testing-paper git:(main) cat tmp.c && cn tmp.c
void f(unsigned int x, unsigned int y)
/*@ requires ptr_eq(x,y);
   ensures true; @*/
{ }

[1/1]: f
@dc-mak dc-mak added the cn label Jul 11, 2024
@dc-mak dc-mak self-assigned this Jul 15, 2024
@dc-mak
Copy link
Contributor Author

dc-mak commented Aug 19, 2024

The way to solve this would be to convert the definitions in backend/cn/lib/builtins.ml to LogicalFunction.defintion types and then adjust init_env in backend/cn/lib/compile.ml to have functions = (* builtins list to map *).

@dc-mak dc-mak removed their assignment Aug 19, 2024
@dc-mak dc-mak changed the title [CN] Bug in ptr_eq typing [CN] ptr_eq typing not strict enough Aug 20, 2024
@dc-mak dc-mak changed the title [CN] ptr_eq typing not strict enough [CN] ptr_eq typing (confusingly) not strict enough Aug 20, 2024
@dsainati1 dsainati1 linked a pull request Aug 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant