Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for 'changing attribute values' via a DPO rewrite #76

Closed
kris-brown opened this issue Jul 18, 2024 · 0 comments · Fixed by #77
Closed

Remove support for 'changing attribute values' via a DPO rewrite #76

kris-brown opened this issue Jul 18, 2024 · 0 comments · Fixed by #77
Assignees
Labels
bug Something isn't working

Comments

@kris-brown
Copy link
Collaborator

kris-brown commented Jul 18, 2024

The current implementation of DPO with attributes allows the apex $I$ of a rule to have a variable which is bound to a variable in $L$ (this is required in order for $L \leftarrowtail I$ to be monic) and sent to either a variable or a concrete value in $R$. If sent to a concrete value, the rule has the effect of 'updating' the attribute to the fixed value. If sent to a variable in $R$, we could either specify no further information (in which case the value of the attribute is preserved) or give an "expression" as a function of the bound variables by the match, which again would 'update' the value of the attribute.

This is very convenient, because it avoids the tedium that we see when DPO forces one to delete something in order to change one of its outgoing homs (e.g. one must delete an edge to change its src). However, this convenience is not worth the complexity that it introduces, which has led to two practical problems:

  1. The pushout complement square required to do this 'updating' is not truly a pushout square. This makes writing the pushout_complement function inherently buggy.
  2. The bottom map $G \leftarrowtail K$ in the result of applying a rewrite rule is not truly monic. With recent updates to Catlab, the subobject code will now throw an error.

Removing this convenient 'feature' will simplify the library code, but it remains to be seen how hard it will be to reproduce our earlier examples without this convenience. For example, in a Lotka Volterra simulation, the counter on the vertices of the graph (representing grass growing) needs to update periodically. We cannot delete and recreate this vertex due to an unknown number of things depending on it. Because this attribute luckily happens to be an Int, we might get away with having another object DaysLeftToGrow with a hom into V and treat this combinatorially. Or the attribute could look more like a relation that we happen to enforce is a function (we have this same option when we really need the ability to change hom values via DPO).

A general solution may be patch graph rewriting.

@kris-brown kris-brown self-assigned this Jul 18, 2024
@kris-brown kris-brown added the bug Something isn't working label Jul 18, 2024
@kris-brown kris-brown linked a pull request Jul 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant