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 X-Received: by 10.58.237.130 with SMTP id vc2mr124289vec.25.1403609139544; Tue, 24 Jun 2014 04:25:39 -0700 (PDT) X-Received: by 10.182.27.97 with SMTP id s1mr679obg.21.1403609139120; Tue, 24 Jun 2014 04:25:39 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!w8no11279324qac.0!news-out.google.com!gf2ni11igb.0!nntp.google.com!hn18no8581169igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 24 Jun 2014 04:25:38 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.252.147.203; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 71.252.147.203 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <557db566-fa02-4978-8798-50a097aa5407@googlegroups.com> Subject: Re: Ada platforms and pricing, was: Re: a new language, designed for safety ! From: "Dan'l Miller" Injection-Date: Tue, 24 Jun 2014 11:25:39 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3943 X-Received-Body-CRC: 2238369279 Xref: news.eternal-september.org comp.lang.ada:20579 Date: 2014-06-24T04:25:38-07:00 List-Id: On Tuesday, June 24, 2014 5:24:03 AM UTC-5, Simon Wright wrote: > Shark8 writes: > > On 23-Jun-14 13:21, Dan'l Miller wrote: > >> In the spirit of lambasting the lack of direct representation > >> of finite-state machines (FSMs) in Ada: > > > Wtf, there's a direct representation for state-machines: No, Shark8, that is the epitome of *not* direct representation of state-m= achines as a first-class citizen in {Ada, C, C++, ...}, because the compile= r has absolutely no clue that all the enumerations & branching are represen= ting an FSM. For example, (without an enormous amount of temporal-logic an= alysis, program slicing, and term-rewriting) the compiler cannot directly o= bserve: oh, the programmer wrote a Moore machine (see below), but I can op= timize the whole FSM by transforming it to a Mealy machine, or vice versa. = As another example, (without an enormous amount of temporal-logic analysis= , program slicing, and term-rewriting) the compiler cannot perform any grap= h-theoretic transforms on the FSM, because the FSM is contorted into excess= ively-sequential imperative code instead of declarative. > > Type State is ([...]); > > Type Event is ([...]); > > -- Here it is! > > FSM : Array(State, Event) of State:=3D ([...]); > > ...and that's Ada-83. > > You'd need the Action (access procedure (...)) to be executed on the > transition, too. Moore FSM: actions only on the entry of states http://en.wikipedia.org/= wiki/Moore_machine He was representing a Moore machine, which tends to increase the quantity= of states to discern context in the real-world. Mealy FSM: actions upon transition to next state http://en.wikipedia.or= g/wiki/Mealy_machine You are representing a Mealy machine, which is the more-mainstream modern= FSM, because pairs of states (i.e., the origin & destination of each trans= ition) provide a more natural (i.e., more expressive & more compact) way to= discern context.