Skip to content

Do not check mutability when computing projections #572

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ehildenb
Copy link
Member

@ehildenb ehildenb commented May 8, 2025

The current logic for computing projections looks at the mutability of fields when reading them, which shouldn't be necessary as we should be allowed to read mutable fields (just not write them). So this removes the mutability check, which means the additional arguments FORCE and MUT are not needed for #projectUpdate. So we refactor the bits of state that aren't needed to be in a different KItem in the second position on the <k> cell.

In particular:

  • Remove the checks on each rule of #projectUpdate which inspect the mutability of the read fields and the FORCE field.
  • Pulls out the state that is no longer needed to actually compute the projection (the new value to write, and the FORCE) into a second KItem on the <k> cell, and re-wires the rules to use this when doing #setLocalValue.

@ehildenb ehildenb marked this pull request as ready for review May 8, 2025 16:38
@ehildenb ehildenb requested review from jberthold and dkcumming May 8, 2025 16:38
@ehildenb ehildenb marked this pull request as draft May 8, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants