In a programming model, a machine is represented in an object-oriented language
by extending a Machine base class representing a state machine, to form a first
class representing a first state machine. Each class extending the base class,
includes at least one variable reflecting a state of the machine it represents.
Also included are a method for receiving zero or more input parameters and advancing
a state of the machine; a method for returning data reflecting a state of the machine;
and an optional method that connects an output of one state machine to an input
of another state machine. The state machines can be nested (as the classes extending
the base class can be nested). A parallel program can be a single instance of a
class extending the base class. All machine instances execute concurrently, regardless
of where they are declared.