By Topic

Managing State

Sign In

Cookies must be enabled to login.After enabling cookies , please use refresh or reload or ctrl+f5 on the browser for the login options.

Formats Non-Member Member
$33 $13
Learn how you can qualify for the best price for this item!
Become an IEEE Member or Subscribe to
IEEE Xplore for exclusive pricing!
close button

puzzle piece

IEEE membership options for an individual and IEEE Xplore subscriptions for an organization offer the most affordable access to essential journal articles, conference papers, standards, eBooks, and eLearning courses.

Learn more about:

IEEE membership

IEEE Xplore subscriptions

1 Author(s)

The notion of state is fundamental to the study of dynamical systems. State refers to the minimal set of information that fully describes the system at a specific time. The simplest state model is found in Fortran 77, where a program's state consists of the values of all its scalar variables and of all the elements of all arrays, the statement to be executed next, and the statements at which execution resumes at the end of each active subroutine or function. In the following, I'll concentrate on the variables, because the statement references are part of control flow and not directly accessible to the programmer. It's important, however, to remember that each state is associated with a precise point in the program's execution. The two important concepts in understanding data handling in Fortran 77 are thus value and variable, where the latter term includes the elements of arrays. Each variable has a value at each point in execution. This value is changed by an assignment statement. It can be used in an expression, where it's combined with other values (constants or the values of other variables) by operations, such as arithmetic, to produce new values. Languages such as C or Fortran 90 that offer pointers and dynamic memory allocation lead to a much more complicated description of state. Obviously the contents of the dynamically allocated storage must be included in the total state of a program, but that's only the first step. Each such storage block can itself contain pointers to other storage blocks. The neat distinction between variables and values disappears: the value of a variable can define another variable. As a consequence, it's no longer possible to compile a list of all parts of a program's state just by looking at its source code. What is or isn't part of the state is defined by the state itself.

Published in:

Computing in Science & Engineering  (Volume:14 ,  Issue: 1 )