Skip to content

Enforcing conservation #12

Open
Open
@michielbdejong

Description

@michielbdejong

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions