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

Enforcing conservation #12

Open
michielbdejong opened this issue Jun 13, 2024 · 0 comments
Open

Enforcing conservation #12

michielbdejong opened this issue Jun 13, 2024 · 0 comments

Comments

@michielbdejong
Copy link

It seems to me, at first sight, that it should be possible to enforce the conservation design goal at compile time, if desired.

For instance, in the example from appendix III of the research paper where the single-value writer is [...] overwriting data they are unaware of, maybe Cambria could track which schema is aware/unaware of which bits of data, and make sure no write that happens under a given schema ever affects data that is not covered by that schema.

One could maybe model the lens more precisely by keeping the common information separate from the one-sided information, in an intermediate step:

Schema A: assignee: string | null
<- lens 1 (trivially) ->
Intermediate: { mainAssignee: string | null, otherAssignees: string[] }
<- lens 2 (lossless) ->
Schema B: assignees: string[]

I'll think about this some more.

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

No branches or pull requests

1 participant