-
Notifications
You must be signed in to change notification settings - Fork 236
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
Add [@@no_inline_let]
annotation
#3169
base: master
Are you sure you want to change the base?
Conversation
d78eaf9
to
f566d31
Compare
f566d31
to
7d50ab4
Compare
Hi Amos, sorry this dropped off the radar. If it's still useful I'd be fine with merging this as-is. |
Hi Guido, Yes, this is still useful to me - I haven't been able to find another good way to have precise control over inlining with norm |
(Sorry - I actually accidentally pressed the 'merge from master' button. I'll get this building again in the next few days) |
It was just some flaky failure. I pushed a fix to this PR. It would be good to get a test for this somewhere in the repo though. |
Oh, thanks. Good idea - I'll try to make one soon. Do you have a preference whether I put it as a separate PR or modify this one? |
Probably better to just append to this one... but no big deal either way! |
Hi Guido, I just thought I'd check - can you think of a robust way to make an automated test that it's not inlining? I noticed that tests/tactics/Inlining.fst says to manually inspect the result - maybe that's the way to go here too. I did think that maybe I could force an exponential blowup / OOM if the lets are inlined, something like this, but unfortunately it's blowing up regardless...:
|
Seems like they are getting inlined during SMT encoding... we encode pure lets by inlining, regardless of these normalization toggles. I wonder why... we could use SMT-LIB lets I think. In any case, maybe a better test is to check that the extracted code (of a smaller example) matches what you expect? We already do this for a few files, see for instance the |
c62b089
to
c13a1e2
Compare
c13a1e2
to
4b6e1be
Compare
hi @mtzguido, sorry for going dark on this one for so long. could you check if this test looks reasonable? unfortunately I haven't been able to test it locally yet - I'm having trouble running the tests on MacOS at the moment, and trying to run
I was hoping to debug the test on ci, but it looks like it's still going after ten hours - how long is it expected to take? I'll keep poking around and see if I can find another way to run the tests inside a docker container. |
This adds a
[@@no_inline_let]
annotation so that the norm tactic doesn't always unfold local lets.I had to update the rlimit in some places. Some of these were necessary to get the current master building on MacOS even without the no_inline_let changes, but others were required by the no_inline_let. Perhaps the annotation should be hidden in a separate module to avoid polluting the pervasives namespace?