You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

68 lines
1.4 KiB

// This file is under GNU General Public License 3.0
// see LICENSE.txt
// FSM Y language 1.2
// Copyleft (c) 2016, 2017, p≡p foundation
// Written by Volker Birk
decl version(major, minor);
// a protocol family has a name and an ID
decl protocol @name (id, threshold=10);
// each protocol in a family has a finite state machine
decl fsm @name (id, threshold=10);
// a state has a name and a timeout; after the timeout the state machine will
// be reset
decl state @name (timeout=on);
// events have names
decl event @name, on is event;
// external events can have IDs
decl external @name (id);
// a transistion moves the statemachine to another state
decl transition @target, go is transition;
// an action is executed; if an action name starts with 'send' then it is
// sending a message
decl action @name, do is action;
// send network messages
decl send @name;
// a condition is for different cases
decl condition @name, if is condition;
decl else;
// some events have messages on the line signalling the event to the
// communication partner; the rate limit is in seconds until such a mesage can
// be repeated, 0 means off
decl message @name (id, type=anycast, security=trusted, ratelimit=0);
// messages can have transmitted fields…
decl field @type @name;
// … or automatically calculated fields…
decl auto < field >;
// … or list of fields
decl list < field >;