A computer-implemented method for initializing computer programming elements based on dependency graphs is provided. The method includes determining a dependency graph associated with a computer programming element to be initialized. The method also includes traversing the determined dependency graph, so as to obtain thread information associated with each of the one or more computer programming elements of the determined dependency graph, and determining, based on the obtained thread information associated with each of the computer programming elements, an aggregate thread information of all the computer programming elements of the determined dependency graph. The method further includes generating code which initializes the computer programming element to be initialized based at least on the determined aggregate thread information. Systems and machine-readable media are also provided.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A computer-implemented method for initializing computer programming elements based on dependency graphs, the method comprising: determining a dependency graph associated with a computer programming element to be initialized, wherein the dependency graph comprises one or more nodes that define dependency relationships of one or more computer programming elements including the computer programming element to be initialized, and wherein each of the one or more computer programming elements is associated with thread information; traversing the determined dependency graph, so as to obtain the thread information associated with each of the one or more computer programming elements of the determined dependency graph; determining, based on the obtained thread information associated with each of the computer programming elements, an aggregate thread information of all the computer programming elements of the determined dependency graph; generating code which initializes the computer programming element to be initialized based at least on the determined aggregate thread information; determining whether the determined aggregate thread information corresponds to a declared thread information of the computer programming element to be initialized; and generating, if the determined aggregate thread information does not correspond to the declared thread information, a notification for communicating to a user, the notification indicating that the determined aggregate thread information does not correspond to the declared thread information.
2. The method of claim 1 , wherein the generated code comprises instructions for initializing each of the one or more computer programming elements of the determined dependency graph according to the obtained thread information associated with each of the computer programming elements and the determined aggregate thread information.
3. The method of claim 1 , wherein the determined dependency graph comprises a node corresponding to the computer programming element to be initialized and one or more nodes corresponding to computer programming elements that are dependees of the computer programming element to be initialized.
4. The method of claim 1 , wherein the computer programming element to be initialized is a factory.
5. The method of claim 1 , wherein the computer programming element to be initialized is an object.
6. The method of claim 1 , wherein the obtained thread information identifies whether a computer programming element is synchronous, asynchronous, or threadbound.
7. The method of claim 1 , wherein the dependency graph is determined based on computer programming element configuration data, wherein the computer programming configuration data includes information for configuring properties of the one or more computer programming elements.
8. The method of claim 1 , further comprising: determining a dependency graph for destruction associated with a computer programming element to be destroyed; traversing the determined dependency graph for destruction, so as to determine a least-depended-upon node of the determined dependency graph for destruction; and generating code which destroys dependency graph for destruction beginning from the determined least-depended-upon node.
9. The method of claim 1 , further comprising executing the generated code which initializes the computer programming element to be initialized.
10. A system for initializing computer programming elements based on dependency graphs, comprising: a memory storing executable instructions; and a processor coupled to the memory and configured to execute the stored executable instructions to: determine a dependency graph associated with a computer programming element to be initialized, wherein the dependency graph comprises one or more nodes that define dependency relationships of one or more computer programming elements including the computer programming element to be initialized, and wherein each of the one or more computer programming elements is associated with thread information; traverse the determined dependency graph, so as to obtain the thread information associated with each of the one or more computer programming elements of the determined dependency graph; determine, based on the obtained thread information associated with each of the computer programming elements, an aggregate thread information of all the computer programming elements of the determined dependency graph; generate code which initializes the computer programming element to be initialized based at least on the determined aggregate thread information; determine whether the determined aggregate thread information corresponds to a declared thread information of the computer programming element to be initialized; and generate, if the determined aggregate thread information does not correspond to the declared thread information, a notification for communicating to a user, the notification indicating that the determined aggregate thread information does not correspond to the declared thread information.
11. The system of claim 10 , wherein the computer programming element to be initialized is a factory.
12. The system of claim 10 , wherein the computer programming element to be initialized is an object.
13. The system of claim 10 , wherein the obtained thread information identifies whether a computer programming element is synchronous, asynchronous, or threadbound.
14. The system of claim 10 , wherein the dependency graph is determined based on computer programming element configuration data, wherein the computer programming configuration data includes information for configuring properties of the one or more computer programming elements.
15. The system of claim 10 , wherein the processor is further configured to: determine a dependency graph for destruction associated with a computer programming element to be destroyed; traverse the determined dependency graph for destruction, so as to determine a least-depended-upon node of the determined dependency graph for destruction; and generate code which destroys dependency graph for destruction beginning from the determined least-depended-upon node.
16. The system of claim 10 , wherein the dependency graph further comprises one or more nodes corresponding to computer programming elements that are dependencies of the computer programming element to be initialized.
17. A non-transitory machine-readable storage medium comprising instructions stored therein, which when executed by processors, cause the processors to perform operations comprising: determining a dependency graph associated with a computer programming element to be initialized, wherein the dependency graph comprises one or more nodes that define dependency relationships of one or more computer programming elements including the computer programming element to be initialized, and wherein each of the one or more computer programming elements is associated with thread information; traversing the determined dependency graph, so as to obtain the thread information associated with each of the one or more computer programming elements of the determined dependency graph; determining, based on the obtained thread information associated with each of the computer programming elements, an aggregate thread information of all the computer programming elements of the determined dependency graph; generating code which initializes the computer programming element to be initialized based at least on the determined aggregate thread information; determining whether the determined aggregate thread information corresponds to a declared thread information of the computer programming element to be initialized; and generating, if the determined aggregate thread information does not correspond to the declared thread information, a notification for communicating to a user, the notification indicating that the determined aggregate thread information does not correspond to the declared thread information.
18. The non-transitory machine-readable storage medium of claim 17 , wherein the dependency graph is determined based on computer programming element configuration data, wherein the computer programming configuration data includes information for configuring properties of the one or more computer programming elements.
19. The non-transitory machine-readable storage medium of claim 17 , wherein the instruction further cause the processors to perform operations comprising: determining a dependency graph for destruction associated with a computer programming element to be destroyed; traversing the determined dependency graph for destruction, so as to determine a least-depended-upon node of the determined dependency graph for destruction; and generating code which destroys dependency graph for destruction beginning from the determined least-depended-upon node.
20. The non-transitory machine-readable storage medium of claim 17 , wherein the determined dependency graph comprises a node corresponding to the computer programming element to be initialized and one or more nodes corresponding to computer programming elements that are dependees of the computer programming element to be initialized.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
October 4, 2012
December 30, 2014
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.