AlgebraicJulia / AlgebraicRewriting.jl

Implementations of algebraic rewriting techniques like DPO, SPO, SqPO.
https://algebraicjulia.github.io/AlgebraicRewriting.jl/
MIT License
25 stars 5 forks source link

Inplace DPO rewrite method that returns maps #51

Open slwu89 opened 7 months ago

slwu89 commented 7 months ago

In the Inplace module https://github.com/AlgebraicJulia/AlgebraicRewriting.jl/blob/main/src/rewrite/Inplace.jl it would be nice to have something like rewrite_match_maps! which does the rewrite inplace but returns the maps like rewrite_match_maps does (https://github.com/AlgebraicJulia/AlgebraicRewriting.jl/blob/main/src/rewrite/DPO.jl).

This is helpful for using inplace rewriting with the incremental homset updating, for example. I'd be happy to look into how to make this contribution, but I don't understand what is going on in the Incremental module; with some rough guidance I could get started.

kris-brown commented 7 months ago

@epatters notes: we could have an ACSets.jl method which copies an ACSet in a way that they share the underlying columns but have independent bitmasks (such that much less data needs to be copied, overall), such that the same ACSet columns could be used in the domain and codomain.

Alternatively I'm sure we can find a way to make the incremental hom set code not require ACSetTransformations!