|Publication number||US8225278 B2|
|Application number||US 11/747,940|
|Publication date||Jul 17, 2012|
|Filing date||May 14, 2007|
|Priority date||May 14, 2007|
|Also published as||US20080288916|
|Publication number||11747940, 747940, US 8225278 B2, US 8225278B2, US-B2-8225278, US8225278 B2, US8225278B2|
|Inventors||Eiichi Tazoe, Tsuyoshi Matsuzaki, Munetaka Ohtani|
|Original Assignee||International Business Machines Corporation|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (13), Non-Patent Citations (7), Referenced by (2), Classifications (7), Legal Events (4)|
|External Links: USPTO, USPTO Assignment, Espacenet|
1. Technical Field
This invention relates to a hierarchical representation of a state diagram. More specifically, the invention relates to graphically presenting modifications to the hierarchical state diagram in a manner that transfers across the hierarchical layers therein.
2. Description of the Prior Art
State diagrams are used to graphically represent finite state machines. One form of a state diagram for a finite state machine is a directed graph. Another form of the state diagram is represented through the unified modeling language (UML), i.e. a modeling language in which the state diagram includes standardized notation that can describe computer programs, business processes, etc. Basic notational elements that make up a diagram include the following: a filled circle pointing to the initial state, a hollow circle containing a smaller filled circle indicating the final state, a rounded rectangle denoting a state, an arrow denoting transition, and one or more horizontal lines denoting a join or a fork. UML state machine diagrams depict the various states that an object may be in and the transitions between those states. In the state diagram, a state represents a stage in the behavior of an object, including an initial state, a final state, and possibly transition states. An initial state, also known as a creation state, is one that an object is in when it is first created. In contrast, a final state is one in which no transactions lead out of. A transition state is a state between the initial state and the final state, and is a state that represents a progression from one state to another. The transition state is triggered by an event that is either internal or external to the object. Accordingly, the state diagram models objects that exhibits both behavior and state.
In a conventional state diagram, all states are represented at the same level. The design does not capture the commonality that exists among states. A hierarchical state machine diagram captures the commonality by organizing the states as a hierarchy. The states at the higher level in the hierarchy perform common message handling, while the lower level states inherit the commonality from the higher level states and perform state specific functions.
State diagrams are stored according to internal data transcription. It is known in the art that state diagrams may be modified over time. However, because the diagram is stored according to internal data transcription, it is difficult to understand the difference between a second version diagram and the original diagram. The difficulties understanding modification of the models increases with complexity with respect to the hierarchical state diagram wherein the differences may need to be expressed at different levels in the hierarchy.
Therefore there is a need to facilitate presentation and viewing of modifications of a hierarchical state diagram. The review process should be limited to a specific level in the hierarchy in order to mitigate the complexity of the comparison process across the levels of the hierarchy.
This invention comprises a method, system, and article for comparing hierarchical state diagrams and graphical representing modifications to the diagram.
In one aspect of the invention, a method is provided for visualizing a state transition hierarchical diagram. The diagram is expressed in a tree structure, with each level in the hierarchy having a state represented as a node, and a transition represented as a line between two nodes. A node of a modified version of the diagram is compared with a corresponding node of an earlier version of the diagram. All modifications to the compared nodes of the diagrams are counted. Similarly, a transition of the modified version of the diagram is compared with a corresponding transition of the earlier version of the diagram. All modifications to the compared transitions of the diagrams are counted, quantified, and presented on a visual display.
In another aspect of the invention, a computer system is provided with a processor in communication with storage media and a visual display. A hierarchical state diagram is stored in computer readable format in the storage media and represents behavior of an object. The diagram has at least two states at different hierarchical levels and at least one transition between the states. A director is provided to express the diagram in a tree structure with a parent level and at least one child level, with each level in the hierarchy having a state represented as a node and a transition represented as a line between two nodes. A node comparison manager is provided to compare a node of a modified state diagram with a corresponding node of an earlier version of the diagram. The node comparison manager counts all modifications to the compared nodes of the diagrams and reports the node count to the director. A transition comparison manager compares a transition of a modified state diagram with a corresponding transition of an earlier version of the diagram. The transition manager counts all modifications to the compared transitions of the diagram and reports the transition count to the director. Finally, the director quantifies the node and transition modifications, and forwards them to a visual display to illustrate the quantified modifications.
In yet another aspect of the invention, an article is provided with a computer readable medium having computer-readable instructions stored thereon executable by a processor. Instructions are provided in the medium to express a hierarchical state diagram in a tree structure with a parent level and at least one child level, with each level in the hierarchy having a state represented as a node and a transition represented as a line between two nodes. In addition, instructions are provided to compare a node of a modified version of the diagram with a corresponding node of an earlier version of the diagram, together with instructions to count all modifications to the compared nodes of the diagram. Similarly, instructions are provided to compare a transition of the modified version of the diagram with a corresponding transition of an earlier version of the diagram, together with instructions to count all modifications to the compared transitions of the diagram. Finally, instructions are provided to quantify the counted modifications and to display the quantified modifications.
Other features and advantages of this invention will become apparent from the following detailed description of the presently preferred embodiment of the invention, taken in conjunction with the accompanying drawings.
State diagrams have basic elements that include a rounded box representing the state of the object and arrows indicating the transition to the next state. An activity section of a state depicts what activities the object will be doing while it is in that state. All state diagrams begin with an initial state of the object. This is the state of the object when it is created. After the initial state, the object begins changing states. A hierarchical state diagram is represented in a tree structure with a parent level and one or more child levels. In a hierarchical state diagrams, the initial state is the parent node of a tree structure and the child nodes represent secondary states, i.e. a transition state or a final state. Conditions based on activities determine the next state to be represented in the diagram, i.e. the state the object transitions to. It is accepted in the art that a modeled state diagram may be modified over time. The modifications are accumulated at each layer of the hierarchical representation of the diagram. Each modification is then reflected in a visual manner to facilitate recognition of modifications in the hierarchical representation.
With respect to the second generation child level (110), two of the nodes represent transitions from each of the nodes (104) and (106) in the first generation level (108). More specifically, a transition from child node (104) proceeds to one of two states as represented by a fork to either node (112) or node (114). Similarly, a transition from child node (106) proceeds to one of two states as represented by a fork to either node (116) or node (118). Each of the nodes (112), (114), (116), and (118) represent a final state in the diagram as there is no subsequent generation depicted in the hierarchical representation beyond each of these nodes.
It is known in the art that a state transition diagram may be modified over the course of time. Modifications may be made to states, transitions, or both. In a hierarchical state diagram, the modifications may occur on different generation levels of the diagram. The modifications may be applied to the state of the object or to the transition of the object. To facilitate review of modifications to states and transitions in one or more levels of the hierarchical tree structure, the modifications are transferred to the parent node at the top of the hierarchy.
Following step (208), the difference quantities at the respective nodes (210) are defined. In one embodiment, identifying indicia in the form of graphical enhancements are utilized to illustrate the quantity of modifications to a respective state and/or transition, as well as the level in the hierarchy where the modification has occurred. This enables a view of the parent node to facilitate localization of the desired modification. In one embodiment, the graphical enhancements may include different colors, different shades of gray, or different forms of hash markings. Regardless of the format of the difference quantities, the graphical enhancement is assigned based upon the difference quantities collated (212). Accordingly, the modifications to the state diagram are determined and transferred to the parent node in a graphical format to assist in localizing the modifications made.
The hierarchical state diagram is represented in a tree structure (302) having one or more generations. The quantity of generations in the tree are counted and assigned to the variable TGtotal (304). The variable N is assigned to the integer represented by TGtotal (306). The quantity of nodes in generation N of the tree structure are counted (308) and assigned to the variable GNN (310). Following the process of counting the quantity of nodes at a specified generation (310), the variable N is decreased by a factor of one (312) and a determination is made as to whether the variable N is now set to zero (314). If the response to the determination at step (314) is positive, the process of counting nodes in the tree structure is completed (316). However, if the response to the determination at step (314) is negative, the process returns to step (308) to continue counting the quantity of nodes in the next higher generation level of the tree structure. The process of accumulating the quantity of nodes in the tree structure continues until the parent level has been counted. The process outlined in
As shown in
Following the process of counting the total quantity of states in each generation in both the modified state diagram and the original state diagram, a comparison is conducted of each state at each generation level to determine the modifications made.
As noted above, each modification from the original state diagram to the modified state diagram are marked. In one embodiment, the modifications are stored as data in a recordable data storage medium in a manner that facilitates retrieval of the data. The gathered data may be used to reflect the modifications to a user in a graphical manner, a collated report, or another format that facilitates communication of the modifications to the user.
In addition to comparing the nodes, i.e. states, and any modifications made thereto in the diagram, a complete comparison of diagrams also includes a comparison of each transition in each level of the hierarchy.
As noted above, the modifications made to each state and each transition in each generation of the hierarchical diagram is counted to be reflected at the parent node with indicia. The difference quantity of a state in each generation in the state diagram is expressed as follows:
wherein, s is a count of the states in the diagram, d(self) is the amount of modification in an attribute of a state, d(arc) is the amount of modification in a transition, d(sub-state) is the amount of modification in a sub-state, and k is a transmission ratio. In one embodiment, a sub-state is a child state. In a hierarchical state diagram, a higher generation state or transition has a stronger influence on the structure of the hierarchy than a lower generation state or transition. More specifically, a higher generation state or transition dominates the framework of the hierarchy. The transmission ratio, k, is a factor that accounts for the location in the level of the hierarchy where the modification is reflected. In other words, the transmission ratio attenuates the large influence of a modification to a state or transition in a layer in the hierarchy at or close to the parent level in comparison to a modification to a state or transition in a layer further removed from the parent layer.
As noted above, the quantity of modifications to the state diagram are quantified for each state and each transition. In one embodiment, the quantified modifications to states and/or transitions are displayed with graphical indicia, such as different colors applied to different quantities of modifications.
In one embodiment, the invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc. The invention can take the form of a computer software product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer-usable or computer-readable medium can be any apparatus that can contain, and store the program for use by or in connection with the instruction execution system, apparatus, or device.
Embodiments within the scope of the present invention also include articles of manufacture comprising program storage means having encoded therein program code. Such program storage means can be any available media which can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such program storage means can include RAM, ROM, EEPROM, CD-ROM, or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired program code means and which can be accessed by a general purpose or special purpose computer. Combinations of the above should also be included in the scope of the program storage means.
The medium can be an electronic, magnetic, optical, or semiconductor system (or apparatus or device). Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, random access memory (RAM), read-only memory (ROM), a rigid magnetic disk, and an optical disk. Current examples of optical disks include compact disk B read only (CD-ROM), compact disk B read/write (CD-R/W) and DVD.
A data processing system suitable for storing and/or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the system either directly or through intervening I/O controllers.
In one embodiment, a director, a state comparison manager, and a transition comparison manager are provided in software or hardware. With respect to the software implementation, the director and managers may include, but are not limited to, firmware, resident software, microcode, etc. The software implementation can take the form of a computer program product accessible from a computer-useable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system.
For the purposes of this description, a computer-useable or computer-readable medium can be any apparatus that can contain, store, communicate the program for use by or in connection with the instruction execution system, apparatus, or device.
As shown, network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, wireless and Ethernet adapters are just a few of the currently available types of network adapters.
A method and system are provided for effectively displaying modifications to states and transitions in a hierarchical state diagram. Information of a modification on a child level in the tree structure is transferred to the parent level. In the case where the model on the parent level is displayed, the modification information is quantified and displayed. This enables the contents and extent of the modification to be understood by viewing the model on the parent level, and removes the necessity to move to and from the respective levels to determine modifications. Similarly, the modification point and modification degree are visually expressed in a manner that removes the tedious requirement for code review to determine modifications made.
It will be appreciated that, although specific embodiments of the invention have been described herein for purposes of illustration, various modifications may be made without departing from the spirit and scope of the invention. In particular, the process of comparing states and transitions includes comparing any two hierarchical state diagrams and should not be limited to comparing a modified version with an original version. Similarly, although it is disclosed that all of the modifications are to be reflected in the parent node of the tree structure, the modification may be reflected in any node at any level in the hierarchy. Accordingly, the scope of protection of this invention is limited only by the following claims and their equivalents.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US7694273 *||Apr 26, 2007||Apr 6, 2010||National Instruments Corporation||Automatic modification of a graphical program based on corresponding changes to a diagram with states and state transitions|
|US7818715 *||Mar 8, 2007||Oct 19, 2010||National Instruments Corporation||Generating a hardware description from a graphical program in response to receiving a diagram with states and state transitions|
|US7818716 *||May 4, 2007||Oct 19, 2010||National Instruments Corporation||Priorities of transitions of a diagram with states|
|US7882490 *||Mar 20, 2007||Feb 1, 2011||National Instruments Corporation||Automatic generation of a data flow diagram from a diagram with states and transitions|
|US7882491 *||May 4, 2007||Feb 1, 2011||National Instruments Corporation||Automatic generation of a graphical program with a structure node in response to receiving a diagram with states and state transitions|
|US7913227 *||Feb 28, 2007||Mar 22, 2011||International Business Machines Corporation||Methods and apparatus for management of configuration item lifecycle state transitions|
|US20060041579 *||Jun 8, 2005||Feb 23, 2006||International Business Machines Corporation||Structured-document processing|
|US20060080626 *||Oct 13, 2005||Apr 13, 2006||International Business Machines Corporation||Visualization method and apparatus for logic verification and behavioral analysis|
|US20070113156 *||Nov 2, 2006||May 17, 2007||Sony Corporation||Information processing method and apparatus, recording medium, and program|
|US20070168943 *||Oct 18, 2006||Jul 19, 2007||Marc Marini||Creating Machine Vision Inspections Using a State Diagram Representation|
|US20080288916 *||May 14, 2007||Nov 20, 2008||Eiichi Tazoe||Method of Visualizing Modifications of a Hierarchical State Diagram|
|US20090013307 *||Aug 20, 2007||Jan 8, 2009||The Mathworks, Inc.||Multi-rate hierarchical state diagrams|
|JPH05127882A||Title not available|
|1||*||A. Kvamme, Usability achievements based on UI framework with screen categories and state transition diagrams, Oct. 2006, 2 pages, .|
|2||*||A. Kvamme, Usability achievements based on UI framework with screen categories and state transition diagrams, Oct. 2006, 2 pages, <http://delivery.acm.org/10.1145/1190000/1182542/p481-kvamme.pdf>.|
|3||*||Chawathe et al., Change Detection in Hierarchically Structured Information, Department of Computer Science, Stanford University, Stanford, California, Published 1995.|
|4||*||Das et al., Model checking on state transition diagram, Jan. 2004, 6 pages, .|
|5||*||Das et al., Model checking on state transition diagram, Jan. 2004, 6 pages, <http://delivery.acm.org/10.1145/1020000/1015194/p412-das.pdf>.|
|6||*||J. Dong, State, event, time and diagram in system modeling, Jul. 2001, 2 pages, .|
|7||*||J. Dong, State, event, time and diagram in system modeling, Jul. 2001, 2 pages, <http://delivery.acm.org/10.1145/390000/381617/p733-dong.pdf>.|
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US8429605 *||Dec 30, 2009||Apr 23, 2013||The United States Of America As Represented By The Secretary Of The Navy||Finite state machine architecture for software development|
|US20110161926 *||Dec 30, 2009||Jun 30, 2011||Robert B Cruise||Finite state machine architecture for software development|
|U.S. Classification||717/109, 717/120, 717/106, 717/105|
|Oct 24, 2007||AS||Assignment|
Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:TAZOE, EIICHI;MATSUZAKI, TSUYOSHI;OHTANI, MUNETAKA;REEL/FRAME:020008/0444;SIGNING DATES FROM 20070424 TO 20070426
Owner name: INTERNATIONAL BUSINESS MACHINES CORPORATION, NEW Y
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:TAZOE, EIICHI;MATSUZAKI, TSUYOSHI;OHTANI, MUNETAKA;SIGNING DATES FROM 20070424 TO 20070426;REEL/FRAME:020008/0444
|Feb 26, 2016||REMI||Maintenance fee reminder mailed|
|Jul 17, 2016||LAPS||Lapse for failure to pay maintenance fees|
|Sep 6, 2016||FP||Expired due to failure to pay maintenance fee|
Effective date: 20160717