sync/fsm.yml2
author Volker Birk <vb@pep-project.org>
Thu, 09 Jul 2020 17:41:28 +0200
changeset 4840 d66a165ecd9c
parent 4544 4a58532de984
permissions -rw-r--r--
Automatically bumped next RC info to version 2.1.0-RC15
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 // FSM Y language 1.2
     5 
     6 // Copyleft (c) 2016, 2017, p≡p foundation
     7 
     8 // Written by Volker Birk
     9 
    10 decl version(major, minor);
    11 
    12 // a protocol family has a name and an ID
    13 
    14 decl protocol @name (id, threshold=10);
    15 
    16 // each protocol in a family has a finite state machine
    17 
    18 decl fsm @name (id, threshold=10);
    19 
    20 // a state has a name and a timeout; after the timeout the state machine will
    21 // be reset
    22 
    23 decl state @name (timeout=on);
    24 
    25 // events have names
    26 
    27 decl event @name, on is event;
    28 
    29 // external events can have IDs
    30 
    31 decl external @name (id);
    32 
    33 // a transistion moves the statemachine to another state
    34 
    35 decl transition @target, go is transition;
    36 
    37 // an action is executed; if an action name starts with 'send' then it is
    38 // sending a message
    39 
    40 decl action @name, do is action;
    41 
    42 // send network messages
    43 
    44 decl send @name;
    45 
    46 // a condition is for different cases
    47 
    48 decl condition @name, if is condition;
    49 decl else;
    50 
    51 // some events have messages on the line signalling the event to the
    52 // communication partner; the rate limit is in seconds until such a mesage can
    53 // be repeated, 0 means off
    54 
    55 decl message @name (id, type=anycast, security=trusted, ratelimit=0);
    56 
    57 // messages can have transmitted fields…
    58 
    59 decl field @type @name;
    60 
    61 // … or automatically calculated fields…
    62 
    63 decl auto < field >;
    64 
    65 // … or list of fields
    66 
    67 decl list < field >;
    68