Comments (3)
Thanks for the report. If that code is failing, it's a bug.
from catlab.jl.
The error is as follows. I guess a possible fix would be to do something here
Catlab.jl/src/wiring_diagrams/Algebras.jl
Lines 169 to 179 in 6c7c935
julia> query(data, testquery, (attr=3, ))
ERROR: Feet of spans are not equal: TypeSet(Int64) != TypeSet(Union{Int64, Symbol})
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] oapply(composite::Catlab.Programs.RelationalPrograms.UntypedNamedRelationDiagram{…}, spans::Vector{…}; Ob::Type, Hom::Type, return_limit::Bool)
@ Catlab.WiringDiagrams.WiringDiagramAlgebras ~/.julia/packages/Catlab/YRhzN/src/wiring_diagrams/Algebras.jl:54
[3] query(X::TestData{…}, diagram::Catlab.Programs.RelationalPrograms.UntypedNamedRelationDiagram{…}, params::@NamedTuple{…}; table_type::Type)
@ Catlab.WiringDiagrams.WiringDiagramAlgebras ~/.julia/packages/Catlab/YRhzN/src/wiring_diagrams/Algebras.jl:182
[4] query(X::TestData{…}, diagram::Catlab.Programs.RelationalPrograms.UntypedNamedRelationDiagram{…}, params::@NamedTuple{…})
@ Catlab.WiringDiagrams.WiringDiagramAlgebras ~/.julia/packages/Catlab/YRhzN/src/wiring_diagrams/Algebras.jl:158
[5] top-level scope
@ ~/Desktop/misc/tmp.jl:21
Some type information was truncated. Use `show(err)` to see complete types.
from catlab.jl.
@epatters I thought about this a bit, there's some tricky issues (or maybe I'm not seeing something obvious). The issue is setting up the constant function in SMultispan{1}(ConstantFunction(value, FinSet(1)))
. Obviously here the value
given by the user will just be some atomic type and not a union, but the codom of the constant function will also be just that type. Hence the issue when comparing the feet of spans, because the type of the acset X
passed at runtime will still be a union.
Even when calling the ConstantFunction
constructor explicitly with the exact type of the attribute extracted from the acset at runtime with subpart_type
, there will still be a problem because the type of the value
will be one of the types in the union, but the constructor needs them to be exact, in the type signature ConstantFunction{T,Value<:T,Dom,Codom<:SetOb{T}}
.
Any ideas? This may just be something to note and move on. Or insist that people use SumTypes.jl for these cases (kidding).
from catlab.jl.
Related Issues (20)
- Integrate ACSets.NautyInterface
- Reexport GATlab from Catlab
- VarFunction Serialization
- Fix an empty tuple problem ahead of Julia 1.10
- GATs are missing from API docs
- Warnings about cross references from docs build
- Move from JSON.jl to JSON3.jl
- Constraints on attributes in `maximum_common_subobject` HOT 5
- Maximum_common_subobject changes ordering
- Better graphviz support for bipartite graphs HOT 1
- Refactor FinSets from FinSetImpls, etc
- Add features to VM based hom search
- Ambiguities detected from Aqua
- Question about abstract vs. concrete type in `enumerate_paths` HOT 2
- `SigmaMigrationFunctor` method uses an undefined variable HOT 2
- Bug in `product` keyword arguments
- free-floating URLs not parsed well by documenter HOT 1
- Coproduct with looseACSetTransformations HOT 2
- Keyword argument for sending attrvars to other attrvars
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from catlab.jl.