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.180.212.17 with SMTP id ng17mr1549870wic.2.1377282501206; Fri, 23 Aug 2013 11:28:21 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!g3no14550791wic.0!news-out.google.com!cc8ni49507wib.1!nntp.google.com!proxad.net!feeder1-2.proxad.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: comp.realtime,comp.lang.ada Subject: Mealy machines, temporal logic, and Moore Followup-To: comp.realtime Date: Fri, 23 Aug 2013 20:27:48 +0200 Organization: Aioe.org NNTP Server Message-ID: <87zjs8gt36.fsf@nl106-137-194.student.uu.se> NNTP-Posting-Host: FplVx5MqBzlFp1u9bZOXWQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:wODAxStqxTfabU6/VNvLwA42gPk= Content-Type: text/plain; charset=us-ascii X-Original-Bytes: 2837 Xref: number.nntp.dca.giganews.com comp.lang.ada:183115 comp.realtime:41954 Date: 2013-08-23T20:27:48+02:00 List-Id: There has been some discussion in comp.realtime, as well as in comp.lang.ada, on this, and in the answers I got were encouragement to read up on Mealy machines, Moore machines, and Temporal logic, on Wikipedia. I did that, so I thought I'd write what I learned. It seems the machine in the exam question is a combination of a Mealy and a Moore machine (but not quite). In a Moore machine, input and state make for a transition to another state. And the visited state makes for output. In the exam question, there are information associated with the states (e.g., x <= 10) - this could be considered output, to be studied after the machine has been executed. "Aha, that's what happened." In a Mealy machine, input and state make for a transition to another state (as in a Moore machine), but, unlike in a Moore machine, that *transition* is associated with output, which is outputted when the transition is made. In the exam question, there is not really such "output", but rather assignment - e.g., "x := 0". Now, this is troublesome (?) because to synch the exam question with the Mealy/Moore machines I have considered the clock x as *input*. When there is a "x < 5" transition, I have considered that as a shorthand of parallel transitions for x = 0, x = 1, ..., x = 5 (assuming x cannot be negative). This seems sound, only now, with the "x := 0", it seems the machine, as output, *changes* its input! As for temporal logic, I'm struggling to understand the notation, and how it should be applied to the FSA. I'm unsure if you should introduce a new variable for the current state, or perhaps a list variable p = [A, B, ...] for an execution trace. -- Emanuel Berg - programmer (hire me! CV below) computer projects: http://user.it.uu.se/~embe8573 internet activity: http://home.student.uu.se/embe8573