-
Notifications
You must be signed in to change notification settings - Fork 63
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
Make scanl a SAWCore primitive #1511
Conversation
c1426e0
to
3667b04
Compare
The loss of sharing with infinite streams will be a problem, and we should fix that before merging this. Cryptol's |
more likely for coercions to simplify away.
`ecScanl` as an implemention for the Cryptol `scanl` primitive.
when we can easily tell that the length of the branches are the same. This avoids unneccessary coercions. Fixes #1507
This restores the term sharing behavior of `scanl` and `iterate` on infinite streams.
it instead of the SAWCore implementation.
This recursively unfolds lets appearing in the goal, as otherwise the proof automation falls completely over.
3667b04
to
3558a5f
Compare
@brianhuffman, I think I've fixed the loss of sharing issue now. |
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
This is in further support of Cryptol->Coq extraction.
One point I'm unsure about. In the definition of
scanl
for infinite streams, I put in a fairly naive implementation that computes each position independently. This will result in a total loss of sharing. Theiterate
Cryptol primitive is now defined in terms ofscanl
, so it will also have this issue. I'm not sure if this is something we should worry about.