Closed epatters closed 1 year ago
This is pretty cool @epatters, can you explain the arg1, arg2 syntax in the migration macro?
group_migration = @migration SchLabelledPetriNet SchLabeledSet begin
S => S
T => @product (s1::S; s2::S)
(I, O) => @cases begin
arg1 => @product (s1::S; s2::S)
arg2 => @product (s1::S; s2::S)
end
(is, os) => begin
arg1 => s1
arg2 => s2
end
(it, ot) => begin
arg1 => (s1 => s1; s2 => s2)
arg2 => (s1 => s1; s2 => s2)
end
Name => Label
sname => label
tname => s1 ⋅ label # XXX: Should use both labels.
end;
arc1
and arc2
, but either way, these represent the two input arcs and two output arcs for each transition, which in this example are "infection-type transitions".Symbol("$(label(s1))_$(label(s2))")
. To support that, I need to implement https://github.com/AlgebraicJulia/Catlab.jl/issues/577. That's probably the most important outstanding feature for data migration. It shouldn't be too much work. I just need to figure out a coherent syntax for it and make time to actually implement it.This looks awesome! See @kris-brown, I knew we'd learn something cool by thinking about the general form of the problem you were trying to solve.
Sounds good, I leave that to whoever is managing this repo.
This may not get used for the demo, but I wanted to show how it works. I wasn't sure where to put the notebook, so feel free to move it somewhere else.