testPNs :: [(String, PN SimFlow SimValue)]
    testPNs = map runGraph graphs
        where
            runGraph (name, mk) = (name, snd $ runMkPNMonad0 mk)
            slice08 = 0 +: 8

            graphs = [
                ("A2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 8 0
                    teakA 8 [i0, i1] o),
                ("M2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 8 0
                    teakM 8 [i0, i1] o),
                ("J2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 16 0
                    teakJ [8, 8] [i0, i1] o),
                ("V23", do
                    wg0 <- withLabel "wg0" $ chan 8 0
                    wd0 <- withLabel "wd0" $ chan 0 0
                    wg1 <- withLabel "wg1" $ chan 8 0
                    wd1 <- withLabel "wd1" $ chan 0 0
                    rg0 <- withLabel "rg0" $ chan 0 0
                    rd0 <- withLabel "rd0" $ chan 8 0
                    rg1 <- withLabel "rg1" $ chan 0 0
                    rd1 <- withLabel "rd1" $ chan 8 0
                    rg2 <- withLabel "rg2" $ chan 0 0
                    rd2 <- withLabel "rd2" $ chan 8 0
                    teakV 8 [slice08, slice08] [slice08, slice08, slice08]
                        [wg0,wg1] [wd0,wd1] [rg0,rg1,rg2] [rd0,rd1,rd2]),
                ("V11", do
                    wg0 <- withLabel "wg0" $ chan 8 0
                    wd0 <- withLabel "wd0" $ chan 0 0
                    rg0 <- withLabel "rg0" $ chan 0 0
                    rd0 <- withLabel "rd0" $ chan 8 0
                    teakV 8 [slice08] [slice08] [wg0] [wd0] [rg0] [rd0]),
                ("S2", do
                    i <- withLabel "inp" $ chan 8 0
                    o0 <- withLabel "out0" $ chan 8 0
                    o1 <- withLabel "out1" $ chan 8 0
                    teakS 8 slice08 [slice08, slice08] [[Imp 0 0], [Imp 0 0]] i [o0, o1]),
                ("F2", do
                    i <- withLabel "inp" $ chan 8 0
                    o0 <- withLabel "out0" $ chan 8 0
                    o1 <- withLabel "out1" $ chan 8 0
                    teakF [slice08, slice08] i [o0, o1]),
                ("R", do
                    c <- withLabel "out" $ chan 0 0
                    teakR c),
                ("I", do
                    inp <- withLabel "inp" $ chan 0 0
                    out <- withLabel "out" $ chan 0 0
                    teakI inp out),
                ("O", do
                    inp <- withLabel "inp" $ chan 0 0
                    out <- withLabel "out" $ chan 8 0
                    teakO [(1, TeakOConstant 8 0)] inp out),
                ("C", do
                    withLabel "C0" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 0
                    withLabel "C1" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 1
                    withLabel "C2" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 2
                    return ())
                ]
testPNs :: [(String, PN SimFlow SimValue)]
testPNs = map runGraph graphs
        where
            runGraph (name, mk) = (name, snd $ runMkPNMonad0 mk)
            slice08 = 0 +: 8

            graphs = [
                ("A2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 8 0
                    teakA 8 [i0, i1] o),
                ("M2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 8 0
                    teakM 8 [i0, i1] o),
                ("J2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 16 0
                    teakJ [8, 8] [i0, i1] o),
                ("V23", do
                    wg0 <- withLabel "wg0" $ chan 8 0
                    wd0 <- withLabel "wd0" $ chan 0 0
                    wg1 <- withLabel "wg1" $ chan 8 0
                    wd1 <- withLabel "wd1" $ chan 0 0
                    rg0 <- withLabel "rg0" $ chan 0 0
                    rd0 <- withLabel "rd0" $ chan 8 0
                    rg1 <- withLabel "rg1" $ chan 0 0
                    rd1 <- withLabel "rd1" $ chan 8 0
                    rg2 <- withLabel "rg2" $ chan 0 0
                    rd2 <- withLabel "rd2" $ chan 8 0
                    teakV 8 [slice08, slice08] [slice08, slice08, slice08]
                        [wg0,wg1] [wd0,wd1] [rg0,rg1,rg2] [rd0,rd1,rd2]),
                ("V11", do
                    wg0 <- withLabel "wg0" $ chan 8 0
                    wd0 <- withLabel "wd0" $ chan 0 0
                    rg0 <- withLabel "rg0" $ chan 0 0
                    rd0 <- withLabel "rd0" $ chan 8 0
                    teakV 8 [slice08] [slice08] [wg0] [wd0] [rg0] [rd0]),
                ("S2", do
                    i <- withLabel "inp" $ chan 8 0
                    o0 <- withLabel "out0" $ chan 8 0
                    o1 <- withLabel "out1" $ chan 8 0
                    teakS 8 slice08 [slice08, slice08] [[Imp 0 0], [Imp 0 0]] i [o0, o1]),
                ("F2", do
                    i <- withLabel "inp" $ chan 8 0
                    o0 <- withLabel "out0" $ chan 8 0
                    o1 <- withLabel "out1" $ chan 8 0
                    teakF [slice08, slice08] i [o0, o1]),
                ("R", do
                    c <- withLabel "out" $ chan 0 0
                    teakR c),
                ("I", do
                    inp <- withLabel "inp" $ chan 0 0
                    out <- withLabel "out" $ chan 0 0
                    teakI inp out),
                ("O", do
                    inp <- withLabel "inp" $ chan 0 0
                    out <- withLabel "out" $ chan 8 0
                    teakO [(1, TeakOConstant 8 0)] inp out),
                ("C", do
                    withLabel "C0" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 0
                    withLabel "C1" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 1
                    withLabel "C2" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 2
                    return ())
                ]
testPNs = map runGraph graphs
        where
            runGraph (name, mk) = (name, snd $ runMkPNMonad0 mk)
            slice08 = 0 +: 8

            graphs = [
                ("A2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 8 0
                    teakA 8 [i0, i1] o),
                ("M2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 8 0
                    teakM 8 [i0, i1] o),
                ("J2", do
                    i0 <- withLabel "inp0" $ chan 8 0
                    i1 <- withLabel "inp1" $ chan 8 0
                    o <- withLabel "out" $ chan 16 0
                    teakJ [8, 8] [i0, i1] o),
                ("V23", do
                    wg0 <- withLabel "wg0" $ chan 8 0
                    wd0 <- withLabel "wd0" $ chan 0 0
                    wg1 <- withLabel "wg1" $ chan 8 0
                    wd1 <- withLabel "wd1" $ chan 0 0
                    rg0 <- withLabel "rg0" $ chan 0 0
                    rd0 <- withLabel "rd0" $ chan 8 0
                    rg1 <- withLabel "rg1" $ chan 0 0
                    rd1 <- withLabel "rd1" $ chan 8 0
                    rg2 <- withLabel "rg2" $ chan 0 0
                    rd2 <- withLabel "rd2" $ chan 8 0
                    teakV 8 [slice08, slice08] [slice08, slice08, slice08]
                        [wg0,wg1] [wd0,wd1] [rg0,rg1,rg2] [rd0,rd1,rd2]),
                ("V11", do
                    wg0 <- withLabel "wg0" $ chan 8 0
                    wd0 <- withLabel "wd0" $ chan 0 0
                    rg0 <- withLabel "rg0" $ chan 0 0
                    rd0 <- withLabel "rd0" $ chan 8 0
                    teakV 8 [slice08] [slice08] [wg0] [wd0] [rg0] [rd0]),
                ("S2", do
                    i <- withLabel "inp" $ chan 8 0
                    o0 <- withLabel "out0" $ chan 8 0
                    o1 <- withLabel "out1" $ chan 8 0
                    teakS 8 slice08 [slice08, slice08] [[Imp 0 0], [Imp 0 0]] i [o0, o1]),
                ("F2", do
                    i <- withLabel "inp" $ chan 8 0
                    o0 <- withLabel "out0" $ chan 8 0
                    o1 <- withLabel "out1" $ chan 8 0
                    teakF [slice08, slice08] i [o0, o1]),
                ("R", do
                    c <- withLabel "out" $ chan 0 0
                    teakR c),
                ("I", do
                    inp <- withLabel "inp" $ chan 0 0
                    out <- withLabel "out" $ chan 0 0
                    teakI inp out),
                ("O", do
                    inp <- withLabel "inp" $ chan 0 0
                    out <- withLabel "out" $ chan 8 0
                    teakO [(1, TeakOConstant 8 0)] inp out),
                ("C", do
                    withLabel "C0" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 0
                    withLabel "C1" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 1
                    withLabel "C2" $ teakLink "C" $ NetworkLink 0 8 $ HalfBuffer 2
                    return ())
                ]