lock = interface { free, locked } new = method() replies(self{free}) lock = method({free}l:self{locked}) free = method({locked}l:self{free}) end lock bbufl = interface extends bbuf and lock new = method(n:int) replies(self{empty.free}) put = method({empty.free,mid.free}b:self{mid.free,full.free}, i:int) get = method({full.free,mid.free}b:self{mid.free,empty.free}) replies(int) end bbufl