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

Add support for memoized streams to the term model evaluator #1370

Merged
merged 1 commit into from
Jul 24, 2021

Conversation

robdockins
Copy link
Contributor

Although it is correct to treat streams according to their
SAWCore datatype definition, the naive implementation as a function
looses sharing that users expect given the behavior of Cryptol
streams. This patch makes sure to memoize concrete evaluations
of stream values, and blocks evaluation of stream lookups for
values that are not concrete.

This significantly improves the performance of the kinds of
stream programs that arise from Cryptol.

Copy link
Contributor

@atomb atomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not deeply familiar with the SAWCore simulator, but this looks reasonable from what I understand, and the motivation is compelling.

Although it is correct to treat streams according to their
SAWCore datatype definition, the naive implementation as a function
looses sharing that users expect given the behavior of Cryptol
streams.  This patch makes sure to memoize concrete evaluations
of stream values, and blocks evaluation of stream lookups for
values that are not concrete.

This significantly improves the performance of the kinds of
stream programs that arise from Cryptol.
@robdockins robdockins added the ready-to-merge If at least one person approves this PR, automatically merge it when CI finishes successfully. label Jul 23, 2021
@mergify mergify bot merged commit 8c81761 into master Jul 24, 2021
@mergify mergify bot deleted the term-model-fix branch July 24, 2021 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge If at least one person approves this PR, automatically merge it when CI finishes successfully.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants