Legal claims defining the scope of protection, as filed with the USPTO.
1. In a computing environment, a method comprising: detecting code patterns in a concurrent program with respect to code that has any combination of interactions between threads, global state or scheduling; modifying code fragments of the concurrent program, including instrumenting code by placing at least one iteration counter in at least one code fragment; statically analyzing the instrumented code to compute upper bounds on at least some of the iteration counters; and providing summary data of executing the concurrent program, including by analyzing the iteration counters, shared resources and interaction patterns, and by providing a computation graph differentiating wait nodes and signal nodes, by associating a half edge with each wait node or signal node to signify when a matching call is unresolved in a first computation phase, and by resolving the half edges to full edges in a second computation phase.
2. The method of claim 1 wherein a global variable is changeable by a plurality of concurrently executing code fragments, and further comprising, determining an invariant across the concurrently executing code fragments.
3. The method of claim 1 wherein a global variable is modifiable in a loop, and further comprising, determining an upper bound on a number of loop iterations.
4. The method of claim 1 wherein detecting the code patterns includes identifying a code fragment for polling worker thread termination in a loop, and if detected, replacing the loop by an explicit loop-free synchronization.
5. The method of claim 1 wherein detecting the code patterns includes identifying a code fragment for interlocked operation, and if detected, wherein modifying the code fragment comprises inserting code into the code fragment to prevent switching to another thread that is capable of changing a variable used in that code fragment.
6. The method of claim 1 wherein detecting the code patterns includes identifying a code fragment for a timeout operation, and if detected, wherein modifying the code fragment comprises converting the timeout operation to a sleep operation having a finite sleep time.
7. The method of claim 1 wherein providing the summary data comprises representing synchronization primitives as nodes.
8. The method of claim 7 wherein providing the computation graph comprises representing control dependence between synchronization primitives as edges between the nodes.
9. The method of claim 8 wherein at least one synchronization primitive represents a resource acquisition and at least one other synchronization primitive represents a resource release.
10. The method of claim 9 further comprising annotating at least some of the nodes with resource data, usage information or timing information, or any combination of resource data, usage information or timing information.
11. The method of claim 7 wherein providing the computation graph comprises associating resource information with a node representing a synchronization primitive.
12. The method of claim 11 wherein associating the resource information comprises maintaining an under/over-approximation of resource acquire/release in terms of function parameters, global variables or newly-created resources as local variables, or any combination of function parameters, global variables or newly-created resources as local variables.
13. The method of claim 1 wherein providing the summary data comprises providing a function summary including a set of path predicate, computation graph pairs for each function such that whenever each predicate is true, its paired computation graph summarizes behavior of the corresponding function.
14. In a computing environment, a system comprising: at least one processor, a memory communicatively coupled to the at least one processor and including components comprising, a mechanism configured to process a concurrent program to provide timing information related to that concurrent program, including by determining patterns in code fragments of the concurrent program with respect to code that has interactions between threads, global state and scheduling, by instrumenting code fragments with counter variables and statically analyzing the instrumented code fragments to obtain bounds on the counter variables to provide instrumented code including counters, running the instrumented code, and analyzing the counters, and by providing summary data comprising a computation graph that represents synchronization primitives as nodes, represents control dependence between the synchronization primitives as edges between the nodes, represents each unresolved matching call in a first computation phase with a half edge on each corresponding wait node or signal node, and resolves the half edges to full edges in a second computation phase.
15. The system of claim 14 wherein the mechanism is further configured to determine patterns corresponding to concurrently executing code fragments, non-blocking concurrent code fragments, blocking concurrent code fragments, fragments having a loop that may not terminate, fragments having interlocked operation, or fragments having a timeout, or any combination of concurrently executing code fragments, non-blocking concurrent code fragments, blocking concurrent code fragments, fragments having a loop that may not terminate, fragments having interlocked operation, or fragments having a timeout.
16. The system of claim 14 further comprising an invariant generation tool coupled to the mechanism to provide data corresponding to at least one bound associated with at least one code fragment.
17. One or more computer-readable storage media having computer-executable instructions, which when executed perform steps, comprising: detecting code fragments in a concurrent program with respect to code that has any combination of interactions between threads, global state or scheduling, and then instrumenting the concurrent program with counters and statically analyzing the instrumented code to obtain upper bounds on counter variables to obtain complexity information, and then providing summary data by processing the complexity information into at least one computation graph comprising resource usage data, wherein the at least one computation graph differentiates between wait nodes and signal nodes, associates a half edge with each wait node or signal node to signify when a matching call is unresolved in a first computation phase, and resolves the half edges to full edges in a second computation phase.
18. The one or more computer-readable storage media of claim 17 wherein providing the summary data comprises, providing a set of path predicate, computation graph pairs corresponding to functions, such that whenever each predicate is true, its paired computation graph summarizes behavior of the corresponding function.
19. The one or more computer-readable storage media of claim 17 wherein providing the summary data comprises using nodes to represent synchronization primitives in each computation graph, and further comprising, annotating at least some of the nodes with resource data, usage information or timing information, or any combination of resource data, usage information or timing information.
Unknown
May 6, 2014
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.