Method and apparatus for round-trip software engineering
First Claim
1. A method of synchronizing a software model and existing source code by generating updated source code, said existing source code comprising elements which can be represented in said software model and elements which cannot be represented in said software model, said software model allowing graphical representation of the intercommunication between said representable elements of said existing source code;
- said method comprising;
a) comparing representations of each software model element with a corresponding element, if any, in the existing source code;
b) generating new source code for each said software model element if said software model element differs from its corresponding element in the existing source code because said software model element has been updated in the software model; and
c) incorporating said new source code into said existing source code; and
d) storing the combined new source code and the remaining existing source code on a storage medium.
4 Assignments
0 Petitions
Accused Products
Abstract
A method of round-trip engineering source code from a software model, and in particular a method of forward engineering code previously reverse engineered into a software model whereby to generate updated source code without any changes to the code not changed in the model, and without using obtrusive code markers in the source code. Elements from the original source code represented by the model are placed in a meta-model, and compared to a similar meta-model of the software model. Appropriate changes and additions are made in the source code to elements which have been changed in the software model. The rest of the code in the software model remains untouched.
82 Citations
24 Claims
-
1. A method of synchronizing a software model and existing source code by generating updated source code, said existing source code comprising elements which can be represented in said software model and elements which cannot be represented in said software model, said software model allowing graphical representation of the intercommunication between said representable elements of said existing source code;
- said method comprising;
a) comparing representations of each software model element with a corresponding element, if any, in the existing source code;
b) generating new source code for each said software model element if said software model element differs from its corresponding element in the existing source code because said software model element has been updated in the software model; and
c) incorporating said new source code into said existing source code; and
d) storing the combined new source code and the remaining existing source code on a storage medium. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
1) generating a first set of elements representing elements of said existing source code in a first intermediate model using an intermediate model architecture, said first intermediate model being able to represent said elements which can be represented in said software model, said representation of each element in the first intermediate model including a reference to the location in the existing source code of the corresponding element;
2) generating comparison elements representing elements of said software model in said intermediate model architecture; and
3) comparing each of said comparison elements to said elements in said first intermediate model;
and wherein said step of generating comprises generating new source code for each of said elements in said first intermediate model if said corresponding comparison element differs therefrom.
- said method comprising;
-
3. A method in accordance with claim 2 wherein an element is added to said first set of elements corresponding to said comparison element if said comparison element is not found in said first set of elements, and wherein said added element in said intermediate model is incorporated at an appropriate place in said updated source code when generating said updated source code.
-
4. A method according to claim 1 wherein deleted source code elements for which no corresponding software model elements are found are removed from the existing source code.
-
5. A method according to claim 4 wherein said deleted source code elements are removed by converting said deleted source code elements into source code comments.
-
6. A method according to claim 1 wherein said source code elements each represent the contents of a line of said existing source code.
-
7. A method according to claim 1 wherein said source code elements each represent a single entity in said existing source code.
-
8. A method according to claim 1 wherein the steps of comparing, generating and incorporating are preceded by the steps of generating an original software model from said existing source code and updating elements in said original software model to generate said software model.
-
9. Apparatus for synchronizing a software model and existing source code by generating updated source code, said existing source code comprising elements which can be represented in said software model and elements which cannot be represented in said software model, said software model allowing graphical representation of the intercommunication between said representable elements of said existing source code;
- said apparatus comprising;
a) means for comparing representations of each software model element with a corresponding element, if any, in the existing source code;
b) means for generating new source code for each said software model element if said software model element differs from its corresponding element in the existing source code because said software model element has been updated in the software model; and
c) means for incorporating said new source code into said existing source code; and
d) means for storing the combined new source code and the remaining existing source code. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
1) means for generating a first set of elements representing elements of said existing source code in a first intermediate model using an intermediate model architecture, said first intermediate model being able to represent said elements which can be represented in said software model, said representation of each element in the first intermediate model including a reference to the location in the existing source code of the corresponding element;
2) means for generating comparison elements representing elements of said software model in said intermediate model architecture; and
3) means for comparing each of said comparison elements to said elements in said first intermediate model;
and wherein said means for generating comprises means for generating new source code for each of said elements in said first intermediate model if said corresponding comparison element differs therefrom.
- said apparatus comprising;
-
11. Apparatus in accordance with claim 10 comprising means for adding an element to said first set of elements corresponding to said comparison element if said comparison element is not found in said first set of elements, and means for incorporating said added element in said model at an appropriate place in said updated source code when generating said updated source code.
-
12. Apparatus according to claim 9 further comprising means for removing deleted source code elements from the existing source code for which no corresponding software model elements are found.
-
13. Apparatus according to claim 12 wherein said removing means removes said deleted source code elements by converting said deleted source code elements into source code comments.
-
14. Apparatus according to claim 9 wherein said source code elements each represent the contents of a line of said existing source code.
-
15. Apparatus according to claim 9 wherein said source code elements each represent a single entity in said existing source code.
-
16. Apparatus according to claim 9 further comprising means for generating an original software model from said existing source code and allowing the updating of elements in said original software model to generate said software model.
-
17. A computer recording medium including computer executable code for synchronizing a software model and existing source code by generating updated source code, said existing source code comprising elements which can be represented in said software model and elements which cannot be represented in said software model, said software model allowing graphical representation of the intercommunication between said representable elements of said existing source code;
- said computer recording medium comprising;
a) code for comparing representations of each software model element with a corresponding element, if any, in the existing source code;
b) code for generating new source code for each said software model element if said software model element differs from its corresponding element in the existing source code because said software model element has been updated in the software model; and
c) code for incorporating said new source code into said existing source code; and
d) code for storing the combined new source code and the remaining existing source code. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24)
1) code for generating a first set of elements representing elements of said existing source code in a first intermediate model using an intermediate model architecture, said first intermediate model being able to represent said elements which can be represented in said software model, said representation of each element in the first intermediate model including a reference to the location in the existing source code of the corresponding element;
2) code for generating comparison elements representing elements of said software model in said intermediate model architecture; and
3) code for comparing each of said comparison elements to said elements in said first intermediate model;
and wherein said code for generating comprises code for generating new source code for each of said elements in said first intermediate model if said corresponding comparison element differs therefrom.
- said computer recording medium comprising;
-
19. The computer recording medium according to claim 18 further comprising code for adding an element to said first set of elements corresponding to said comparison clement if said comparison element is not found in said first set of elements, and code for incorporating said added element in said model at an appropriate place in said updated source code when generating said updated source code.
-
20. The computer recording medium according to claim 17 further comprising code for removing deleted source code elements from the existing source code for which no corresponding software model elements are found.
-
21. The computer recording medium according to claim 20 wherein said code for removing removes said deleted source code elements by converting said deleted source code elements into source code comments.
-
22. The computer recording medium according to claim 17 wherein said source code elements each represent the contents of a line of said existing source code.
-
23. The computer recording medium according to claim 17 wherein said source code elements each represent a single entity in said existing source code.
-
24. The computer recording medium according to claim 17 further comprising code for generating an original software model from said existing source code and allowing the updating of elements in said original software model to generate said software model.
Specification