# uses sem array in in stmt # (i.e., uses O_IN rather than O_RECEIVE) # but still sem optimizable resource e2() sem f[2][4] = ((1,0,1,1),(0,0,0,0)) procedure wf() { for [ i = 1 to 2 ] { for [ j = 1 to 4 ] { writes(?f[i][j]) } write() } } wf() for [ i = 1 to 2, j = 1 to 4 ] { V(f[i][j]) } wf() for [ i = 2 to 1 by -1, j = 4 to 1 by -1 ] { P(f[i][j]) } wf() for [ i = 1 to 2, j = 1 to 4 ] { V(f[i][j]) } wf() # should block after 8 iterations # if not, sems could be pointing at junk for [ j = 1 to 20 ] { in f[j%2+1][j%4+1]() -> write ("got",j) ni } end