- December 4, 2014 at 2:22 am #1958
The “Using Signals as Class State Machine Transitions” shows how OAL can be added to a transition.
1. Lahman recommends Moore FSM notation for reasons listed in his book. Is this good advice but some BridgePoint customers had their own opinions? Or, is it bad advice?
2. If we were going to add OAL to the transition, I thought it would send a signal to the instance based SM. The example actually sets a property instead. I know it is just an example but do I have it wrong? Is it normal to change “modes” by directly changing mode properties instead of sending signals?
Thank you for any insights.
Dan GDecember 4, 2014 at 2:24 am #1959
Oops, partial edit should not have left an extra mode in the title. Sorry.December 4, 2014 at 7:39 pm #1962Lee RiemenschneiderParticipant
1. I don’t remember if it was stated in the Shlaer-Mellor or Mellor-Balcer books or if I read/heard it elsewhere, but Moore and Mealy are mathematically equivalent. It really doesn’t matter which one you use. I agree with Lahman’s preference, but it really doesn’t matter.
2. I didn’t see anything in the video that said setting the mode attribute was causing a transition in the instance based SM. If it was the intended effect, then you would need to send a signal. The video is just showing simple OAL usage in a transition.December 4, 2014 at 8:31 pm #1964
Thanks, Lee. Mealy and Moore can always be alternatively used describe the same FSM. Lahman’s reason to adamantly insist on Moore is that Mealy treads on the “I’m done” perspective of events by implying events indicate “Do this.” So, good advice but opinions certainly could vary.
Right. There wasn’t an mention of what changing the mode property meant to the instance, let alone the instance SM. I was conflating mode and state. I looked at the GPS model but the display doesn’t even have an instance, just a class state machine whose actions change properties on instances of other classes and the UI.
- You must be logged in to reply to this topic.