[WIP] Reify cowns and add taint
for visual story telling
#27
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.
This PR reifies cowns. These are objects, which are opaque by default, meaning that the linked region can't be accessed unless they're acquired. Currently, there is no mechanism to acquire a cown, but I already added checks for it in the required places.
Mermaid is aware of cowns and draws the node with two lines on the side and dotted outgoing edges. This is meant to show that they're not directly accessible. I'm open to any suggestions how to make this clearer or what to try out.
The
taint
instruction colors everything purple that can be reached from a given set of root nodes. For now only one root can be defined at a time. Cowns stop the propagation of taint.Here is a taint example from
valid_cowns.vpy
There is a taint example from
three_regions.vpy
, when the regions are still separateThere is a taint example from
three_regions.vpy
, after they have been connectedcc: @TobiasWrigstad in case you have some ideas how the visualization could be improved