Catlab.jl
Catlab.jl copied to clipboard
Use uniform representation of schemas
There should be a consistent data type for schemas. Right now, we have type-level schemas and value-level schemas. With the upcoming changes to the julia compiler, this should no longer be necessary. A schema should then be something that looks like the following.
(obs = (:E,:V), attrtypes=(:Weight), homs = (src=(:E,:V), tgt=(:E,:V)), attrs = (weight=(:E,:Weight)))
It has to be a namedtuple instead of a struct because then it can be stuck inside a type. There can also be a "dynamic" version, where obs and attrtypes are vectors and homs and attrs are dicts. Then we can get rid of the whole SchemaDesc
, SchemaDescType
, SchemaDescTypeType
garbage.
For reference, this feature will be enabled by PR https://github.com/JuliaLang/julia/pull/46300, which should land in Julia v1.9.