A finite state machine/system is one that: a. knows the current status of the "machine" at all times b. can recognise a state change of the machine c. reacts to a state change via a predetermined set of rules d. triggers a change in state for any state change in (c) above
Although this would seem to be how any program/system can be defined, the Finite State Machine (FSM) is very rigid in how it models the "system". You need very structured code patterns and usually these are driven via an events table where each event can have a number of states with events being rows and states being columns. The table is scanned via the events handler and the combination of row/column values at any instant in time dictate either a state change or a requirement for a state change. This state change is then handled, normally in an alternative programming thread and the results of the change fed back into the events table. What happens is that the system becomes virtually dynamic with regards to "consequential events" as there will be a finite but usually very large number of "states" that have to be processed or recognised. Lots of the mainframe operating systems that I used to work on at Singer used this methodology as did the early microcode mainframes at ICL. The biggest difficulty in writing software this way is not the programming, it is actually defining the finite number of events, states and combinations of the two that will generate a state change that may or may not affect the actual state of the thread that is currently processing the change. Hope this makes sense as although it is a simple concept, the implementation of it is not a trivial task. Dave -----Original Message----- From: ProFox [mailto:[email protected]] On Behalf Of Nicholas Geti Sent: 19 December 2013 04:35 To: [email protected] Subject: Finite State Machine Do any of you know the Finite State Machine technique for programming? Has anyone used it to do programming? Nick Geti --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

