Skip to content

Petri net document type and delta lens#1298

Open
tslil-topos wants to merge 1 commit into
mainfrom
tslil/push-vozlnswwytrt
Open

Petri net document type and delta lens#1298
tslil-topos wants to merge 1 commit into
mainfrom
tslil/push-vozlnswwytrt

Conversation

@tslil-topos

@tslil-topos tslil-topos commented May 27, 2026

Copy link
Copy Markdown
Collaborator

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

@tslil-topos tslil-topos force-pushed the tslil/push-vozlnswwytrt branch from 2d7c4f6 to f940dc4 Compare May 27, 2026 23:27
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
@tslil-topos

Copy link
Copy Markdown
Collaborator Author

cc @kasbah

@tslil-topos

Copy link
Copy Markdown
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.

@epatters epatters added enhancement New feature or request external Work on interfacing with other tools labels Jun 1, 2026
@epatters epatters changed the title feature: Petri net document type, delta lens Petri net document type and delta lens Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request external Work on interfacing with other tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants