You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The colimit of an empty diagram fails for Dynamic ACSets. The code below should produce the following error.
This is using Catlab v0.15.5 and AlgebraicRewriting v0.2.1.
Code
using Catlab
using AlgebraicRewriting
# Set-up
function make_cache(type, schema)
cache_dir = mkpath(joinpath(@__DIR__, "cache"))
cache = Dict(Iterators.map(ob -> begin
name = nameof(ob)
path = joinpath(cache_dir, "$name.json")
if isfile(path)
@info "Reading representables from $path"
rep = read_json_acset(type, path)
else
@info "Computing representable $name"
rep = representable(type, schema, name)
write_json_acset(rep, path)
end
name => (rep, 1)
end, generators(schema, :Ob)))
end
@present SchFoo(FreeSchema) begin
X::Ob
A::AttrType
attribute::Attr(X, A)
end
const Foo = DynamicACSet("Foo", SchFoo; type_assignment=Dict(:A => Symbol))
cache = make_cache(Foo, SchFoo)
y = yoneda(Foo; cache=cache)
delete_node_diagram = @migration(SchRule, SchFoo, begin
L => @join begin
x0::X
end
R => @join begin end
K => @join begin end
end)
rule = colimit_representables(delete_node_diagram, y)
Error:
BoundsError: attempt to access 0-element Vector{DynamicACSet{IntParts}} at index [1]
The colimit of an empty diagram fails for Dynamic ACSets. The code below should produce the following error.
This is using Catlab v0.15.5 and AlgebraicRewriting v0.2.1.
Code
Error:
BoundsError: attempt to access 0-element Vector{DynamicACSet{IntParts}} at index [1]
The text was updated successfully, but these errors were encountered: