BNF for SpiFcp - see CONSTANTS.txt for the BNF of Logix constants. ::= . . . ::= . ::= ::= export() ::= public() ::= baserate() ::= weighter() ::= , ::= () ::= , ::= , ::= ::= () ( , ) ::= infinite ::= . ::= ::= ::= ::= :- ::= + +() ::= () ::= , ::= ::= ::= ; ::= , ::= ::= ? ? ::= ! ! ::= delay() delay(, ) ::= * * ::= [] {} ::= ::= ; otherwise , ::= ; ::= , ::= & ::= =?= =\= ::= ; ::= , ::= {} (logix_ask>, : ) ::= ; ::= | ::= : ::= , ::= , ::= , ::= | ::= true 0 ::= + ::= + ::= () ::= self ::= ::= , ::= = ::= = ::= << >> ::= . ::= . ::= # # # ::= set_base_rate(, ) randomize_messages() serialize_messages() get_channel_status( , , ) object() object(, ) ::= ! ::= close close() name() name(, ) read() read(, ) store() store(, ) values() values(, ) ::= , ::= , ::= Primitives: ---------- A is an alpha-numeric string, which may contain underscore characters, beginning with an upper-case letter for an , or with a lower-case letter for a . A is an alpha-numeric string, which may contain underscore characters, beginning with a lower-caseletter. It represents a Pi Calculus channel. A is an alpha-numeric string, which may contain underscore characters, beginning with a lower-case letter. The currently acceptable values of are "default" and "michaelis" - additional values may be defined - see weighter.txt . A is an alpha-numeric string, which may contain underscore characters, beginning with an upper-case letter, or it may be a single underscore character. The string may be followed by optional single-quote characters. By convention the single underscore character is an anonymous ; it may not appear in place of an in a . A is a non-negative real number, which is a factor in the stochastic weighting of a . When the of a is 0, the channel acts as a sink - all messages on that channel are discarded. Semantics: --------- A in a is an implicit argument of every process in the program. Any argument of a may be provided by a caller in a , replacing any implicit argument of the same name. An argument may be "extruded" from a by a . An argument may be replaced in a which is added to the in the of a . A may be specified by a in the or in a . In the former case, or when the is within a , the itself must be declared in a ; in the latter case, when the channel is a which is added in the , the may be declared in a containing scope, as an argument of the process or in a . In any case, the should be instantiated to a non-negative number. A may be specified by a logix variable in the or in a . In the former case, or when the is within a , the itself must be declared in a ; in the latter case, when the channel is a which is added in the , the may be declared in a containing scope, as an argument of the process or in a . In any case, the should be instantiated to a string (see above). A should be a number to be used in calculating the value of the . A may be specified by a , whose value is a number (as above for a ) or by an object. When that is an object, its monitor's current value should be a number, which is used in calculating the value of the . An argument in a which precedes the or which is a may be a read-only-variable (?). The must be instantiated before the can be completed. When a is completed, the trailing is instantiated - its value is usually the string "true", but it may vary in some cases. The program macro get_channel_status instantiates the trailing to the values of the named - see program_macros.txt for details regarding values. A is a which is instantiated at the conclusion of the request; if the request succeeded, it is instantiated to the the string "true", or if the request failed, it is instantiated to a diagnostic, explaining the failure. Logix Terms: ----------- A is any predicate permitted in the {\bf ask} of a guard in Logix language(compound). A is any predicates permitted in the {\bf tell} of a guard in Logix language(compound). A is any predicate defined by the LOGIX system library or by the SpiFcp system library. A is a or any predicate defined by a . A is any term permitted in the path specification of a remote procedure call in LOGIX language(compound). Notes: ----- The "new" predicate has been subsumed into a prefix of a and the added of a . A which is declared at level one of a definition, may be called by an external process, if it is exported explicitly in an , or if there is no in the , in which case all level one processes are exported. Nested "new" processes are scoped with double angle brackets (see definition of ). Each in a must be to a whose consists of . The reserved words are "self", "true" and "otherwise". They are reserved in context, and may be used as channel names. "self" may be used to iterate any process, including anonymous processes. "true" is an alternative name for process 0. "otherwise" appears as the guard of the last clause of . An argument which is declared as a in the added of a is initially uninstantiated. Within a , normal logix recognition of variables applies - i.e. variable names all begin with a capital letter or underscore; to reference a , whose name begins with a lower case letter, within a , refer to '_var'(). A A may have a value which is an arbitrary Logix term. Such a value may be tested by an , instantiated or used as an argument in a or , in a or in a . An arbitrary may be sent in a by the spi_send/2, or received by the spi_receive/2: spi_send(, ) spi_receive(, ) e.g. spi_send({"A string", a(Tuple), [A, list | Tail]}, '_var'(channel)) spi_receive('_var'(channel), {Arg1, String(f(x)), Arg3}) The s spi_send/3, spi_receive/3, spi_send/4, spi_receive/4 may be used as well, where the third argument is a multiplier (default 1), and the fourth argument is an identifier (default string "sender" or "receiver"). A may be instantiated by the : = A may also be used to initialise an object, or as a "value" stored by an . The additive definition of is syntactic sugar - e.g. P+() ::= . is equivalent to: P ::= << . P1 . P1 ::= >> . The recursive definition of is syntactic sugar - e.g. P ::= , {} , Q; , ( , R; otherwise , S). is equivalent to: P ::= , << P1 . P1 ::= {} , Q >>; , << P2 . P2 ::= , R ; otherwise , S >>. and P ::= , ( {} , Q ; {} , R ) . is equivalent to: P ::= , << P1 . P1 ::= {} , Q ; {} , R >> . The term ? is syntctic sugar for: ? [] The term ! is syntactic sugar for: ! [] This document is licensed under Gnu General Public License - Version 3 http://www.nongnu.org/efcp/gnu-gpl3.html