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

    subcomponents
        s: single;
        d: single;
        a0: set indexed by A0;
        a1: set indexed by A1;
        a2: set indexed by A2;

    connections
        s -> a0[0];
        a2[1] -> 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;

        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;

    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));

end sys.impl;
