public String toString() {
String ret = benkoBox.toString() + ": ";
if (count==0 || count>1 || recycle) {
- ret += "[";
+ ret += recycle ? "(" : "[";
if (count>1) ret += count;
if (count==0) ret += "*";
- if (recycle) ret += "r";
- ret += "] ";
+ ret += recycle ? ")" : "] ";
}
boolean needcomma = false;
if (tokenIn) { ret += (needcomma ? ", " : "") + "wait"; needcomma = true; }
- if (dataIn && latch) { ret += (needcomma ? ", " : "") + "take"; needcomma = true; }
- if (dataIn && !latch) { ret += (needcomma ? ", " : "") + "discard"; needcomma = true; }
+ if (dataIn && latch) {
+ if (benkoBox instanceof BenkoBox.Inbox)
+ ret += (needcomma ? ", " : "") + "receive";
+ else
+ ret += (needcomma ? ", " : "") + "take";
+ needcomma = true;
+ }
+ if (dataIn && !latch) { ret += (needcomma ? ", " : "") + "dismiss"; needcomma = true; }
if (dataOut) {
if (benkoBox instanceof BenkoBox.Inbox || dest==null)
ret += (needcomma ? ", " : "") + "deliver";
ret += (needcomma ? ", " : "") + "sendto "+dest;
needcomma = true;
}
- if (tokenOut) { ret += (needcomma ? ", " : "") + "ack "+dest; needcomma = true; }
+ if (tokenOut) { ret += (needcomma ? ", " : "") + "notify "+dest; needcomma = true; }
return ret;
}