-
Notifications
You must be signed in to change notification settings - Fork 28
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] Fix #380 (Have ptr_eq
typechecks its arguments)
#522
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the right track overall, thank you. Should be ready to merge in a couple of iterations I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last round of changes - just a few tweaks, thank you so much. If you can rebase and squash that would also be helpful.
Also once this PR is done and merged, can you do a quick PR adding |
There look to be CI failures. Can you please investigate? One of them is code-formatting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm but CI is failing.
Hmm, I don't know exactly what the failing runtime tests are or how to invoke them locally, and the CI job needs to be approved by a maintainer. |
Are you able to view which CI jobs pass or fail? And the logs of those or not? Regardless, if you look in the workflow file, you'll find the command: https://github.com/rems-project/cerberus/actions/runs/10599783302/workflow?pr=522#L85 : Before running the file, you can open it to see It will produce a bunch of output, including something like We should add this to the ONBOARDING doc. |
If you follow a similar process with the CI build workflow, you'll see that |
replace function_sig in compile.ml with LogicalFunctions.definition Merge github.com:rems-project/cerberus reset to origin master append builtin cn functions to ail_functions in core_to_mucore add builtin flag to translate_cn_expr WIP: replace ptr_eq with cn_function version also don't warn on inequal for builtins replace ptr_eq with a cn function rewrite is_null translate addr_eq and prov_eq refactor Merge branch 'master' of github.com:rems-project/cerberus revert to using LogicalFunctions.definition for compile.ml refactor builtins to use logicalfunctions.definition remove unused function add min and max bits to builtin defs add comment respond to review Merge branch 'master' of github.com:rems-project/cerberus use old function_sig type in compile.ml fix addr_eq Merge branch 'rems-project:master' into master respond to review
I submitted rems-project/cn-tutorial#83 to the tutorial repo to fix the issue with |
The tutorial is still failing for some reason even though your change was merged in rems-project/cn-tutorial#83 The runtime is now showing a further bug - it needs to be told where to find and substitute definitions of the builtins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
I'll take a look |
This is what I'm getting when running the single-file runtime testing script on slf_incr2.c:19:21: error: Type error
ptr_eq (vs_.pv,
~~~^~~
Expression 'vs_.pv' has type 'u32'.
I expected it to have type 'pointer' because of other location (<builtin>)
Failed to generate C files from CN-annotatated source. Is this the same error you were talking about @dc-mak ? |
That should be fixed, the tutorial's version of slf_incr2.c should be updated to use |
Ah - the CN runtime testing CI relies on the |
Great, so runtime testing CI seems to be working again with that same change from the cn.c:43:34: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]
return convert_to_cn_bits_i64(-9223372036854775808);
^
cn.c:78:33: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal]
return convert_to_cn_bits_u64(18446744073709551615);
^
2 warnings generated. Looks a bit suspicious that these kinds of integer literals are being generated - probably worth investigating even though the runtime testing CI is happy now. |
And the remaining CI failure seems to be CN test-gen-related - @ZippeyKeys12 would be the right person to ask about this. |
Known issue: #536 |
ptr_eq
typecheck its argumentsptr_eq
typechecks its arguments
ptr_eq
typechecks its argumentsptr_eq
typechecks its arguments)
Fixes #380