This is an old revision of the document!
Example: Sender-Buffer-Receiver system
Agent S (sender) puts sequentially valueless signals to the buffer (agent B) and agent R (receiver) gets such signals from the buffer. Agent B offers two procedures (services, ports) to connected agents.
agent S {
loop { -- 1 comments contain steps numbers
out push; -- 2
}
}
agent B {
i :: Int = 0;
proc (i == 0) push {
in push; -- 1
i = 1; -- 2
exit; -- 3
}
proc (i /= 0) pop {
out pop; -- 4
i = 0; -- 5
exit; -- 6
}
}
agent R {
loop { -- 1
in pop; -- 2
}
}
