Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

state diagram  RSS feed

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36393
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am used to seeing something like this as a state diagram:

image from http://upload.wikimedia.org/wikipedia/commons/b/bc/Mealymachine_jaredwf.png

"Think Python" uses state diagram to mean the states of the variables. Where does this later use come from? Does either diagram have an alternate name?
 
Allen Downey
Author
Greenhorn
Posts: 28
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,

"State diagram" has several meanings in different contexts. The diagram you showed is a finite state machine. In UML, a state diagram usually shows the states of an interactive system and the events that cause transitions between states.

In Think Python I use the term in a slightly non-standard way, to refer to a diagram that shows the state of a running program. In UML it would be called an object diagram, but at the point in the book where I introduce state diagrams, we don't know about objects yet.

Allen
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!