From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!rt.uk.eu.org!news.albasani.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Ada platforms and pricing, was: Re: a new language, designed for safety ! Date: Mon, 23 Jun 2014 19:15:56 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <255b51cd-b23f-4413-805a-9fea3c70d8b2@googlegroups.com> <5ebe316d-cd84-40fb-a983-9f953f205fef@googlegroups.com> <2100734262424129975.133931laguest-archeia.com@nntp.aioe.org> <5156oy7vhg99.17wu6q2ef45ke.dlg@40tude.net> <18et97c0c22vc$.y98lxxfblijn.dlg@40tude.net> <08f83f70-ccb1-45ec-8a4c-46e3442745b8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 24 Jun 2014 02:15:57 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="ba346f17b503f6aa8ecbfd6d1e2a9f59"; logging-data="20753"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kmKOtBhMzazqqZPf64fitog4I0QQKn0M=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Cancel-Lock: sha1:CuqCUGi01WpYrmrsUIMyT3PwN/4= X-Original-Bytes: 3296 Xref: number.nntp.dca.giganews.com comp.lang.ada:187214 Date: 2014-06-23T19:15:56-07:00 List-Id: > On 6/23/2014 4:48 PM, Simon Wright wrote: >> >> There are times when state machines aren't appropriate and there are >> times when they are exactly the idiom you should be using. >> > > I remember once struggling with so many IF/ELSEIF/ENDIF/WHILE, etc... > trying to implement something, and then I learned about FSM programming. > > This was an application level, not low level system programming. Once > I setup things as FSM, things went smooth sailing. Needed an > initial state, final state, setup a diagram that tells me the > event that causes which state to jump to which state. Once I drew > this diagram, the coding part was easy. One can even setup a > matrix that represent the algorithm. State machines are a high-level language for specifying behavior. Translation to code is mechanical; in other words, one can write a compiler to convert a state machine into code. What the code looks like is as immaterial as what the intermediate representation for Ada looks like -- Jeff Carter "Crucifixion's a doddle." Monty Python's Life of Brian 82