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

Use uniform representation of schemas #19

Open
olynch opened this issue Sep 6, 2022 · 1 comment
Open

Use uniform representation of schemas #19

olynch opened this issue Sep 6, 2022 · 1 comment

Comments

@olynch
Copy link
Member

olynch commented Sep 6, 2022

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.

@epatters
Copy link
Member

epatters commented Sep 7, 2022

For reference, this feature will be enabled by PR JuliaLang/julia#46300, which should land in Julia v1.9.

@epatters epatters transferred this issue from AlgebraicJulia/Catlab.jl May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants