system implementation sys.impl
    parameters
        A0: set of indices;
        A1: set of indices;
        A2: set of indices;
        A3: set of indices;
        A4: set of indices;
        A5: set of indices;

    subcomponents
        s: single;
        d: single;
        a0: set indexed by A0;
        a1: set indexed by A1;
        a2: set indexed by A2;
        a3: set indexed by A3;
        a4: set indexed by A4;
        a5: set indexed by A5;

    connections
        s -> a0[0];
        a5[4] -> d;

        a0[x] -> a0[y] if x < y for x in A0, y in A0;
        a1[x] -> a1[y] if x < y for x in A1, y in A1;
        a2[x] -> a2[y] if x < y for x in A2, y in A2;
        a3[x] -> a3[y] if x < y for x in A3, y in A3;
        a4[x] -> a4[y] if x < y for x in A4, y in A4;
        a5[x] -> a5[y] if x < y for x in A5, y in A5;

        a0[x] -> a1[y] if x < y for x in A0, y in A1;
        a1[x] -> a2[y] if x < y for x in A1, y in A2;
        a2[x] -> a3[y] if x < y for x in A2, y in A3;
        a3[x] -> a4[y] if x < y for x in A3, y in A4;
        a4[x] -> a5[y] if x < y for x in A4, y in A5;

    reconfigurations
        exists(x not in A0, next(A0) = add(A0, x));
        exists(x in A0, next(A0) = remove(A0, x));

        exists(x not in A1, next(A1) = add(A1, x));
        exists(x in A1, next(A1) = remove(A1, x));

        exists(x not in A2, next(A2) = add(A2, x));
        exists(x in A2, next(A2) = remove(A2, x));

        exists(x not in A3, next(A3) = add(A3, x));
        exists(x in A3, next(A3) = remove(A3, x));

        exists(x not in A4, next(A4) = add(A4, x));
        exists(x in A4, next(A4) = remove(A4, x));

        exists(x not in A5, next(A5) = add(A5, x));
        exists(x in A5, next(A5) = remove(A5, x));

end sys.impl;
