1 // This file is under GNU General Public License 3.0
6 // Copyleft (c) 2016, 2017, p≡p foundation
8 // Written by Volker Birk
10 decl version(major, minor);
12 // a protocol family has a name and an ID
14 decl protocol @name (id, threshold=10);
16 // each protocol in a family has a finite state machine
18 decl fsm @name (id, threshold=10);
20 // a state has a name and a timeout; after the timeout the state machine will
23 decl state @name (timeout=on);
27 decl event @name, on is event;
29 // external events can have IDs
31 decl external @name (id);
33 // a transistion moves the statemachine to another state
35 decl transition @target, go is transition;
37 // an action is executed; if an action name starts with 'send' then it is
40 decl action @name, do is action;
42 // send network messages
46 // a condition is for different cases
48 decl condition @name, if is condition;
51 // some events have messages on the line signalling the event to the
52 // communication partner
54 decl message @name (id, type=anycast, security=trusted);
56 // messages can have transmitted fields…
58 decl field @type @name;
60 // … or automatically calculated fields…
64 // … or list of fields