Petri net document type and delta lens#1298
Open
tslil-topos wants to merge 1 commit into
Open
Conversation
2d7c4f6 to
f940dc4
Compare
Following the plan in https://github.com/ToposInstitute/CatColab-Roadmap/issues/59 , this change implements a bespoke document type for Petri nets which mirrors that used by Petrinaut internally, but constrained to those subset of features we will aim to support. Additionally it introduces a "delta lens" trait (for documents, is the intention). This is designed to support the use-case of keeping two different document types containing "compatible" content in-sync with one-another by providing a structured serialisation to, and updates based on changes in, "formal content". This lens trait is implemented for Notebooks and PetriNets. Future work: * integration of autosurgeon in the rust to allow automerge to learn from delta lens driven updates * teaching the backend about linked pairs of documents (Notebook + Petri net), and wiring them together with the delta lenses * much front-end work to support the embedded component and interacting with these linked pairs, along with some constraints on what the notebook editor will accept/allow in that mode
f940dc4 to
f950a5c
Compare
Collaborator
Author
|
cc @kasbah |
Collaborator
Author
|
as far as merge strategies go, the goal would be to incrementally commit pieces of the puzzle to the repo. I'm happy to be flexible on what those boundaries should be, and whether we do or do not want to merge TODOs/commented out next steps as in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following the plan in
https://github.com/ToposInstitute/CatColab-Roadmap/issues/59 , this change implements a bespoke document type for Petri nets which mirrors that used by Petrinaut internally, but constrained to those subset of features we will aim to support.
Additionally it introduces a "delta lens" trait (for documents, is the intention). This is designed to support the use-case of keeping two different document types containing "compatible" content in-sync with one-another by providing a structured serialisation to, and updates based on changes in, "formal content". This lens trait is implemented for Notebooks and PetriNets.
Future work:
integration of autosurgeon in the rust to allow automerge to learn from delta lens driven updates
making contact with typescript at all --- there appear to be a lot of baked-in assumptions about the current document types
teaching the backend about linked pairs of documents (Notebook + Petri net), and wiring them together with the delta lenses
much front-end work to support the embedded component and interacting with these linked pairs, along with some constraints on what the notebook editor will accept/allow in that mode