Does statemachine and statechart mean the same?

☆樱花仙子☆ 提交于 2019-11-30 14:52:38

问题


I have heard people using these terms.

I wonder if they refer to the same thing or is there a difference between these two?


回答1:


Wikipedia actually covers this pretty well. http://en.wikipedia.org/wiki/State_diagram

State machines have been around for a long time (decades at least). They consist of states (usually circles) and arrows between the states where certain actions can trigger an transition along an arrow. Moore and Mealy machines are the two main variants, which indicate whether the output is derived from the transitions or the states themselves.

Statecharts were invented by David Harel, and are sometimes called Harel Statecharts. He defined a pretty broad extension to typical state machines, with the goal of making state machines more useful for actual work with complicated systems.

A variant of Statecharts are build into Matlab now, as stateflow, which is an extension of simulink. Statesharts are also the basis of the UML "State Machine Diagrams".




回答2:


Learn more about Stateflow in general at: https://www.mathworks.com/help/stateflow/examples.html

Stateflow has been updated for making it very easy to create state machines and flow charts in R2012b.

The major updates include a new graphical editor, state transition tables, MATLAB as the action language and an integrated debugger.



来源:https://stackoverflow.com/questions/8192724/does-statemachine-and-statechart-mean-the-same

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!