AlgebraicJulia / DataMigrations.jl

https://algebraicjulia.github.io/DataMigrations.jl/
MIT License
2 stars 0 forks source link

MethodError in limit migration #145

Closed filonik-cmu closed 9 months ago

filonik-cmu commented 9 months ago

The following migration produces an error:

@present SchSet(FreeSchema) begin
  X::Ob
end

@acset_type Set(SchSet)

g = @acset Graph begin
  V = 3
  E = 3
  src = [1,2,2]
  tgt = [2,2,3]
end

M = @migration SchSet SchGraph begin
  X => @limit begin
    e::E
    v::V
    (e → v)::src
    (e → v)::tgt
  end
end

g_limit = migrate(Set, g, M)

The error is:

MethodError: Cannot `convert` an object of type Catlab.CategoricalAlgebra.Sets.CompositeFunction{Catlab.CategoricalAlgebra.FinSets.FinSetInt, TypeSet{Int64}, Catlab.CategoricalAlgebra.FinSets.FinDomFunctionVector{Int64, Vector{Int64}, Catlab.CategoricalAlgebra.FinSets.FinSetInt}, Catlab.CategoricalAlgebra.Sets.SetFunctionCallable{Int64, Int64, Catlab.CategoricalAlgebra.FinSets.FinSetInt, TypeSet{Int64}}} to an object of type Catlab.CategoricalAlgebra.Sets.SetFunctionCallable{Int64, Int64, Catlab.CategoricalAlgebra.FinSets.FinSetInt, TypeSet{Int64}}

Closest candidates are:
  convert(::Type{T}, ::T) where T
   @ Base Base.jl:84

Status:

Status `~/Notebooks/Julia/DevEnv/Project.toml`
⌃ [134e5e36] Catlab v0.15.5
  [0c4ad18d] DataMigrations v0.0.1 `https://github.com/AlgebraicJulia/DataMigrations.jl.git#main`
Info Packages marked with ⌃ have new versions available and may be upgradable.
KevinDCarlson commented 9 months ago

This will be solved by https://github.com/AlgebraicJulia/Catlab.jl/pull/867.