Single-shot entry code for software state transition

Data processing: software development – installation – and managem – Software program development tool – Testing or debugging

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S100000, C717S126000

Reexamination Certificate

active

06499136

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to software state transitions and, in particular, to execution of transition and entry code upon such transitions.
2. Description of the Related Art
Computer programs (software) are typically developed by programmers (program or code developers) writing the code for the program. The code is often written in a high-level language such as C++, Pascal, Fortran, Basic, or Forth. Software developers typically utilize a variety of techniques and tools in developing code, such as a textual programming environment (comprising editors, compilers, source-level debuggers, source management systems, and the like) and a real-time operating system (OS).
Graphical programming tools are also used to generate code. Such tools often provide an object-oriented programming environment, which allows code to be written as a collection of concurrent software objects or actors that communicate by messages. Each actor is a state machine that reacts based on messages received. An actor reacts to a message by transitioning from one state to another state via a state transition, or by executing code and remaining in the same state (a self-transition). An actor or state machine is always “in” a state, as the state transitions are considered to be instantaneous. An actor is in a particular state when there has been a state transition to the state and no transition leaving that state has occurred yet. Actors wait for messages from other actors, and then change states or take other action based on the message.
Both state transitions and self-transitions can cause state transition code to be executed. The way an actor reacts—which transitions and associated transition code is executed—based on a message may be referred to as its behavior. An actor can send messages to itself or to any other actor. Each state of a given state machine or actor can have sub-states, which are themselves states and may also have sub-states.
During coding, the object-oriented code development tool displays, for a given actor, the defined states and state transitions graphically to aid programming. The real-time object-oriented modeling (ROOM) is one object-oriented software development system which is often used as the basis for actual code development tools. In addition to graphical techniques, ROOM uses traditional programming languages to express detailed structure and behavior. For example, C or C++ describes actions to be taken on state transitions or state entry/exit. Further information on ROOM may be found in B. Selic, G. Gullekson, and Paul T. Ward,
Real
-
Time Object
-
Oriented Modeling
(John Wiley & Sons, 1994). One code development tool which is based on the ROOM system is ObjecTime® code development software <www.objectime.com>. The output of running a ROOM-type code development tool such as ObjecTime® software is non-executable code written in a high-level language such as C++. A C++ compiler, in conjunction with ObjecTime® software, is therefore needed to compile the generated code into an executable application.
The resulting code generated by such a tool, for a given actor, can therefore be represented by a state diagram having a plurality of states and sub-states, interconnected by a series of state transitions. Referring now to
FIG. 1
, there is shown a state transition diagram
100
illustrating state transitions and self-transitions in an object-oriented software application developed with an object-oriented code development tool or program such as ObjecTime. State diagram
100
shows three states A, B, and C, where state A comprises sub-states A
1
and A
2
. A state transition is made from state B to sub-state A
1
, via state transitions
111
and
111
′. Similarly, a state transition is made from state C to sub-state A
1
, by transitions
112
and
112
′.
Unlike a state transition, which is from one state to another, a self-transition (e.g.
113
) is a transition that begins and ends on the same state. Both a self-transition and a state-change type of transition can cause transition code to be executed during the transition. As mentioned above, this transition code may be coded in a language such as C or C++.
The interaction of several features of typical object-oriented code development languages can give rise to unexpected and undesirable problems. In particular, the interaction of the self-transition, transition-to-history, and entry code features can cause entry code to be erroneously executed due to a self-transition.
Entry code is code associated with a given state that is fired (i.e., executed) every time the state is reached (entered). Similarly, exit code is fired every time a state is left (exited). Entry code is useful where, for example, there are many different state transitions into a state which would cause the same transition code to be executed. In this case, it may be more efficient to put this code in entry code for the state, rather than on all state transitions to the state, so that the code for the behavior has to be written only once, not once for each transition to the state.
For example, referring once more to
FIG. 1
, sub-state A
1
may be a “fault” state reached only when a problem has been detected. The entry code for sub-state A
1
may turn on an “emergency” light, while the exit code may turn off the light. The entry code for state A itself may be set to “null” if there is no need for entry code for state A. Entry code is “set to null” by simply coding no entry code for a given state, i.e. it does not exist for a given state. Thus, when states B or C make a state transition to sub-state A
1
, the code for turning on the emergency light does not need to be duplicated as part of the transition code for each state transition
111
′,
112
′, but is only coded once in the entry code for sub-state A
1
.
As noted above, a self-transition is a transition that begins and ends on the same state. Some object-oriented code development tools offer a transition to history feature. In the transition to history feature, when there is a transition to a state, the state automatically enters the most previously-entered sub-state, unless the state transition specifies otherwise. When a state is reached from an outside state by a state transition for the first time (e.g., the “first time” since initialization or beginning the program or the actor having the state), it has not yet been in a previous sub-state. In this case, no sub-state of the state is automatically entered and the transition to history feature has no effect.
State transitions to a state cause entry code for the state to fire, and, due to the transition to history feature, also cause the entry code for the sub-state to fire. Some self-transitions can also cause entry code to fire, including entry code for a sub-state automatically re-entered as a result of the transition to history feature. However, it is not always desired that entry code fire on self-transition. It is often desirable that entry code fire only when the state or sub-state is entered from a state external to the state. Accordingly, use of both self-transitions/transitions to history and entry code can result in unexpected and undesirable program behavior.
As an example, the state transition diagram
100
of
FIG. 1
illustrates a variety of state transitions and self-transitions, and states and sub-states, of a given actor of an applications program. The program may comprise thousands of actors, each characterized by its own state diagram. Suppose state A is in sub-state A
1
and is then left, e.g. by a transition to state B. Later, if there is a transition back to state A, the transition to history feature causes the most recent sub-state A
1
to be automatically re-entered. This automatic state transition is indicated by the dotted arrow connected to state transition
115
, and happens unless the state transition to state A specifies otherwise. When state A
1
is entered in this manner, due to transit

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Single-shot entry code for software state transition does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Single-shot entry code for software state transition, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Single-shot entry code for software state transition will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2984187

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.