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

Integrate homomorphism search with @migration #160

Open
kris-brown opened this issue May 16, 2024 · 2 comments
Open

Integrate homomorphism search with @migration #160

kris-brown opened this issue May 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@kris-brown
Copy link

The @acset_colim macro is a beloved method of constructing individual ACSets. But, when people try to create rewrite rules, they need to specify a whole diagram of ACSets. After constructing the objects, they have lost the nice names they wrote down in the @acset_colim macro. The solution seems to be to use the @migration macro to directly specify the diagram. Something like:1

@migration(SchGraph, begin
  L => @join begin
    (e1,e2)::E
    src(e2)==tgt(e1)
  end
  I => @join begin
    (e1,e2)::E
    (v1,v2)::V
    src(e1)==v2
  end
  R => @join begin
    e::E 
    src(e)==tgt(e)
  end
  left::(I=>L) => begin 
    e1 => e1
    e2 => e1
    v1 => v2 
   end
   right::(I=>R) => begin end
end)

Here, the maps left and right are uniquely determined by these particular generators. A homomorphisms search with those values initialized would return exactly one morphism (for starters, anything else could throw an error).

Footnotes

  1. Maybe this syntax isn't exactly compatible with @migration because it's defining the shape category at the same time. You could ignore the ::(I=>L) stuff and pretend we have a macro specific for the span diagram. It would be helpful, though for a syntax which lets you do the shape on the fly since we may have negative/positive application conditions as well as other sorts of morphisms showing up relevant to rewriting.

@kris-brown kris-brown added the enhancement New feature or request label May 16, 2024
@ndo885
Copy link

ndo885 commented May 26, 2024

This functionality describing the mappings in terms of the descriptive names used by the user (e.g., introduced in @acset_colim invocations) would be very helpful for elevating the transparency of the rewrite rules which are central to our application of AlgebraicABMs & AlgebraicRewriting in our health models. Creation of such models is a central focus of the ABM hackathon currently underway, and we will -- further -- be making a major investment in creating such models for my semester-long course on applying these tools to health modeling in Fall 2024.

@slwu89
Copy link
Member

slwu89 commented May 28, 2024

Three cheers for better programmer quality of life and more declarative rules in the same feature request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants