AlgebraicJulia / Catlab.jl

A framework for applied category theory in the Julia language
https://www.algebraicjulia.org
MIT License
599 stars 56 forks source link

Redesign ACSetFunctors when there are AttrVars #915

Closed KevinDCarlson closed 1 week ago

KevinDCarlson commented 1 week ago

Modifications to make attrvars play nicer with data migrations. The key change in CSets is to redefine ACSetFunctors, which are used critically in data migrations to compose with ordinary functors representing the migrations themselves, to again always take values in FinSetInts and FinDomFunctions when possible. Previously, the ACSetFunctor of an ACSet containing any Attrvars would take values entirely in VarSets, which both confused the difference between actual Attrvars and combinatorial data and interfaced badly with the Limits API.

To make this work I also defined how to compose FinFunctions with VarFunctions on the left.

KevinDCarlson commented 1 week ago

Hm, dunno what that was about but I've fixed it.