Converting an activity diagram into code
AssigneeInternational Business Machines Corporation
InventorsNICOLAS DANGEVILLE, YUCEL GUCLU
Life of this patent
Estimating the term…
Abstract
An activity diagram can be converted into code, by traversing the activity diagram to identify the cycles in the activity diagram. Each identified cycle can be stored in a list of cycles. Intermixed cycles among the list of cycles can be resolved. When resolving, the identified cycles can be compared one to another to determine if they have common nodes. If so one of the cycles can be removed from the list of cycles. The other cycle can be labeled as a GOTO loop. The activity diagram can be traversed. For each traversed node, code statements can be generated based on the node type and the labels associated with the node.
Claims19
A method of converting an activity diagram into code, comprising:
- a. traversing the activity diagram to identify the cycles included in the activity diagram;
- b. resolving intermixed cycles among said identified cycles to only maintain separated cycles and/or cycles contained in the body of other cycles, said step of resolving intermixed cycles comprising comparing the identified cycles one to another to determine if they have common nodes;
- c. traversing the activity diagram and for each traversed node, generating code statements based on the node type and the results of steps a and b.
A system for converting an activity diagram into code comprising:
- a processor;
- a non volatile memory;
- a volatile memory;
- and
- a bus connecting the processor, non volatile memory and volatile memory, wherein at least one of the non volatile memory and the volatile memory store computer program product able to be utilized by the system, where execution of the computer program product using the processor, the non volatile memory, and the volatile memory causes the system to:
- a. traverse an activity diagram to identify the cycles included in the activity diagram;
- b. resolve intermixed cycles among said identified cycles to only maintain separated cycles and/or cycles contained in the body of other cycles, said step of resolving intermixed cycles comprising comparing the identified cycles one to another to determine if they have common nodes;
- c. traverse the activity diagram and for each traversed node, generating code statements based on the node type and the results of steps a and b.
A computer program product stored on a tangible storage medium comprising instructions to converting an activity diagram into code when said computer program product is executed on a suitable computer device, said computer program product when executed on a suitable computer device performing the steps of:
- a. traversing the activity diagram to identify the cycles included in the activity diagram;
- b. resolving intermixed cycles among said identified cycles to only maintain separated cycles and/or cycles contained in the body of other cycles, said step of resolving intermixed cycles comprising comparing the identified cycles one to another to determine if they have common nodes;
- c. traversing the activity diagram and for each traversed node, generating code statements based on the node type and the results of steps a and b.
Dependencies are inferred from the claim text.