Functor Syntax is not working

The following code shows the two schemas and a functor between them. However, the basic syntax of the functor is throwing errors. Can someone help me with this?

using Catlab, Catlab.Theories, Catlab.CategoricalAlgebra
@present Sch1(FreeSchema) begin
  (N1, N2)::Ob
  f::Hom(N1,N2)

  (Name, Salary, Age)::AttrType
  name::Attr(N1, Name)
  salary::Attr(N1, Salary)
  age::Attr(N2, Age)
end

@present Sch2(FreeSchema) begin
  N::Ob
  (Name, Salary, Age)::AttrType
  name::Attr(N, Name)
  salary::Attr(N, Salary)
  age::Attr(N, Age)
end

using Test

using Catlab, Catlab.Graphs, Catlab.CategoricalAlgebra
using Catlab.Programs.DiagrammaticPrograms
using Catlab.Programs.DiagrammaticPrograms: NamedGraph
using Catlab.WiringDiagrams.CPortGraphs

F = @finfunctor Sch1 Sch2 begin
    N1 => N;
    N2 => N
end

Error

Object N1 is not assigned Stacktrace: [1] error(s::String)*

I don’t know anything about Catlab, but as a general note it will be easier to help if you paste the code as text rather than a screenshot.

1 Like

Thanks will edit it