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

Implement the record_lazy_assume primop #1211

Merged
merged 1 commit into from Mar 30, 2023
Merged

Conversation

yannham
Copy link
Member

@yannham yannham commented Mar 29, 2023

Follow-up of #1203. Preliminary PR to make the Equal contract lazy.

This PR introduces a new primop, akin to the existing array_lazy_assume, which adds a contract to the pending_contracts of each field of a record. This primop also reverts recursive records, as this new contract may alter fields (e.g. by adding a default value), and thus triggers a recomputation of the recursive record's fixpoint.

Doing so, we got rid of the dictionary_assume contract, which can be subsumed (more easily and more efficiently!) by this new primop.

@yannham yannham requested a review from vkleen March 29, 2023 12:31
@github-actions github-actions bot temporarily deployed to pull request March 29, 2023 12:34 Inactive
src/eval/fixpoint.rs Outdated Show resolved Hide resolved
src/term/mod.rs Outdated Show resolved Hide resolved
src/eval/fixpoint.rs Outdated Show resolved Hide resolved
@yannham yannham added the merge-queue merge on green CI label Mar 29, 2023
@github-actions github-actions bot temporarily deployed to pull request March 29, 2023 12:58 Inactive
The contract.Equal requires a new primop, akin to the existing
array_lazy_assume, which adds a contract to the `pending_contracts` of
each field of a record. This primop also reverts recursive records, as
this new contract may alter fields, and thus trigger a recomputation of
the recursive record's fixpoint.

Doing so, we got rid of the `dictionary_assume` contract, which can be
subsumed (more easily and more efficiently!) by this new primop.
@yannham
Copy link
Member Author

yannham commented Mar 29, 2023

I have no idea why the CI won't run anymore 🤷‍♂️

@yannham
Copy link
Member Author

yannham commented Mar 30, 2023

I ran nix flake check locally, and it passes. Let's merge like this, this looks like a GitHub bug (happened before already).

@yannham yannham merged commit 1e1d16f into master Mar 30, 2023
1 check passed
@yannham yannham deleted the task/record-lazy-assume branch March 30, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-queue merge on green CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants