Program macros may be called in the body of a Stochastic Pi Calculus program. They have the general form: () ::= , ::= , ::= , ::= [] ? ::= ::= , ::= , A string may be any logix string, including arbitrary quoted strings. The possible string values may be enumerated for a specific macro. A read-only variable (?) may appear in place of any . The must be instantiated to the appropriate constant before the macro can be performed. The trailing is optional. Unless otherwise indicated; for most macros it is set to true when the macro is successfully completed The following program macros are defined. M1. set_base_rate( , , ) The baserate of each of the designated channels is set to the the 's value. If the first argument is not (convertible to) real, the is set to false(, []) . Example: set_base_rate(3.7, a, b, c, Reply) sets Reply to true when the baserates of channels a, b and c have been set to 3.7. M2. randomize_messages( , ) Each of the designated channels is set to randomly select send and receive (or two dimer) offers to be completed, when the channel is chosen for transmission. M3. serialize_messages( , ) Each of the designated channels is set to select a send and a receive (or two dimer) offers to be completed on a first-come-first-served basis, when the channel is chosen for transmission. M4. get_channel_status( , , ) The is a list of names of channel attributes. When the consists of exactly one attribute name, the reply is set to the value of the 's corresponding element. When the consists of multiple attribute names, the is set to a of named values of the 's corresponding attributes. The following table enumerates the named channel attributes and their values. Name Value blocked true or false type based, bimolecular, or homodimerized, or #based, #bimolecular, or #homodimerized; baserate number; references count of references to the channel; messages {, } for a based or bimolecular channel; message count for a homodimerized channel; sends count of sends; receives receives count (0 for a homodimerized channel); dimers message count (sends if a bimolecular channel); weight real ** or **(-1); sendweight summed weight of sends (or dimers); receiveweight summed weight of receives (or 0); dimerweight summed weight of sends; name unique identifier of the channel. The attribute name all may be used to designate the list: blocked, type, rate, refs, messages, weight, name Examples: 1. get_channel_status(a, type, X) Set variable X to one of the strings based, bimolecular or homodimerized, or to one of the 2-tuples, #based, #bimolecular or #homodimerized. 2. get_channel_status(a, blocked, rate, messages, weight, name, L) | screen#display_stream(L, prefix("Channel a")) Display, e.g: Channel a - 1 blocked = false Channel a - 2 rate = 3.7 Channel a - 3 messages = {17, 3} Channel a - 4 weight = 233.1 Channel a - 5 name = Example.eg(11) This document is licensed under Gnu General Public License - Version 3 http://www.nongnu.org/efcp/gnu-gpl3.html