Make dataspace patterns over compound data extensible #9

Open
opened 2024-04-04 12:10:22 +00:00 by tonyg · 1 comment
Owner

Following on from a similar change to Preserves Schema, I want to make dataspace skeletons ignore extra (rightmost) fields and tuple entries, just the same way they already ignore extra dictionary keys. This really just changes the interpretation of the existing pattern syntax.

Note that even though the default for dataspace patterns is to permit extensibility, attenuation patterns should not be extensible in this way by default (excepting the existing documented design and code that is permissive wrt dictionary matching in attenuations).

Following on from [a similar change to Preserves Schema](https://gitlab.com/preserves/preserves/-/issues/51), I want to make dataspace skeletons ignore extra (rightmost) fields and tuple entries, just the same way they already ignore extra dictionary keys. This really just changes the interpretation of the existing pattern syntax. Note that even though the default for dataspace patterns is to permit extensibility, attenuation patterns should *not* be extensible in this way by default (excepting the existing documented design and code that is permissive wrt dictionary matching in attenuations). - [x] Update the synit book - [x] https://synit.org/book/protocol.html - multiple sections - [x] https://synit.org/book/protocols/syndicate/dataspacePatterns.html - [x] Update syndicate-rkt - [x] Update HOWITWORKS.md - [x] Update syndicate-py - [x] Update syndicate-js - [ ] Update syndicate-rs - [ ] Update Squeak syndicate dataspace implementation
Author
Owner

Updating syndicate-rkt involved:

  • simplification of computation of "selector" pop/step datastructure to use "moves"/"relative paths" - this is kind of optional but does simplify the code rather a lot
  • extraction of both value-check and existence-check constant positions from patterns
  • change of class/ctor-spec to be GroupType
  • storage of existence-check positions in the key of the continuation-table
  • application of existence-check projections when computing caches and when processing assertions/retractions
  • removal of assumptions that projections will succeed, now that shape-constraints are weaker
  • changes to code generation for pattern-matching macros
  • changes to patterns-over-patterns to use the new language
  • changes to "smart" pattern constructors to produce the new pattern language and to avoid redundant existence checks where possible
Updating syndicate-rkt involved: - simplification of computation of "selector" pop/step datastructure to use "moves"/"relative paths" - this is kind of optional but does simplify the code rather a lot - extraction of both value-check and existence-check constant positions from patterns - change of class/ctor-spec to be `GroupType` - storage of existence-check positions in the key of the continuation-table - application of existence-check projections when computing caches and when processing assertions/retractions - removal of assumptions that projections will succeed, now that shape-constraints are weaker - changes to code generation for pattern-matching macros - changes to patterns-over-patterns to use the new language - changes to "smart" pattern constructors to produce the new pattern language and to avoid redundant existence checks where possible
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: syndicate-lang/syndicate-protocols#9
No description provided.